1
0
Fork 0
mirror of https://gitlab.rlp.net/mobitar/ReCo.jl.git synced 2025-09-04 09:12:35 +00:00

Removed minimum_image

This commit is contained in:
Mo8it 2022-01-27 18:48:25 +01:00
parent acebf489b7
commit 01e989c6bb
6 changed files with 15 additions and 34 deletions

View file

@ -12,7 +12,7 @@ function gen_COM_graphics()
A = -0.9 * L
B = 0.65 * L
pr = 0.03 * L
particel_radius = 0.04 * L
Ap_vec = Vector(ReCo.Shape.project_to_unit_circle(A, L))
Bp_vec = Vector(ReCo.Shape.project_to_unit_circle(B, L))
@ -62,11 +62,11 @@ function gen_COM_graphics()
setcolor("blue")
for p in (A, B)
circle(Point(p, 0), pr, :fill)
circle(Point(p, 0), particel_radius, :fill)
end
setcolor("brown")
circle(Point(COM, 0), pr, :fill)
circle(Point(COM, 0), particel_radius, :fill)
setcolor("black")
fontsize(5)
@ -106,7 +106,7 @@ function gen_COM_graphics()
setcolor("blue")
for pp in (Ap, Bp)
circle(R * pp, pr, :fill)
circle(R * pp, particel_radius, :fill)
end
setcolor("black")
@ -115,10 +115,10 @@ function gen_COM_graphics()
line(Point(0, 0), COMp, :stroke)
setcolor("purple1")
circle(M, pr, :fill)
circle(M, particel_radius, :fill)
setcolor("brown")
circle(COMp, pr, :fill)
circle(COMp, particel_radius, :fill)
finish()

View file

@ -77,15 +77,15 @@ function gen_periodic_boundary_conditions_graphics()
setcolor("black")
setline(1.0)
for sign in (1, -1)
for line_factor in (-3, -1, 1, 3)
line(
Point(sign * drwaing_box_length / 6, drwaing_box_length / 2),
Point(sign * drwaing_box_length / 6, -drwaing_box_length / 2),
Point(line_factor * drwaing_box_length / 6, drwaing_box_length / 2),
Point(line_factor * drwaing_box_length / 6, -drwaing_box_length / 2),
:stroke,
)
line(
Point(drwaing_box_length / 2, sign * drwaing_box_length / 6),
Point(-drwaing_box_length / 2, sign * drwaing_box_length / 6),
Point(drwaing_box_length / 2, line_factor * drwaing_box_length / 6),
Point(-drwaing_box_length / 2, line_factor * drwaing_box_length / 6),
:stroke,
)
end
@ -96,7 +96,7 @@ function gen_periodic_boundary_conditions_graphics()
p1_c = particles[p1_ind].c
p2_c = particles[p2_ind].c
normal_vec_form_p1_to_p2 = p2_c - p1_c
min_image_vec = ReCo.minimum_image(normal_vec_form_p1_to_p2, half_box_len)
min_image_vec = ReCo.restrict_coordinates(normal_vec_form_p1_to_p2, half_box_len)
min_image_vec_from_p1 = p1_c + min_image_vec
setcolor("black")