Math : 2008年7月

運動量保存の法則の公式

質量 : M
速度 : V
衝突後の速度(運動量保存) : VF

VF1 = ((M1 - M2) * V1 + 2 * M2 * V2) / (M1 + M2)
VF2 = (V1 - V2) + VF1

カテゴリ:Math

タグ:,

Post at 2008年07月13日 01:11 | Permalink


2点(2つの座標)間の角度を求める。

Aの座標 : (AX,AY)
Bの座標 : (BX,BY)
X座標での2点間の距離 : DX
Y座標での2点間の距離 : DY
角度(ラジアン) : Angle

DX = AX - BX
DY = AY -BY
Angle = Math.atan2(DY,DX)

カテゴリ:Math

タグ:

Post at 2008年07月07日 22:13 | Permalink


2点(2つの座標)間の距離の距離を求める。

Aの座標 : (AX,AY)
Bの座標 : (BX,BY)
X座標での2点間の距離 : DX
Y座標での2点間の距離 : DY
距離 : D

DX = AX - BX
DY = AY -BY
D = Math.sqrt(DX * DX + DY * DY)

カテゴリ:Math

タグ:

Post at 2008年07月07日 22:01 | Permalink


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

オブジェクトの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 | Permalink

1


Math : 月別アーカイブ



Feed


Powered by Movable Type 4.27-ja

Hosted by heteml