mirror of
https://gitlab.rlp.net/mobitar/ReCo.jl.git
synced 2024-11-08 22:21:08 +00:00
Fixed center_of_mass graphics
This commit is contained in:
parent
ea1d06e02b
commit
dbbe3222bf
1 changed files with 5 additions and 5 deletions
|
@ -15,14 +15,14 @@ A = -0.9 * L
|
||||||
B = 0.65 * L
|
B = 0.65 * L
|
||||||
pr = 0.03 * L
|
pr = 0.03 * L
|
||||||
|
|
||||||
Ap_array = project_to_unit_circle(A, L)
|
Ap_vec = Vector(project_to_unit_circle(A, L))
|
||||||
Bp_array = project_to_unit_circle(B, L)
|
Bp_vec = Vector(project_to_unit_circle(B, L))
|
||||||
for p in (Ap_array, Bp_array)
|
for p in (Ap_vec, Bp_vec)
|
||||||
p[2] *= -1
|
p[2] *= -1
|
||||||
end
|
end
|
||||||
|
|
||||||
Ap = Point(Ap_array)
|
Ap = Point(Ap_vec[1], Ap_vec[2])
|
||||||
Bp = Point(Bp_array)
|
Bp = Point(Bp_vec[1], Bp_vec[2])
|
||||||
|
|
||||||
M = R * ((Ap + Bp) / 2)
|
M = R * ((Ap + Bp) / 2)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue