【发布时间】:2012-02-23 11:11:18
【问题描述】:
我想在J2ME的椭圆曲线上画一个点
我有 X、Y、宽度、高度和 t 的值。
X 和 Y 是椭圆(根据 J2ME)相对于 Canvas 的位置,t 是相对于椭圆中心(我有一个问题的图像表示,但不幸的博客不允许插入讨论:))
int ePX = (X + width)+ (int) (width * Math.cos(Math.toRadians(t)));
int ePY = (Y + height)+ (int) (height * -Math.sin(Math.toRadians(t)));
这个等式正确吗?或者对于椭圆,我们需要进行更多计算吗?
【问题讨论】:
标签: math java-me geometry ellipse