- KVKV-X
計算
2D
2点間の距離と角度 (LinearPtoP)
KV

KV-X

KV-X
入力
- pointA
- 点1 [x,y]
- pointB
- 点2 [x,y]
出力
- distance
- 距離
- angle
- 角度
【例】
pointA = [-6.0, -3.0]
pointB = [5.0, 4.0]
distance = 13.038
angle = 32.471
【 計算式 】
\[ \begin{aligned} distance &= \sqrt{(p2_x-p1_x)^{2}+(p2_y-p1_y)^{2}} \\ angle &= tan~{-1}\left( \frac{p2_y-p1_y}{p2_x-p1_x}\right) \end{aligned} \] 計算式ではp1[0]を\(p1_x\)、p1[1]を\(p1_y\)と記述しています
2直線の交点と角度 (Intersection)
KV

KV-X

KV-X
入力
- Line1
- 線1 [x1, y1, x2, y2]
- Line2
- 線2 [x1, y1, x2, y2]
出力
- point
- 交点 [x, y]
- angle
- 角度
【例】
Line1 始点X [0,0] = -10.0
Line1 始点Y [0,1] = -7.0
Line1 終点X [1,0] = 10.0
Line1 終点X [1,1] = 3.0
Line2 始点X [0,0] = -10.0
Line2 始点Y [0,1] = 13.4
Line2 終点X [1,0] = 10.0
Line2 終点X [1,1] = -10.6
point [2, -1]
angle = -76.759
L1,L2から \[ \begin{align} point_x = &\frac{(b2-b1)}{(a1-a2)} \\ point_y = &a1*point_x+b1 \\ angle=&tan^{-1}\left(\frac{a2-a1}{1+a1*a2} \right) \end{align} \]
原点を中心に回転 (PointRotate)
KV

KV-X

KV-X
入力
- point
- 点 [x,y]
- angle
- 回転角度
出力
- out_point
- 移動後の座標
【例】
point [4, 4]
angle = 90
out_point [-4, 4]
3点を通る円の中心 (GetCenter2D)
KV

KV-X

KV-X
入力
- pointA
- 点A [x,y]
- pointB
- 点B [x,y]
- pointC
- 点C [x,y]
出力
- point0
- 中心 [x,y]
- radius
- 半径
【例】
pointA [-4, 2]
pointB [3, -1]
pointC [1, 6]
point0 [0.128, 1.965]
radius 4.128




