generating point equal distance on a oval

Started by
14 comments, last by DeadlyPencil 20 years ago
this is what it should look like i think



[edited by - stickman on April 16, 2004 3:42:43 PM]

oops the last oval drawing is wrong, but i think u get the idea

[edited by - stickman on April 16, 2004 3:45:41 PM]
Advertisement
well that raises the question: equal distance in what system? equal distance along the oval or equal distance in worldspace?

not that it seems like the OP is still watching his own thread (pretty annoying habit btw), but the latter might be quite hard. equal distance in worldspace would be a rather straightforward solving of the distance and oval formula.
afterburn that is not what i need, equal angles will not work with ovals. the drawing stickman did is correct except that last picture which he stated was wrong.

iam making a edge detector and the person will have to put an oval around the object, this is a project for school. iam suppose to implement the edge detector the way the person did it in the paper. so anyways the person was using ovals so iam required to do ovals. all the points must be close to being equal distance for the edge detection to work(its the way the algorithm works). all the points must be the same disance away from its neighboring points. the distance between each point will be set by the user. this will also i believe cause a problem with the last point generated because the distance they pick wont match the oval perfectly... so it might have to be generated outside of the circle to make it equal distance... but of course i dont have a clue how to do this.... so i need your help

[edited by - DeadlyPencil on April 16, 2004 5:44:17 PM]
This is so trivial...

Pick a point on the ellipse, any point will do. Now compute a circle of radius R, centered at the point. Compute the intersection between the ellipse and the circle. This will give you 2 points a distance R from the original point. You can choose either one (or both). Repeat the process as necessary.
i have thought of this before. problem is you can accually get way more than 2 intersections with a skinny oval. also there is more things to take into consideration... i cant just choose any point i find with that radius... what if i go forwards than backwards, even if discard the last point generated because that will be a intercept for the next radius it is still posible to go backwards if i get into a situation with 4 intercepts... that could cause an infinite loop, or a really messed up oval. also when would i stop generating the points?

[edited by - DeadlyPencil on April 16, 2004 6:20:35 PM]
quote:Original post by DeadlyPencil
i have thought of this before. problem is you can accually get way more than 2 intersections with a skinny oval. also there is more things to take into consideration... i cant just choose any point i find with that radius... what if i go forwards than backwards, even if discard the last point generated because that will be a intercept for the next radius it is still posible to go backwards if i get into a situation with 4 intercepts... that could cause an infinite loop, or a really messed up oval. also when would i stop generating the points?

<SPAN CLASS=editedby>[edited by - DeadlyPencil on April 16, 2004 6:20:35 PM]</SPAN>


No, you can''t get ''way'' more. The maximum you can get is 4 intersections. You can solve for each one and choose the one in the right direction. How do you know what direction to choose? A good first start would be taking the derivative of the ellipse in polar coordinates. This will give you the slope for all 2-4 intersection points, which you can then use to choose the appropriate one.

Obviously, you stop when your first point is less than a distance R from your most recently computed point.

Of course, the spacing will not be constant for the last point, as you pointed out. There''s no way around that. You can''t give the user the freedom to choose the number of points, and yet have the spacing be equal. It doesn''t work that way.

This topic is closed to new replies.

Advertisement