【问题标题】:Get points on ellipse arc获取椭圆弧上的点
【发布时间】:2013-07-30 09:22:02
【问题描述】:

如何获得积分以添加相同的间隔?

此代码适用于 theta 以固定值递增的圆

for (theta = 0 -> 360 degrees)
{r = ellipse_equation(theta);

x = r*cos(theta) + h;
y = r*sin(theta) + k;
}

但是如果椭圆的增量是固定的,则变成不相同的间隔

【问题讨论】:

    标签: ios core-graphics


    【解决方案1】:

    这对我来说看起来不对:

    x = r*cos(theta) + h;
    y = r*sin(theta) + k;
    

    不应该是这样的

    x = cos(theta) * h;
    y = sin(theta) * k;
    

    ?

    您能否澄清一下“相同的间隔”是什么意思?

    编辑: 我认为没有一种“简单”的方法可以得到你想要的。与圆不同,椭圆的周长无法简单计算:http://en.wikipedia.org/wiki/Ellipse#Circumferencehttp://en.wikipedia.org/wiki/Elliptic_integral

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2010-12-20
      • 2015-08-06
      • 1970-01-01
      • 2016-03-03
      • 2017-12-19
      • 1970-01-01
      • 2017-03-11
      相关资源
      最近更新 更多