|
|
It's been about 20 years since I had geometry, so I'm way rusty. Anyway,
this should be an easy one for our mathematically-gifted viewers out
there...
As you can see by the lovely model, I have a triangle with a single right
angle (iscoseles(sp) triangle? I'm guessing at this point...). The base of
the triangle is 5 units wide, and the height is 4 units. Given we know the
base/height angle is 90 degress and the length of the base and width, I'd
like to know:
1) The length of the hypotenuse (I think that's what it's called).
2) The degree measurement of the other two angles.
I _know_ there's a formula for determining that, but I can't remember for
the life of me. If I could get that formula, that would make my life a lot
easier (I need it for a macro I'm writing).
Any help would be greatly appreciated... thanks in advance :) If this is
being posted to the wrong forum, please accept my sincere apologies...
--
dan
http://hometown.aol.com/goofygrafx
Post a reply to this message
Attachments:
Download 'triangle.jpg' (10 KB)
Preview of image 'triangle.jpg'
|
|
|
|
Dan Byers wrote:
> As you can see by the lovely model, I have a triangle with a single
> right angle (iscoseles(sp) triangle? I'm guessing at this point...).
A triangle which posesses a 90 degree angle is a right triangle.
> The base of the triangle is 5 units wide, and the height is 4 units.
> Given we know the base/height angle is 90 degress and the length of
> the base and width, I'd like to know:
> 1) The length of the hypotenuse (I think that's what it's called).
> 2) The degree measurement of the other two angles.
For a right triangle with base x and height y:
a^2+b^2=c^2 x=rCOStheta y=rSINtheta theta=TAN-1(y/x)
x=5, y=4
SQRT(5^2+4^2) = SQRT(25+16) = 6.4031242374... units
TAN-1(y/x) = 38.6598082540... degrees
90-38.6598082540... = 51.3401917459... degrees
Post a reply to this message
|
|
|
|
> Any help would be greatly appreciated... thanks in advance
> :) If this is being posted to the wrong forum, please
> accept my sincere apologies...
Apology accepted ;)
povray.binaries.images is the appropriate group since
there's an image attachment.
Check out povray.announce.frequently-asked-questions
for the newsgroup rules and such.
--
Phil
Behold, for I am the keeper of the sacred coffee brewing method.
Post a reply to this message
|
|
|
|
Dan Byers wrote:
>
> It's been about 20 years since I had geometry, so I'm way rusty. Anyway,
> this should be an easy one for our mathematically-gifted viewers out
> there...
>
> As you can see by the lovely model, I have a triangle with a single right
> angle (iscoseles(sp) triangle? I'm guessing at this point...). The base of
> the triangle is 5 units wide, and the height is 4 units. Given we know the
> base/height angle is 90 degress and the length of the base and width, I'd
> like to know:
>
> 1) The length of the hypotenuse (I think that's what it's called).
> 2) The degree measurement of the other two angles.
>
> I _know_ there's a formula for determining that, but I can't remember for
> the life of me. If I could get that formula, that would make my life a lot
> easier (I need it for a macro I'm writing).
>
> Any help would be greatly appreciated... thanks in advance :) If this is
> being posted to the wrong forum, please accept my sincere apologies...
Here are some relevant equations:
Hypotenuse^2 = Base^2 + Height^2
cos(Angle1) = Base/Hypotenuse
sin(Angle1) = Height/Hypotenuse
tan(Angle1) = Height/Base
cos(Angle2) = Height/Hypotenuse
sin(Angle2) = Base/Hypotenuse
tan(Angle2) = Base/Height
Angle1 + Angle2 + Angle3 = pi
And below are some ways to solve your problem with POV-script.
Tor Olav
#declare Base = 5;
#declare Height = 4;
#declare Hypotenuse = vlength(<Base, Height>); // = 6.403124...
//#declare Hypotenuse = sqrt(Base^2 + Height^2); // = 6.403124...
//Maybe you'll have to write it like this in POV-Ray v3.1:
//#declare Hypotenuse = sqrt(pow(Base, 2) + pow(Height, 2));
#declare Angle1 = atan2(Height, Base); // = 0.674741... radians
//#declare Angle1 = atan(Height/Base); // = 0.674741... radians
//#declare Angle1 = acos(Base/Hypotenuse); // = 0.674741... radians
//#declare Angle1 = asin(Height/Hypotenuse); // = 0.674741... radians
#declare Angle2 = pi/2 - Angle1; // = 0.896055... radians
//#declare Angle2 = atan2(Base, Height); // = 0.896055... radians
//#declare Angle2 = atan(Base/Height); // = 0.896055... radians
//#declare Angle2 = acos(Height/Hypotenuse); // = 0.896055... radians
//#declare Angle2 = asin(Base/Hypotenuse); // = 0.896055... radians
#debug "\n"
#debug str(Hypotenuse, 0, -1)
#debug "\n\n"
#debug str(Angle1, 0, -1)
#debug "\n"
#debug str(degrees(Angle1), 0, -1)
#debug "\n\n"
#debug str(Angle2, 0, -1)
#debug "\n"
#debug str(degrees(Angle2), 0, -1)
#debug "\n\n"
Post a reply to this message
|
|
|
|
> I have a triangle with a single right
> angle (iscoseles(sp) triangle? I'm guessing at this point...). The base
of
> the triangle is 5 units wide, and the height is 4 units. Given we know
the
> base/height angle is 90 degress and the length of the base and width, I'd
> like to know:
>
> 1) The length of the hypotenuse (I think that's what it's called).
> 2) The degree measurement of the other two angles.
>
Some more information:
Law of Sines
sin(Angle1)/Angle1=sin(Angle2)/Angle2=sin(Angle3)/Angle3
Angle1/sin(Angle1)=Angle2/sin(Angle2)=Angle3/sin(Angle3)
You can also use the law of cosines but I forget that one right now.
Post a reply to this message
|
|