From 9c24f48c378d578a87f6647d62877a19febba89d Mon Sep 17 00:00:00 2001 From: Ian Jauslin Date: Sat, 3 Oct 2020 00:51:21 -0400 Subject: As presented at the AMS Fall Sectional Meeting on 2020-10-03 --- figs/atoms.fig/liquid.py | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 figs/atoms.fig/liquid.py (limited to 'figs/atoms.fig/liquid.py') diff --git a/figs/atoms.fig/liquid.py b/figs/atoms.fig/liquid.py new file mode 100644 index 0000000..99b09ba --- /dev/null +++ b/figs/atoms.fig/liquid.py @@ -0,0 +1,39 @@ +#!/usr/bin/env python3 + +from math import * +import random + +# size of space +L=15 +# number of particles +N=100 + +# check whether two rods overlap +def check_overlap(sphere1,sphere2): + if(sqrt((sphere2[0]-sphere1[0])**2+(sphere2[1]-sphere1[1])**2+(sphere2[2]-sphere1[2])**2)<2): + return(True) + return(False) + +# configuration +config=[] +# add spheres +while len(config)