円運動

オブジェクトを円運動させる公式

オブジェクトのX座標 = X
オブジェクトのY座標 = Y
円の中心のX座標 = CenterX
円の中心のY座標 = CenterY
角度(ラジアン) = Angle
横半径 = RadiusX
縦半径 = RadiusY
回転速度 = VR

X = CenterX + Math.cos(Angle) + RadiusX
Y = CenterY + Math.sin(Angle) + RadiusY
Angle += VR

RadiusX = RadiusY の時、正円運動。

カテゴリ:Math

タグ:,

Post at 2008年07月07日 21:28





Feed


Powered by Movable Type 4.27-ja

Hosted by heteml