1
0
Fork 0
mirror of https://gitlab.rlp.net/mobitar/ReCo.jl.git synced 2024-09-19 19:01:17 +00:00

Fixed center_of_mass graphics

This commit is contained in:
MoBit 2021-12-03 14:56:45 +01:00
parent ea1d06e02b
commit dbbe3222bf

View file

@ -15,14 +15,14 @@ A = -0.9 * L
B = 0.65 * L
pr = 0.03 * L
Ap_array = project_to_unit_circle(A, L)
Bp_array = project_to_unit_circle(B, L)
for p in (Ap_array, Bp_array)
Ap_vec = Vector(project_to_unit_circle(A, L))
Bp_vec = Vector(project_to_unit_circle(B, L))
for p in (Ap_vec, Bp_vec)
p[2] *= -1
end
Ap = Point(Ap_array)
Bp = Point(Bp_array)
Ap = Point(Ap_vec[1], Ap_vec[2])
Bp = Point(Bp_vec[1], Bp_vec[2])
M = R * ((Ap + Bp) / 2)