How can I generate a set of points evenly distributed along the perimeter of an ellipse?

后端 未结 8 726
庸人自扰
庸人自扰 2020-12-15 22:28

If I want to generate a bunch of points distributed uniformly around a circle, I can do this (python):

r = 5  #rad         


        
8条回答
  •  甜味超标
    2020-12-15 22:48

    You have to calculate the perimeter, then divide it into equal length arcs. The length of an arc of an ellipse is an elliptic integral and cannot be written in closed form so you need numerical computation.

    The article on ellipses on wolfram gives you the formula needed to do this, but this is going to be ugly.

提交回复
热议问题