# Demonstration of jumping surfaces, used to create holes in spheres
# File was written by Alexandra Jilkine and modified by Steve Andrews

graphics opengl
graphic_iter 1

dim 3
boundaries x -20 20
boundaries y -10 10
boundaries z -10 10

species U

difc U(back) 1
difc U(soln) 100
color U(back) red
color U(soln) green

molecule_lists list1 list2
mol_list U(soln) list1
mol_list U(back) list2 

display_size U(all) 5

time_start 0
time_stop 100
time_step 0.001

frame_thickness 0

start_surface dumbbell
action both U reflect
color both grey
polygon both edge
rate U bsoln back 1		# enable to see surface diffusion
rate U back bsoln 10
panel cyl -5.1 0 0  5.1 0 0  1 30 30 c1
panel sph -10 0 0 5 30 30 s1
panel sph 10 0 0 5 30 30 s2
neighbors c1 s1
neighbors c1 s2
end_surface


start_surface jumpsurface
action both all jump
color both blue
polygon both edge
panel disk -5.2 0 0 1  1 0 0  10 d1a
panel disk -4.9 0 0 1  1 0 0  10 d1b
panel disk 4.9 0 0 1  -1 0 0  10 d2a
panel disk 5.2 0 0 1  -1 0 0  10 d2b
jump d1a back <-> d1b front
jump d2a front <-> d2b back
end_surface


start_compartment left
surface dumbbell
point -10 0 0
end_compartment

start_compartment middle
surface dumbbell
point 0 0.5 0.5
end_compartment

start_compartment right
surface dumbbell
point 10 0 0
end_compartment


compartment_mol 500 U(solution) left

cmd b pause


end_file



