# unit circle - ellipse

This topic is 5399 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

For the circle, we all know that the blue point is (cos(theta), sin(theta)). On the ellipse, I'm trying to think of a way to define the blue point in terms of theta. Here's what I tried: ( cos(theta)*XRadius, sin(theta)*YRadius ) But this didn't work. Any ideas?

##### Share on other sites
The parameterization (x = a cos Θ, y = b sin Θ) will work, in that it will trace out the ellipse for 0 <= Θ < 2π, except that the angle between the vector connecting the origin to (x, y) and the x-axis will NOT be Θ. If you really need a point in terms of Θ, then you'll have to go back to cartesian coordinates and then back again to polar coordinates:

(x / a)2 + (y / b)2 = 1
(r cos Θ / a)2 + (r sin Θ / b)2 = 1
r2 * (cos2 Θ / a2 + sin2 Θ / b2) = 1
r = 1 / sqrt(cos2 Θ / a2 + sin2 Θ / b2)
x = r cos Θ
y = r sin Θ

It's not pretty, which is why your original parameterization is best.

##### Share on other sites
Sorry, should be:

• 21
• 16
• 9
• 17
• 13
×

## Important Information

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!