POV-Ray : Newsgroups : povray.general : Mathematics question Server Time
7 Nov 2024 17:27:15 EST (-0500)
  Mathematics question (Message 1 to 6 of 6)  
From: Dan Byers
Subject: Mathematics question
Date: 23 Jan 2002 23:58:49
Message: <B874F12C.9271%goofygrafx@aol.com>
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'
triangle.jpg


 

From: Tim Cook
Subject: Re: Mathematics question
Date: 24 Jan 2002 00:12:14
Message: <3C4F979E.E63D8FA@scifi-fantasy.com>
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

From: Phil Clute
Subject: Re: Mathematics question
Date: 24 Jan 2002 00:46:49
Message: <3C4F9F6B.7000308@tiac.net>
> 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

From: Tor Olav Kristensen
Subject: Re: Mathematics question
Date: 24 Jan 2002 02:05:48
Message: <3C4FB1CA.EE743332@hotmail.com>
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

From: N Shomber
Subject: Re: Mathematics question
Date: 24 Jan 2002 15:18:34
Message: <3c506c1a@news.povray.org>
> 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

From: Andrea Ryan
Subject: Re: Mathematics question
Date: 25 Jan 2002 21:11:06
Message: <3C520EB1.D979E5F3@global2000.net>
> 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.

The law of cosines is the more general version of a^2+b^2=c^2.

Here it is:

c^2 = a^2 + b^2 - 2ab * cos C

Where the angle C is the side opposite from the side c.  A and b are the
other
sides.  It works with angles that are not right angles.  If the angle C
is 90
degrees, the term -2ab*cosC disappears because the cosine of 90 degrees
is 0
and you get c^2 = a^2 + b^2.

You could also write the law of cosines as:

a^2 = b^2 + c^2 - 2bc * cos A    where angle A is opposite from side a

and:

b^2 = a^2 + c^2 - 2ac * cos B    where angle B is opposite from side b.

Brendan


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.