How to space objects evenly around an ellipse?

Discussion in 'Physics & Math' started by Jennifer Murphy, Feb 28, 2013.

  1. Jennifer Murphy Registered Senior Member

    Messages:
    239
    If I want to place n objects evenly spaced about the circumference of a circle, I just divide 360 by n and place each object that many degrees apart. If I have 9 objects to place, I put them every 40 degrees.

    Is there a simple say to do that for an ellipse? The formula would be more complex and wold need to take into account the major and minor axes.
     
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. eram Sciengineer Valued Senior Member

    Messages:
    1,877
    Do you want to place the 9 objects such that they "slice" the ellipse's perimeter into nine arcs of identical length?


    If so, I have a very cumbersome method.

    First try to find the ellipse perimeter.
    http://www.mathsisfun.com/geometry/ellipse-perimeter.html


    The use line integration.
    http://www.mathwords.com/a/arc_length_of_a_curve.htm


    With good numerical approximation you should be able to pinpoint the position of the object and hence find the angle which you would place it. Not the easiest method I guess.
     
  4. Google AdSense Guest Advertisement



    to hide all adverts.
  5. Jennifer Murphy Registered Senior Member

    Messages:
    239
    I want to place the objects on the perimeter so that they appear evenly spaced to the human eye. I'm not sure if having equal lengths along the perimeter would do that or having equal line segments between the objects. I suspect the latter.

    The links you provided are similar to ones I found myself. They are way more complicated than I can deal with for this task. Would it be any easier to calculate n points around the perimeter such that the line segments connecting adjacent points are equal?

    If not, I'll just eyeball it.
     
  6. Google AdSense Guest Advertisement



    to hide all adverts.
  7. leopold Valued Senior Member

    Messages:
    17,455
    you could do it that way.
    a more general way is to measure the circumference in whatever units you choose then divide that by the number of objects you wish to use.
    works for ellipses too.
    each point on the circumference is represented by an X and Y coordinate.
    at least that is what i used to draw various types of curves on a computer screen.

    the "starting point" for most things like this is due "due east" and proceeds counterclockwise.
    90 degrees would be "due north".
    just a general rule mostly followed.
     
  8. brucep Valued Senior Member

    Messages:
    4,098
    Think in terms of distance over the entire path of the ellipse. It's the same for an ellipse and a circle with the mean radius of the ellipse.
     
  9. eram Sciengineer Valued Senior Member

    Messages:
    1,877
    mathematically that is very complex since we have 9 points to consider. if this for some kind of mathematical diagram or artwork?
     
  10. Jennifer Murphy Registered Senior Member

    Messages:
    239
    So I am learning. I had no idea ellipses were so much more complex than circles.

    It's for an illustration. It doesn't need to be exact. I did the first few visually. But that got me wondering.
     
  11. Tach Banned Banned

    Messages:
    5,265
    They are.
     
  12. eram Sciengineer Valued Senior Member

    Messages:
    1,877
    Yeah, for a circle you can just inscribe a regular nonagon.


    Like abstract art? In that case you can "flatten" a circle with a nonagon in it. Should be aesthetically pleasing enough.


    If you still want equal line segments, first choose a point, like one of the antipodal points. Find an equation for the length of a line that stretches between the antipodal point and a point on the ellipse.
    It shouldn't be too hard to find the intersection point between the line and the ellipse for a given length of the line segment.

    Then after finding this intersection point repeat the above process to find a 3rd point. Do this for all the points and you should get 9 equations, which can be condensed into one super long question.
    The equation's solution is for the final line segment (of given length) intersect both the 9th point and the original antipodal point. So you can solve this complex equation and see what length each line segment should be.

    It is too much for me to write in Tex, and a solution might not even exist. Still, you can try.
     
  13. RJBeery Natural Philosopher Valued Senior Member

    Messages:
    4,222
    How would one extend this question to the surface of spheres? If I wanted to place 12 objects on the surface of a sphere how could the problem be tackled mathematically so as to "evenly distribute" them? I'm not even sure how to phrase the question; does "evenly distribute" in this case mean to minimize the RMS distance between all respective objects?
     
  14. wellwisher Banned Banned

    Messages:
    5,160
    An ellipse is the locus of points equally distance from two foci. So, you place two sticks in the ground and have a rope loop to trace the ellipse as shown below. Next, measure the length of the rope loop, and divide that length by nine, putting tape at each 1/9 point. Make your ellipse again placing an object at each piece of tape.

    Please Register or Log in to view the hidden image!

     
  15. eram Sciengineer Valued Senior Member

    Messages:
    1,877
    You can define "evenly distribute" any way you want to. However, note that a solution may not exist.


    yeah, could be done.
     
  16. leopold Valued Senior Member

    Messages:
    17,455
    interesting question.
    you can use 2 points 180 degrees apart but not 3, you can also use 4 such points 120 degrees apart.
    don't know about other points.
     
  17. RJBeery Natural Philosopher Valued Senior Member

    Messages:
    4,222
    I was hoping that one of the math geeks would have a proper analysis for this in their back pockets.
     
  18. brucep Valued Senior Member

    Messages:
    4,098
    For your query the answer is equal line segments. It's really simple. The total distance over the path of the ellipse is equivalent to the distance over a circular path with the same mean radius as the ellipse. Both paths cover 360 degrees. Both paths cover the same distance over the 360 degrees. Break it down into equidistant line segments.
     
  19. Jennifer Murphy Registered Senior Member

    Messages:
    239
    I think you are right about the line segments, but I do not think it is simple at all. I would love to have you prove me wrong.

    Are saying that the perimeter of an ellipse with semi-major axes of R1 & R2 is the same as the perimeter of a circle with radius (R1+R2)/2? This is only true when R1=R2, in which case the ellipse is a circle.

    At the other extreme, when R2=0, the ellipse is a (double) straight line. The perimeter of the ellipse is 4R1. The mean (average) radius = (R1+R2)/2 = (R1+0)/2 = R1/2. The perimeter of a circle with radius = R1/2 is pi x R1, which is about 78% of the perimeter of the ellipse.

    Yes

    The same angular distance, but not the same linear or arc distance.

    Yes, I believe this is the solution. I don't think there is a simple way to do it.

    I have attached an illustration showing an ellipse with R1=5, R2=3 and a circle with the mean radius = 4. I've segmented both with 9 radii at 40° intervals and then connected the points where they intercept the perimeter with line segments. In the circle, these form a regular nonagon. In the ellipse, they form an irregular nonagon.

    I think the solution is to inscribe a equilateral nonagon inside the ellipse. I don't know how to do that.
     
  20. AlphaNumeric Fully ionized Registered Senior Member

    Messages:
    6,702
    As has already been eluded to it depends what you mean by 'equally spaced'. One interpretation is they are equally spaced in the 2d plane the ellipse is embedded in. Another would be that there's an equal length of ellipse arc between each.

    I'll have a think if there's some slick way of doing both of those, sounds like a nice little problem.
     
  21. Jennifer Murphy Registered Senior Member

    Messages:
    239
    View attachment 6124 View attachment 6125 As I have said, what I mean by "equally spaced" is (a) on the perimeter and (b) appearing to the eye to be equally spaced. Mathematically, I think that means "located at the vertices of an inscribed equilateral polygon".

    I know several methods that do not work.

    I tried dividing the ellipse into wedges subtending equal angles (like a pie). Each angle = 360/n. This works for circles. The more eccentric the ellipse, the less evenly spaced the points.

    I tried deforming (squashing or stretching) a regular polygon or a circle sliced like a pie. Again, the more eccentric the ellipse, the worse the result.

    I thought I had a clever way of achieving equal distances around the perimeter. The idea was based on the method of drawing an ellipse using two pins and a string. The string represents the equal distance of each point on the perimeter from the two foci. Given these parameters (refer to attached illustration):
    Code:
    a = semi-major axis
    b = semi-minor axis
    f = focal point (distance from center, the blue line segments)
    P = a point on the perimeter of the ellipse
    d1 = the distance from one focal point to P
    n = the number of points to be placed equally-spaced around the perimeter of the ellipse
    
    View attachment 6119
    The total length of the string, S1, is 2a:
    Code:
    S1 = 2a
    
    Now let's find out how much of the string actually touches the perimeter. We'll call this S2.

    The d1 piece is shortest when point P is at (a,0). At that point,
    Code:
    d1 = a-f (the green line segments)
    
    and it is longest when P is at (-a,0). At that point,
    Code:
    d1 = a+f
    
    So of the total length of the string, the part that actually touches the perimeter is length 2f:
    Code:
    S2 = a+f - (a-f) = a+f-a+f = 2f (the blue line segment)
    
    It seemed to me that if we stopped the pen every 2f/n units of the string as it travels around the perimeter of the ellipse, we would have points that are equally spaced on that perimeter.

    Now we need to figure out how to locate those points. Here's the approach I used. I think it works. There may be something simpler.

    If I can calculate either x or y, I can get the other using the general equation for an ellipse. If I choose a value for d1, I have the three sides of the triangle with the vertex at the point I want.
    View attachment 6120
    The three sides are 2f, d1, & d2. Using Heron's formula, I can calculate the area.
    Code:
    s = (a+b+c)/2
    area = sqrt(s(s-a)(s-b)(s-c))
    
    But area is also:
    Code:
    area = 1/2 x base x height
    
    I know the base (2f), so now I can calculate the height, which is the y value.
    Code:
    area = bh/2
    h = y = (2 x area) / b = (2 x area) / 2f = area/f
    
    Now that I have y, I can calculate x by solving the general equation of an ellipse for x:
    Code:
    (x/a)^2 + (y/b)^2 = 1
    x = (a/b)sqrt(b^2-x^2)
    
    I set up a spreadsheet to test the results. It allows me to enter the axes (a,b) and the number of points to place (n). The calculations only cover the top half of the perimeter, since the placement is symmetrical. Therefore, the string length (S2) is divided by n/2. This is also because the pen travels along the variable length of the string twice, once across the top and again across the bottom.

    All of these tests are with a 5,4 ellipse.

    In the first test, I placed 4 points. They should be at the ends of the axes.
    Code:
    	5	a = Semi-major axis			
    	4	b = Semi-minor axis			
    	3	f = sqrt(a^2 - b^2) = foci			
    	2	dmin = Minimum value for d			
    	8	dmax = Maximum value for d			
    	10	S1 = Total length of the string (2a)			
    	6	S2 = Variable part of string (dmax-dmin)			
    					
    	4	n = Number of points to place			
    	2	div = n / 2 Divisions in top half			
    	3	di = Length of each piece of the string			
    					
    n	d1	d2	Area	y	x
    0	2.00	8.00	0.00	0.00	5.00
    1	5.00	5.00	12.00	4.00	0.00
    2	8.00	2.00	0.00	0.00	-5.00
    
    The variable part of the string is 6 units long, so it gets divided in half. The resulting points are (5,0), (0,4), (-5,0), & (0,-4), which is correct.

    The next test is with n=8, twice as many points. We should get one point in between each of the pairs above:
    Code:
    	5	a = Semi-major axis			
    	4	b = Semi-minor axis			
    	3	f = sqrt(a^2 - b^2) = foci			
    	2	dmin = Minimum value for d			
    	8	dmax = Maximum value for d			
    	10	S1 = Total length of the string (2a)			
    	6	S2 = Variable part of string (dmax-dmin)			
    					
    	8	n = Number of points to place			
    	4	div = n / 2 Divisions in top half			
    	1.5	di = Length of each piece of the string			
    					
    n	d1	d2	Area	y	x
    0	2.00	8.00	0.00	0.00	5.00
    1	3.50	6.50	10.39	3.46	2.50
    2	5.00	5.00	12.00	4.00	0.00
    3	6.50	3.50	10.39	3.46	-2.50
    4	8.00	2.00	0.00	0.00	-5.00
    
    The points are (5,0), (2.5,3.46), (0,4), (-2.5,3.46), (-5,0), (-2.5,-3.46), (0,-4), & (2.5, -3.46). This doesn't look right. The second x value (2.5) is exactly half way between the first and third. I think it should be closer to x=5, because of the steeper slope of the ellipse near the ends. I'm not sure if I made a mistake or what.

    I'll post one more set of results with n=9.
    Code:
    	5	a = Semi-major axis			
    	4	b = Semi-minor axis			
    	3	f = sqrt(a^2 - b^2) = foci			
    	2	dmin = Minimum value for d			
    	8	dmax = Maximum value for d			
    	10	S1 = Total length of the string (2a)			
    	6	S2 = Variable part of string (dmax-dmin)			
    					
    	9	n = Number of points to place			
    	4.5	div = n / 2 Divisions in top half			
    	1.33	di = Length of each piece of the string			
    					
    n	d1	d2	Area	y	x
    0	2.00	8.00	0.00	0.00	5.00
    1	3.33	6.67	9.98	3.33	2.78
    2	4.67	5.33	11.93	3.98	0.56
    3	6.00	4.00	11.31	3.77	-1.67
    4	7.33	2.67	7.54	2.51	-3.89
    
    I'm not sure what went wrong here. But even if did achieve equal linear distances on the perimeter, I don't think it would result in the visual appearance of equally spaced. For that, I think an inscribed equilateral polygon is needed.

    PS: I tried to insert the illustrations inline, but they did not show up using Preview. Maybe they will in the final post. Just in case, I have attached them below, too (I hope).
     
  22. Aqueous Id flat Earth skeptic Valued Senior Member

    Messages:
    6,152
    The particular case of 12 equidistant points defines a dodecahedron, with one object centered on each of the 12 pentagonal faces.
     
  23. eram Sciengineer Valued Senior Member

    Messages:
    1,877
    Jennifer, I think two of your attachments are invalid.
     

Share This Page