Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Discussion / ellipse equation

Author
Message
That1Smart Guy
16
Years of Service
User Offline
Joined: 26th Feb 2009
Location: Somewhere...... yep
Posted: 28th May 2009 06:57
what was the sin/cos equation for an ellipse?

There are only 10 kinds of people in the world, those who understand binary and those who dont
Latch
18
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 28th May 2009 11:11
yrad=value
xrad=value

for angle to 360
x=xrad*cos(angle)+xcenter
y=yrad*sin(angle)+ycenter

Enjoy your day.
That1Smart Guy
16
Years of Service
User Offline
Joined: 26th Feb 2009
Location: Somewhere...... yep
Posted: 28th May 2009 22:20
tnx, I can never seem to remember which is sin and which is cos

There are only 10 kinds of people in the world, those who understand binary and those who dont
BN2 Productions
21
Years of Service
User Offline
Joined: 22nd Jan 2004
Location:
Posted: 28th May 2009 23:11
The easy way to remember it is SOHCAHTOA

SOH means:
Sine=Opposite/Hypotenuse

CAH means:
Cosine=Adjacent/Hypotenuse

TOA means:
Tangent=Opposite/Adjacent

The opposite/adjacent are refering to the side lengths opposite and adjacent to the angle. In this case, the angle would be the angle that the line from the center to the dot on the circle/ellipse makes with the x axis.
How this applies:
The right triangle formed making the dot (from center to the point straight down to the X axis and back to the center) has these sides:

Line from center to dot: Radius of circle=hypotenuse
Line from dot to X axis: Y value of the dot=Opposite
Line from Xaxis to center: X value of the dot=Adjacent

So, if sin=Opposite/Hypotenuse, then sin=Y/R. Therefore, Y=r*sin
The same goes with x.

Make sense at all?

Great Quote:
"Time...LINE??? Time isn't made out of lines...it is made out of circles. That is why clocks are round!" -Caboose
That1Smart Guy
16
Years of Service
User Offline
Joined: 26th Feb 2009
Location: Somewhere...... yep
Posted: 28th May 2009 23:33
ya I went through basic trig including sohcahtoa in geo this year, but I couldnt visualize the triangle in my head, I knew the dot and center were part of it but I wasnt sure if the 3rd coordinate was on the x axis or y axis, but now I know, thanks!

There are only 10 kinds of people in the world, those who understand binary and those who dont

Login to post a reply

Server time is: 2025-05-14 17:31:29
Your offset time is: 2025-05-14 17:31:29