Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Bennettovia

Ellipse Calculation

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

If you intended to correct an error in the post then please contact us.

Recommended Posts

Pretty basic question. I''m calculating some points, I''m going to draw lines to each point to ultimately make an ellipse. Now I''m using the standard mathematical ellipse equation for this with a centre point an x radius and y radius. I''m pretty sure though that this method is flawed, and there is an easier method involving triangles. Basically I know there is a way to do this, for example if you take two stakes, put them in the gound, wrap a string around and put a pencil in the string, then pull the pencil until the string is taut, you can draw an ellipse. Since the string is always in a triangluar shape during this, this method must be possible Anyway. I was just wondering what the *best* method for ellipse calculation was in ppls opinions.

Share this post


Link to post
Share on other sites
Advertisement
i think the eq is the best, i dont think u cant program smth to strech a string as much as it can and put a pixel at that location

if u want to fill it then do this:

lets say r < R (the radiuses), where r is perpendicular to Ox

get the points on the right and left sides of r and draw a line between them, then go to the next ones.

Share this post


Link to post
Share on other sites
Thanks, filling is no problem.

I wasn''t referring to actually simulating the string thing, I just know its possible with triangles because of that.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!