ChazAshley
New member
- Joined
- Mar 7, 2017
- Messages
- 2
Hello there.
Let's say we have a turret at the center of an ellipse. And when this turret turns, we want to get a point on the edge of the ellipse which the turret points on.
If we have kinda fat ellipse with radius = 2 along X axis, and radius = 1 along Y axis, we can get each point of ellipse like this
x=2*cos(theta)
y=1*sin(theta)
And when I calculate a point by equations above, it doesn't return the right point. I kinda understand, that by multiplying cos(theta) by 2 we just stretch a circle, and all points stretch as well.
When I asked smart people about this, they gave me the soultion - use ellipse equation in polar coordinates. The equation returns radius, so by multiplying cos(theta) and sin(theta) by that radius i'm able to get the right point.
Here is link to some animation that shows the difference in the point calcuated with and without using polar equation of ellipse.
https://www.desmos.com/calculator/cs9u28uxg0
The purple point is the point calculated with using polar equation of ellipse.
Could someone explain me why does this work like this, please?
Let's say we have a turret at the center of an ellipse. And when this turret turns, we want to get a point on the edge of the ellipse which the turret points on.
If we have kinda fat ellipse with radius = 2 along X axis, and radius = 1 along Y axis, we can get each point of ellipse like this
x=2*cos(theta)
y=1*sin(theta)
And when I calculate a point by equations above, it doesn't return the right point. I kinda understand, that by multiplying cos(theta) by 2 we just stretch a circle, and all points stretch as well.
When I asked smart people about this, they gave me the soultion - use ellipse equation in polar coordinates. The equation returns radius, so by multiplying cos(theta) and sin(theta) by that radius i'm able to get the right point.
Here is link to some animation that shows the difference in the point calcuated with and without using polar equation of ellipse.
https://www.desmos.com/calculator/cs9u28uxg0
The purple point is the point calculated with using polar equation of ellipse.
Could someone explain me why does this work like this, please?