From: Sam Moore Date: Mon, 3 Sep 2012 13:40:45 +0000 (+0800) Subject: Parallel Programming - Start assignment 1 X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=297f83fd160c68e52981004624723c22d60a2c0e;p=matches%2Fhonours.git Parallel Programming - Start assignment 1 Needed a -lGLU in the linker flags all along, derp --- diff --git a/course/semester2/pprog/assignment1/Makefile b/course/semester2/pprog/assignment1/Makefile new file mode 100644 index 00000000..cd6f0fee --- /dev/null +++ b/course/semester2/pprog/assignment1/Makefile @@ -0,0 +1,45 @@ +INCLUDE_PATH = -I/usr/include +LIBRARY_PATH = -L/usr/lib64 +CCFLAGS = -std=c99 #-framework GLUT -framework OpenGL -framework Cocoa +LDFLAGS = -lglut -lGL -lGLU -lpthread -lm + +# the directories containing the OpenGL libraries, f90gl libraries, GLUT +# libraries, and f90gl GLUT libraries +OGLLIBDIR = -L/usr/X11/lib + +# the fortran 90 libraries for OpenGL, including GLUT, GLU and OpenGL +F90GLUTLIB = -lf90glut -lf90GLU -lf90GL + +# the X11 libraries +X11LIB = -framework GLUT -framework OpenGL -framework Cocoa + +# the f90 compiler flag for specifying the location of MOD files +MODS = -I/usr/X11/include/GL + +# the directory containing the X11 libraries +X11LIBDIR = + +# fortran 90 compiler and compiler flags +F95 = g95 +F90 = /usr/local/gfortran/bin/gfortran +F90FLAGS = -O +F90FLAGS2 = -fopenmp -O +GCC = gcc + +APP = nbody + +all: $(APP) + @echo Make done + +#%: %.c +# gcc $^ -o $@ $(INCLUDE_PATH) $(CCFLAGS) $(LIBRARY_PATH) $(LDFLAGS) + +clean: + @rm -f *.o $(APP) + +nbodyf: nbodyf.f90 + $(F90) nbodyf.f90 -o nbodyf $(F90FLAGS) $(MODS) $(OGLLIBDIR) $(F90GLUTLIB) $(X11LIBDIR) $(X11LIB) + +nbody: nbody.c + $(GCC) -o nbody nbody.c $(INCLUDE_PATH) $(CCFLAGS) $(LIBRARY_PATH) $(LDFLAGS) + diff --git a/course/semester2/pprog/assignment1/bodiesfield_10 b/course/semester2/pprog/assignment1/bodiesfield_10 new file mode 100644 index 00000000..6ef79370 --- /dev/null +++ b/course/semester2/pprog/assignment1/bodiesfield_10 @@ -0,0 +1,11 @@ +10 +1e11 0 0 0 0 0 0 +1e7 -7.000000 73.000000 0.000000 0.800000 0.076712 0.003000 +1e7 -23.000000 -40.000000 0.200000 0.400000 -0.230000 0.003000 +1e7 -27.000000 40.000000 -0.300000 0.800000 0.540000 0.002000 +1e7 -60.000000 99.000000 -0.600000 0.400000 0.242424 0.001000 +1e7 -12.000000 -10.000000 -0.900000 0.800000 -0.960000 0.001000 +1e7 67.000000 93.000000 -0.500000 0.600000 -0.432258 0.001000 +1e7 -94.000000 -1.000000 0.800000 0.600000 -56.400000 0.001000 +1e7 24.000000 -30.000000 0.200000 0.800000 0.640000 0.004000 +1e7 -1.000000 77.000000 -0.800000 0.600000 0.007792 0.001000 diff --git a/course/semester2/pprog/assignment1/bodiesfield_100 b/course/semester2/pprog/assignment1/bodiesfield_100 new file mode 100644 index 00000000..72a4325a --- /dev/null +++ b/course/semester2/pprog/assignment1/bodiesfield_100 @@ -0,0 +1,101 @@ +100 +1e11 0 0 0 0 0 0 +1e7 -7.000000 73.000000 0.000000 0.800000 0.076712 0.003000 +1e7 -23.000000 -40.000000 0.200000 0.400000 -0.230000 0.003000 +1e7 -27.000000 40.000000 -0.300000 0.800000 0.540000 0.002000 +1e7 -60.000000 99.000000 -0.600000 0.400000 0.242424 0.001000 +1e7 -12.000000 -10.000000 -0.900000 0.800000 -0.960000 0.001000 +1e7 67.000000 93.000000 -0.500000 0.600000 -0.432258 0.001000 +1e7 -94.000000 -1.000000 0.800000 0.600000 -56.400000 0.001000 +1e7 24.000000 -30.000000 0.200000 0.800000 0.640000 0.004000 +1e7 -1.000000 77.000000 -0.800000 0.600000 0.007792 0.001000 +1e7 -35.000000 65.000000 0.300000 0.200000 0.107692 0.004000 +1e7 15.000000 -29.000000 -0.700000 0.200000 0.103448 0.004000 +1e7 51.000000 -88.000000 0.500000 0.400000 0.231818 0.001000 +1e7 -16.000000 38.000000 -0.100000 0.200000 0.084211 0.003000 +1e7 37.000000 -77.000000 0.400000 0.800000 0.384416 0.001000 +1e7 -45.000000 35.000000 -0.200000 0.600000 0.771429 0.002000 +1e7 -60.000000 94.000000 0.500000 0.600000 0.382979 0.001000 +1e7 6.000000 -42.000000 0.200000 0.400000 0.057143 0.001000 +1e7 95.000000 -71.000000 -0.000000 0.600000 0.802817 0.002000 +1e7 16.000000 -40.000000 0.500000 0.400000 0.160000 0.003000 +1e7 -95.000000 -54.000000 0.900000 0.200000 -0.351852 0.001000 +1e7 23.000000 13.000000 0.800000 0.200000 -0.353846 0.004000 +1e7 66.000000 26.000000 0.300000 0.800000 -2.030769 0.001000 +1e7 -50.000000 -23.000000 -0.500000 0.400000 -0.869565 0.004000 +1e7 -47.000000 -96.000000 0.300000 0.800000 -0.391667 0.003000 +1e7 -35.000000 25.000000 -0.200000 0.800000 1.120000 0.002000 +1e7 -44.000000 18.000000 -0.200000 0.200000 0.488889 0.003000 +1e7 -69.000000 -53.000000 0.500000 0.400000 -0.520755 0.001000 +1e7 -8.000000 -61.000000 0.500000 0.200000 -0.026230 0.001000 +1e7 -67.000000 -74.000000 -0.600000 0.400000 -0.362162 0.001000 +1e7 94.000000 -55.000000 -0.700000 0.600000 1.025455 0.004000 +1e7 -80.000000 55.000000 0.300000 0.200000 0.290909 0.003000 +1e7 -49.000000 44.000000 -0.800000 0.200000 0.222727 0.004000 +1e7 -3.000000 31.000000 -0.900000 0.800000 0.077419 0.001000 +1e7 -29.000000 54.000000 -0.700000 0.400000 0.214815 0.001000 +1e7 0.000000 -64.000000 0.800000 0.200000 0.000000 0.001000 +1e7 76.000000 -54.000000 -0.400000 0.600000 0.844444 0.001000 +1e7 -78.000000 -9.000000 -0.300000 0.400000 -3.466667 0.002000 +1e7 73.000000 5.000000 0.300000 0.200000 -2.920000 0.001000 +1e7 0.000000 -70.000000 0.600000 0.200000 0.000000 0.003000 +1e7 57.000000 78.000000 -0.700000 0.600000 -0.438462 0.004000 +1e7 -19.000000 -33.000000 0.000000 0.600000 -0.345455 0.002000 +1e7 31.000000 -89.000000 0.700000 0.600000 0.208989 0.001000 +1e7 54.000000 -15.000000 0.000000 0.200000 0.720000 0.001000 +1e7 7.000000 1.000000 -0.500000 0.600000 -4.200000 0.004000 +1e7 93.000000 54.000000 -0.700000 0.800000 -1.377778 0.001000 +1e7 63.000000 -17.000000 -0.900000 0.400000 1.482353 0.004000 +1e7 -95.000000 -73.000000 -0.800000 0.600000 -0.780822 0.004000 +1e7 6.000000 24.000000 -0.300000 0.400000 -0.100000 0.001000 +1e7 -50.000000 -80.000000 0.000000 0.600000 -0.375000 0.003000 +1e7 3.000000 50.000000 -0.000000 0.400000 -0.024000 0.004000 +1e7 49.000000 -49.000000 -0.000000 0.600000 0.600000 0.001000 +1e7 -40.000000 -50.000000 0.900000 0.200000 -0.160000 0.004000 +1e7 -30.000000 76.000000 0.400000 0.200000 0.078947 0.001000 +1e7 64.000000 -98.000000 -0.000000 0.200000 0.130612 0.001000 +1e7 5.000000 18.000000 -0.900000 0.200000 -0.055556 0.001000 +1e7 -12.000000 -88.000000 0.800000 0.800000 -0.109091 0.001000 +1e7 -57.000000 90.000000 -0.000000 0.600000 0.380000 0.001000 +1e7 60.000000 3.000000 -0.700000 0.200000 -4.000000 0.001000 +1e7 -99.000000 -71.000000 -0.400000 0.200000 -0.278873 0.002000 +1e7 48.000000 15.000000 -0.500000 0.200000 -0.640000 0.001000 +1e7 39.000000 -5.000000 -0.300000 0.200000 1.560000 0.001000 +1e7 4.000000 98.000000 0.000000 0.200000 -0.008163 0.002000 +1e7 -52.000000 -98.000000 0.100000 0.200000 -0.106122 0.001000 +1e7 -28.000000 -61.000000 0.000000 0.600000 -0.275410 0.003000 +1e7 27.000000 -11.000000 -0.400000 0.400000 0.981818 0.002000 +1e7 -95.000000 42.000000 -0.600000 0.800000 1.809524 0.001000 +1e7 -97.000000 3.000000 0.800000 0.200000 6.466667 0.001000 +1e7 10.000000 -5.000000 0.100000 0.200000 0.400000 0.004000 +1e7 -65.000000 36.000000 0.500000 0.400000 0.722222 0.004000 +1e7 76.000000 76.000000 0.700000 0.800000 -0.800000 0.001000 +1e7 10.000000 11.000000 0.800000 0.800000 -0.727273 0.001000 +1e7 -67.000000 18.000000 0.500000 0.600000 2.233333 0.004000 +1e7 -34.000000 40.000000 0.000000 0.200000 0.170000 0.003000 +1e7 -48.000000 11.000000 0.400000 0.400000 1.745455 0.001000 +1e7 45.000000 15.000000 -0.000000 0.400000 -1.200000 0.004000 +1e7 -47.000000 -93.000000 0.900000 0.800000 -0.404301 0.001000 +1e7 -25.000000 -58.000000 -0.000000 0.200000 -0.086207 0.002000 +1e7 46.000000 43.000000 -0.600000 0.800000 -0.855814 0.001000 +1e7 47.000000 -59.000000 -0.500000 0.400000 0.318644 0.004000 +1e7 89.000000 -34.000000 -0.900000 0.200000 0.523529 0.001000 +1e7 -61.000000 -19.000000 0.300000 0.600000 -1.926316 0.004000 +1e7 -4.000000 -79.000000 -0.100000 0.800000 -0.040506 0.001000 +1e7 21.000000 6.000000 0.300000 0.400000 -1.400000 0.001000 +1e7 -54.000000 17.000000 -0.900000 0.400000 1.270588 0.002000 +1e7 -79.000000 16.000000 -0.200000 0.800000 3.950000 0.003000 +1e7 -3.000000 61.000000 -0.600000 0.400000 0.019672 0.001000 +1e7 55.000000 -94.000000 0.100000 0.600000 0.351064 0.002000 +1e7 32.000000 91.000000 0.200000 0.200000 -0.070330 0.003000 +1e7 39.000000 99.000000 -0.500000 0.600000 -0.236364 0.002000 +1e7 -86.000000 50.000000 -0.300000 0.200000 0.344000 0.003000 +1e7 -11.000000 92.000000 -0.900000 0.800000 0.095652 0.001000 +1e7 -36.000000 -57.000000 -0.800000 0.200000 -0.126316 0.003000 +1e7 -76.000000 91.000000 0.100000 0.200000 0.167033 0.001000 +1e7 90.000000 64.000000 -0.400000 0.200000 -0.281250 0.002000 +1e7 79.000000 37.000000 -0.100000 0.200000 -0.427027 0.002000 +1e7 32.000000 -54.000000 -0.700000 0.400000 0.237037 0.001000 +1e7 19.000000 -77.000000 0.600000 0.800000 0.197403 0.002000 +1e7 59.000000 90.000000 0.800000 0.800000 -0.524444 0.003000 +1e7 -50.000000 -95.000000 -0.100000 0.200000 -0.105263 0.001000 diff --git a/course/semester2/pprog/assignment1/bodiesfield_500 b/course/semester2/pprog/assignment1/bodiesfield_500 new file mode 100644 index 00000000..65a13606 --- /dev/null +++ b/course/semester2/pprog/assignment1/bodiesfield_500 @@ -0,0 +1,501 @@ +500 +1e11 0 0 0 0 0 0 +1e7 -7.000000 73.000000 0.000000 0.800000 0.076712 0.003000 +1e7 -23.000000 -40.000000 0.200000 0.400000 -0.230000 0.003000 +1e7 -27.000000 40.000000 -0.300000 0.800000 0.540000 0.002000 +1e7 -60.000000 99.000000 -0.600000 0.400000 0.242424 0.001000 +1e7 -12.000000 -10.000000 -0.900000 0.800000 -0.960000 0.001000 +1e7 67.000000 93.000000 -0.500000 0.600000 -0.432258 0.001000 +1e7 -94.000000 -1.000000 0.800000 0.600000 -56.400000 0.001000 +1e7 24.000000 -30.000000 0.200000 0.800000 0.640000 0.004000 +1e7 -1.000000 77.000000 -0.800000 0.600000 0.007792 0.001000 +1e7 -35.000000 65.000000 0.300000 0.200000 0.107692 0.004000 +1e7 15.000000 -29.000000 -0.700000 0.200000 0.103448 0.004000 +1e7 51.000000 -88.000000 0.500000 0.400000 0.231818 0.001000 +1e7 -16.000000 38.000000 -0.100000 0.200000 0.084211 0.003000 +1e7 37.000000 -77.000000 0.400000 0.800000 0.384416 0.001000 +1e7 -45.000000 35.000000 -0.200000 0.600000 0.771429 0.002000 +1e7 -60.000000 94.000000 0.500000 0.600000 0.382979 0.001000 +1e7 6.000000 -42.000000 0.200000 0.400000 0.057143 0.001000 +1e7 95.000000 -71.000000 -0.000000 0.600000 0.802817 0.002000 +1e7 16.000000 -40.000000 0.500000 0.400000 0.160000 0.003000 +1e7 -95.000000 -54.000000 0.900000 0.200000 -0.351852 0.001000 +1e7 23.000000 13.000000 0.800000 0.200000 -0.353846 0.004000 +1e7 66.000000 26.000000 0.300000 0.800000 -2.030769 0.001000 +1e7 -50.000000 -23.000000 -0.500000 0.400000 -0.869565 0.004000 +1e7 -47.000000 -96.000000 0.300000 0.800000 -0.391667 0.003000 +1e7 -35.000000 25.000000 -0.200000 0.800000 1.120000 0.002000 +1e7 -44.000000 18.000000 -0.200000 0.200000 0.488889 0.003000 +1e7 -69.000000 -53.000000 0.500000 0.400000 -0.520755 0.001000 +1e7 -8.000000 -61.000000 0.500000 0.200000 -0.026230 0.001000 +1e7 -67.000000 -74.000000 -0.600000 0.400000 -0.362162 0.001000 +1e7 94.000000 -55.000000 -0.700000 0.600000 1.025455 0.004000 +1e7 -80.000000 55.000000 0.300000 0.200000 0.290909 0.003000 +1e7 -49.000000 44.000000 -0.800000 0.200000 0.222727 0.004000 +1e7 -3.000000 31.000000 -0.900000 0.800000 0.077419 0.001000 +1e7 -29.000000 54.000000 -0.700000 0.400000 0.214815 0.001000 +1e7 0.000000 -64.000000 0.800000 0.200000 0.000000 0.001000 +1e7 76.000000 -54.000000 -0.400000 0.600000 0.844444 0.001000 +1e7 -78.000000 -9.000000 -0.300000 0.400000 -3.466667 0.002000 +1e7 73.000000 5.000000 0.300000 0.200000 -2.920000 0.001000 +1e7 0.000000 -70.000000 0.600000 0.200000 0.000000 0.003000 +1e7 57.000000 78.000000 -0.700000 0.600000 -0.438462 0.004000 +1e7 -19.000000 -33.000000 0.000000 0.600000 -0.345455 0.002000 +1e7 31.000000 -89.000000 0.700000 0.600000 0.208989 0.001000 +1e7 54.000000 -15.000000 0.000000 0.200000 0.720000 0.001000 +1e7 7.000000 1.000000 -0.500000 0.600000 -4.200000 0.004000 +1e7 93.000000 54.000000 -0.700000 0.800000 -1.377778 0.001000 +1e7 63.000000 -17.000000 -0.900000 0.400000 1.482353 0.004000 +1e7 -95.000000 -73.000000 -0.800000 0.600000 -0.780822 0.004000 +1e7 6.000000 24.000000 -0.300000 0.400000 -0.100000 0.001000 +1e7 -50.000000 -80.000000 0.000000 0.600000 -0.375000 0.003000 +1e7 3.000000 50.000000 -0.000000 0.400000 -0.024000 0.004000 +1e7 49.000000 -49.000000 -0.000000 0.600000 0.600000 0.001000 +1e7 -40.000000 -50.000000 0.900000 0.200000 -0.160000 0.004000 +1e7 -30.000000 76.000000 0.400000 0.200000 0.078947 0.001000 +1e7 64.000000 -98.000000 -0.000000 0.200000 0.130612 0.001000 +1e7 5.000000 18.000000 -0.900000 0.200000 -0.055556 0.001000 +1e7 -12.000000 -88.000000 0.800000 0.800000 -0.109091 0.001000 +1e7 -57.000000 90.000000 -0.000000 0.600000 0.380000 0.001000 +1e7 60.000000 3.000000 -0.700000 0.200000 -4.000000 0.001000 +1e7 -99.000000 -71.000000 -0.400000 0.200000 -0.278873 0.002000 +1e7 48.000000 15.000000 -0.500000 0.200000 -0.640000 0.001000 +1e7 39.000000 -5.000000 -0.300000 0.200000 1.560000 0.001000 +1e7 4.000000 98.000000 0.000000 0.200000 -0.008163 0.002000 +1e7 -52.000000 -98.000000 0.100000 0.200000 -0.106122 0.001000 +1e7 -28.000000 -61.000000 0.000000 0.600000 -0.275410 0.003000 +1e7 27.000000 -11.000000 -0.400000 0.400000 0.981818 0.002000 +1e7 -95.000000 42.000000 -0.600000 0.800000 1.809524 0.001000 +1e7 -97.000000 3.000000 0.800000 0.200000 6.466667 0.001000 +1e7 10.000000 -5.000000 0.100000 0.200000 0.400000 0.004000 +1e7 -65.000000 36.000000 0.500000 0.400000 0.722222 0.004000 +1e7 76.000000 76.000000 0.700000 0.800000 -0.800000 0.001000 +1e7 10.000000 11.000000 0.800000 0.800000 -0.727273 0.001000 +1e7 -67.000000 18.000000 0.500000 0.600000 2.233333 0.004000 +1e7 -34.000000 40.000000 0.000000 0.200000 0.170000 0.003000 +1e7 -48.000000 11.000000 0.400000 0.400000 1.745455 0.001000 +1e7 45.000000 15.000000 -0.000000 0.400000 -1.200000 0.004000 +1e7 -47.000000 -93.000000 0.900000 0.800000 -0.404301 0.001000 +1e7 -25.000000 -58.000000 -0.000000 0.200000 -0.086207 0.002000 +1e7 46.000000 43.000000 -0.600000 0.800000 -0.855814 0.001000 +1e7 47.000000 -59.000000 -0.500000 0.400000 0.318644 0.004000 +1e7 89.000000 -34.000000 -0.900000 0.200000 0.523529 0.001000 +1e7 -61.000000 -19.000000 0.300000 0.600000 -1.926316 0.004000 +1e7 -4.000000 -79.000000 -0.100000 0.800000 -0.040506 0.001000 +1e7 21.000000 6.000000 0.300000 0.400000 -1.400000 0.001000 +1e7 -54.000000 17.000000 -0.900000 0.400000 1.270588 0.002000 +1e7 -79.000000 16.000000 -0.200000 0.800000 3.950000 0.003000 +1e7 -3.000000 61.000000 -0.600000 0.400000 0.019672 0.001000 +1e7 55.000000 -94.000000 0.100000 0.600000 0.351064 0.002000 +1e7 32.000000 91.000000 0.200000 0.200000 -0.070330 0.003000 +1e7 39.000000 99.000000 -0.500000 0.600000 -0.236364 0.002000 +1e7 -86.000000 50.000000 -0.300000 0.200000 0.344000 0.003000 +1e7 -11.000000 92.000000 -0.900000 0.800000 0.095652 0.001000 +1e7 -36.000000 -57.000000 -0.800000 0.200000 -0.126316 0.003000 +1e7 -76.000000 91.000000 0.100000 0.200000 0.167033 0.001000 +1e7 90.000000 64.000000 -0.400000 0.200000 -0.281250 0.002000 +1e7 79.000000 37.000000 -0.100000 0.200000 -0.427027 0.002000 +1e7 32.000000 -54.000000 -0.700000 0.400000 0.237037 0.001000 +1e7 19.000000 -77.000000 0.600000 0.800000 0.197403 0.002000 +1e7 59.000000 90.000000 0.800000 0.800000 -0.524444 0.003000 +1e7 -50.000000 -95.000000 -0.100000 0.200000 -0.105263 0.001000 +1e7 57.000000 -28.000000 -0.300000 0.800000 1.628571 0.001000 +1e7 -3.000000 75.000000 -0.000000 0.400000 0.016000 0.004000 +1e7 -63.000000 89.000000 -0.500000 0.800000 0.566292 0.004000 +1e7 63.000000 52.000000 0.600000 0.200000 -0.242308 0.001000 +1e7 50.000000 -41.000000 -0.600000 0.200000 0.243902 0.004000 +1e7 -28.000000 -48.000000 -0.300000 0.800000 -0.466667 0.003000 +1e7 -19.000000 20.000000 0.900000 0.200000 0.190000 0.001000 +1e7 13.000000 38.000000 0.400000 0.600000 -0.205263 0.001000 +1e7 80.000000 -96.000000 -0.000000 0.600000 0.500000 0.003000 +1e7 -52.000000 24.000000 0.000000 0.400000 0.866667 0.003000 +1e7 98.000000 45.000000 0.900000 0.800000 -1.742222 0.003000 +1e7 -90.000000 -43.000000 0.500000 0.200000 -0.418605 0.001000 +1e7 51.000000 -51.000000 0.300000 0.400000 0.400000 0.004000 +1e7 98.000000 -37.000000 0.800000 0.400000 1.059459 0.001000 +1e7 -60.000000 -40.000000 0.600000 0.400000 -0.600000 0.003000 +1e7 69.000000 23.000000 -0.300000 0.200000 -0.600000 0.001000 +1e7 78.000000 -94.000000 -0.600000 0.200000 0.165957 0.001000 +1e7 -44.000000 76.000000 0.200000 0.800000 0.463158 0.004000 +1e7 19.000000 71.000000 -0.300000 0.800000 -0.214085 0.003000 +1e7 54.000000 81.000000 -0.800000 0.800000 -0.533333 0.004000 +1e7 79.000000 -61.000000 -0.300000 0.600000 0.777049 0.004000 +1e7 80.000000 83.000000 -0.600000 0.400000 -0.385542 0.004000 +1e7 39.000000 -51.000000 -0.600000 0.200000 0.152941 0.004000 +1e7 -27.000000 -81.000000 0.600000 0.200000 -0.066667 0.001000 +1e7 72.000000 98.000000 -0.700000 0.800000 -0.587755 0.001000 +1e7 -90.000000 -12.000000 -0.200000 0.200000 -1.500000 0.001000 +1e7 -21.000000 28.000000 -0.000000 0.800000 0.600000 0.002000 +1e7 94.000000 -32.000000 -0.700000 0.400000 1.175000 0.002000 +1e7 -83.000000 53.000000 0.100000 0.600000 0.939623 0.001000 +1e7 0.000000 20.000000 -0.900000 0.800000 -0.000000 0.001000 +1e7 70.000000 99.000000 0.800000 0.400000 -0.282828 0.003000 +1e7 0.000000 -40.000000 -0.500000 0.200000 0.000000 0.004000 +1e7 -78.000000 61.000000 0.800000 0.200000 0.255738 0.001000 +1e7 70.000000 51.000000 -0.900000 0.800000 -1.098039 0.001000 +1e7 -72.000000 -25.000000 -0.000000 0.600000 -1.728000 0.001000 +1e7 69.000000 94.000000 0.200000 0.800000 -0.587234 0.001000 +1e7 19.000000 -62.000000 0.500000 0.800000 0.245161 0.001000 +1e7 22.000000 93.000000 -0.200000 0.200000 -0.047312 0.003000 +1e7 23.000000 -39.000000 0.300000 0.600000 0.353846 0.001000 +1e7 -71.000000 55.000000 0.900000 0.200000 0.258182 0.002000 +1e7 12.000000 47.000000 0.100000 0.200000 -0.051064 0.003000 +1e7 -36.000000 -7.000000 -0.600000 0.400000 -2.057143 0.001000 +1e7 -40.000000 -57.000000 -0.500000 0.200000 -0.140351 0.003000 +1e7 94.000000 -38.000000 0.500000 0.400000 0.989474 0.003000 +1e7 62.000000 36.000000 0.300000 0.800000 -1.377778 0.002000 +1e7 19.000000 -28.000000 -0.200000 0.200000 0.135714 0.002000 +1e7 72.000000 1.000000 0.800000 0.200000 -14.400000 0.003000 +1e7 -0.000000 -92.000000 0.300000 0.200000 -0.000000 0.004000 +1e7 21.000000 -13.000000 -0.100000 0.800000 1.292308 0.001000 +1e7 56.000000 54.000000 -0.400000 0.400000 -0.414815 0.001000 +1e7 -97.000000 60.000000 -0.100000 0.800000 1.293333 0.003000 +1e7 77.000000 -84.000000 -0.000000 0.800000 0.733333 0.004000 +1e7 9.000000 -64.000000 -0.200000 0.800000 0.112500 0.002000 +1e7 83.000000 59.000000 -0.300000 0.200000 -0.281356 0.001000 +1e7 -53.000000 -96.000000 0.100000 0.200000 -0.110417 0.003000 +1e7 20.000000 87.000000 -0.200000 0.200000 -0.045977 0.004000 +1e7 51.000000 45.000000 0.400000 0.200000 -0.226667 0.002000 +1e7 -26.000000 -44.000000 -0.900000 0.800000 -0.472727 0.003000 +1e7 48.000000 -17.000000 0.800000 0.800000 2.258824 0.001000 +1e7 68.000000 -99.000000 0.900000 0.600000 0.412121 0.001000 +1e7 19.000000 37.000000 -0.800000 0.600000 -0.308108 0.003000 +1e7 20.000000 -61.000000 -0.800000 0.200000 0.065574 0.001000 +1e7 78.000000 -63.000000 0.600000 0.600000 0.742857 0.004000 +1e7 -19.000000 77.000000 0.300000 0.600000 0.148052 0.001000 +1e7 -71.000000 4.000000 -0.200000 0.200000 3.550000 0.001000 +1e7 68.000000 10.000000 0.000000 0.200000 -1.360000 0.001000 +1e7 -79.000000 -27.000000 -0.300000 0.200000 -0.585185 0.004000 +1e7 -83.000000 -84.000000 -0.600000 0.800000 -0.790476 0.003000 +1e7 -86.000000 -24.000000 0.400000 0.400000 -1.433333 0.001000 +1e7 10.000000 5.000000 -0.200000 0.200000 -0.400000 0.001000 +1e7 6.000000 60.000000 0.300000 0.200000 -0.020000 0.001000 +1e7 -85.000000 84.000000 0.000000 0.200000 0.202381 0.001000 +1e7 99.000000 -28.000000 0.700000 0.400000 1.414286 0.004000 +1e7 -78.000000 89.000000 -0.500000 0.800000 0.701124 0.001000 +1e7 21.000000 14.000000 -0.600000 0.200000 -0.300000 0.004000 +1e7 1.000000 -44.000000 0.800000 0.200000 0.004545 0.001000 +1e7 20.000000 -24.000000 -0.800000 0.400000 0.333333 0.001000 +1e7 14.000000 -99.000000 0.300000 0.800000 0.113131 0.004000 +1e7 21.000000 36.000000 -0.200000 0.600000 -0.350000 0.001000 +1e7 -88.000000 -38.000000 -0.100000 0.200000 -0.463158 0.002000 +1e7 -92.000000 75.000000 -0.300000 0.200000 0.245333 0.001000 +1e7 -47.000000 32.000000 -0.800000 0.800000 1.175000 0.001000 +1e7 -54.000000 -37.000000 -0.100000 0.800000 -1.167568 0.004000 +1e7 -16.000000 38.000000 0.300000 0.200000 0.084211 0.001000 +1e7 24.000000 -63.000000 -0.200000 0.400000 0.152381 0.001000 +1e7 36.000000 8.000000 0.100000 0.200000 -0.900000 0.004000 +1e7 12.000000 -37.000000 -0.500000 0.200000 0.064865 0.001000 +1e7 -8.000000 -39.000000 0.900000 0.800000 -0.164103 0.001000 +1e7 -15.000000 22.000000 -0.000000 0.200000 0.136364 0.001000 +1e7 25.000000 -94.000000 -0.200000 0.200000 0.053191 0.001000 +1e7 -34.000000 -81.000000 -0.800000 0.400000 -0.167901 0.001000 +1e7 -51.000000 42.000000 -0.500000 0.400000 0.485714 0.003000 +1e7 -22.000000 -41.000000 0.900000 0.200000 -0.107317 0.004000 +1e7 55.000000 64.000000 -0.300000 0.600000 -0.515625 0.004000 +1e7 -55.000000 81.000000 -0.400000 0.200000 0.135802 0.001000 +1e7 -64.000000 -22.000000 0.300000 0.600000 -1.745455 0.004000 +1e7 -88.000000 39.000000 0.300000 0.800000 1.805128 0.002000 +1e7 17.000000 -82.000000 -0.900000 0.200000 0.041463 0.004000 +1e7 -10.000000 15.000000 -0.200000 0.200000 0.133333 0.002000 +1e7 -8.000000 -99.000000 0.300000 0.200000 -0.016162 0.001000 +1e7 -2.000000 -53.000000 0.600000 0.800000 -0.030189 0.002000 +1e7 -3.000000 -29.000000 0.200000 0.400000 -0.041379 0.004000 +1e7 -26.000000 -55.000000 0.200000 0.400000 -0.189091 0.004000 +1e7 -86.000000 79.000000 -0.000000 0.200000 0.217722 0.003000 +1e7 -27.000000 -98.000000 -0.700000 0.200000 -0.055102 0.001000 +1e7 63.000000 83.000000 -0.200000 0.200000 -0.151807 0.001000 +1e7 -42.000000 53.000000 0.000000 0.200000 0.158491 0.002000 +1e7 -10.000000 58.000000 0.300000 0.800000 0.137931 0.001000 +1e7 62.000000 54.000000 0.600000 0.200000 -0.229630 0.001000 +1e7 -77.000000 58.000000 -0.000000 0.400000 0.531034 0.001000 +1e7 62.000000 37.000000 -0.700000 0.400000 -0.670270 0.003000 +1e7 -58.000000 -43.000000 -0.100000 0.400000 -0.539535 0.001000 +1e7 17.000000 24.000000 -0.900000 0.200000 -0.141667 0.001000 +1e7 51.000000 -22.000000 -0.500000 0.200000 0.463636 0.004000 +1e7 31.000000 23.000000 0.400000 0.600000 -0.808696 0.001000 +1e7 -59.000000 -65.000000 -0.700000 0.600000 -0.544615 0.001000 +1e7 24.000000 -75.000000 0.900000 0.200000 0.064000 0.003000 +1e7 57.000000 61.000000 0.400000 0.200000 -0.186885 0.001000 +1e7 86.000000 -43.000000 0.800000 0.400000 0.800000 0.004000 +1e7 -25.000000 63.000000 0.000000 0.800000 0.317460 0.002000 +1e7 -14.000000 -89.000000 -0.500000 0.800000 -0.125843 0.001000 +1e7 -8.000000 -49.000000 0.900000 0.200000 -0.032653 0.003000 +1e7 85.000000 -18.000000 -0.900000 0.600000 2.833333 0.003000 +1e7 -59.000000 74.000000 0.500000 0.200000 0.159459 0.004000 +1e7 15.000000 13.000000 0.200000 0.600000 -0.692308 0.001000 +1e7 47.000000 6.000000 -0.600000 0.800000 -6.266667 0.001000 +1e7 70.000000 17.000000 0.400000 0.600000 -2.470588 0.002000 +1e7 98.000000 56.000000 -0.200000 0.200000 -0.350000 0.004000 +1e7 -4.000000 73.000000 -0.900000 0.800000 0.043836 0.002000 +1e7 -31.000000 -33.000000 0.000000 0.400000 -0.375758 0.004000 +1e7 71.000000 20.000000 -0.800000 0.400000 -1.420000 0.002000 +1e7 13.000000 56.000000 0.400000 0.200000 -0.046429 0.003000 +1e7 49.000000 -25.000000 0.100000 0.400000 0.784000 0.001000 +1e7 -54.000000 1.000000 0.200000 0.200000 10.800000 0.001000 +1e7 -87.000000 -65.000000 -0.100000 0.200000 -0.267692 0.001000 +1e7 -75.000000 -94.000000 0.400000 0.800000 -0.638298 0.004000 +1e7 -23.000000 -77.000000 0.700000 0.800000 -0.238961 0.002000 +1e7 -39.000000 -83.000000 0.000000 0.200000 -0.093976 0.001000 +1e7 -12.000000 38.000000 0.100000 0.400000 0.126316 0.003000 +1e7 60.000000 -87.000000 0.100000 0.800000 0.551724 0.001000 +1e7 95.000000 19.000000 0.300000 0.200000 -1.000000 0.003000 +1e7 93.000000 26.000000 -0.300000 0.200000 -0.715385 0.002000 +1e7 -61.000000 77.000000 0.200000 0.400000 0.316883 0.001000 +1e7 80.000000 51.000000 -0.300000 0.400000 -0.627451 0.001000 +1e7 -65.000000 -39.000000 -0.700000 0.200000 -0.333333 0.001000 +1e7 -25.000000 -27.000000 -0.700000 0.200000 -0.185185 0.004000 +1e7 22.000000 -53.000000 -0.800000 0.800000 0.332075 0.001000 +1e7 77.000000 1.000000 0.100000 0.600000 -46.200000 0.002000 +1e7 49.000000 27.000000 -0.900000 0.200000 -0.362963 0.001000 +1e7 24.000000 -20.000000 -0.900000 0.200000 0.240000 0.001000 +1e7 64.000000 -18.000000 -0.300000 0.800000 2.844444 0.003000 +1e7 -87.000000 13.000000 0.700000 0.400000 2.676923 0.002000 +1e7 62.000000 -40.000000 0.000000 0.200000 0.310000 0.004000 +1e7 20.000000 -17.000000 0.200000 0.200000 0.235294 0.001000 +1e7 -31.000000 -51.000000 0.100000 0.800000 -0.486275 0.002000 +1e7 34.000000 23.000000 0.100000 0.800000 -1.182609 0.001000 +1e7 45.000000 -23.000000 0.900000 0.200000 0.391304 0.002000 +1e7 92.000000 -46.000000 0.500000 0.200000 0.400000 0.004000 +1e7 -17.000000 95.000000 -0.400000 0.200000 0.035789 0.001000 +1e7 -56.000000 -97.000000 -0.900000 0.400000 -0.230928 0.001000 +1e7 -99.000000 20.000000 -0.800000 0.200000 0.990000 0.001000 +1e7 -33.000000 -93.000000 0.800000 0.200000 -0.070968 0.003000 +1e7 -30.000000 -86.000000 -0.900000 0.600000 -0.209302 0.001000 +1e7 -99.000000 14.000000 0.600000 0.600000 4.242857 0.003000 +1e7 -75.000000 55.000000 -0.800000 0.400000 0.545455 0.001000 +1e7 31.000000 -63.000000 0.900000 0.200000 0.098413 0.004000 +1e7 -82.000000 -96.000000 0.100000 0.200000 -0.170833 0.001000 +1e7 20.000000 -51.000000 0.000000 0.400000 0.156863 0.003000 +1e7 15.000000 61.000000 0.300000 0.200000 -0.049180 0.001000 +1e7 52.000000 79.000000 -0.200000 0.400000 -0.263291 0.001000 +1e7 -87.000000 -8.000000 0.600000 0.600000 -6.525000 0.003000 +1e7 88.000000 9.000000 0.300000 0.600000 -5.866667 0.001000 +1e7 -79.000000 74.000000 -0.100000 0.200000 0.213514 0.004000 +1e7 -94.000000 56.000000 -0.600000 0.600000 1.007143 0.004000 +1e7 57.000000 57.000000 -0.600000 0.600000 -0.600000 0.001000 +1e7 10.000000 66.000000 -0.800000 0.600000 -0.090909 0.002000 +1e7 -96.000000 24.000000 -0.800000 0.200000 0.800000 0.002000 +1e7 71.000000 14.000000 -0.900000 0.800000 -4.057143 0.003000 +1e7 94.000000 -27.000000 -0.200000 0.200000 0.696296 0.001000 +1e7 80.000000 9.000000 -0.300000 0.600000 -5.333333 0.004000 +1e7 38.000000 81.000000 0.000000 0.200000 -0.093827 0.003000 +1e7 -74.000000 42.000000 0.000000 0.200000 0.352381 0.004000 +1e7 20.000000 3.000000 -0.000000 0.400000 -2.666667 0.002000 +1e7 70.000000 -42.000000 -0.500000 0.800000 1.333333 0.002000 +1e7 74.000000 90.000000 -0.600000 0.600000 -0.493333 0.002000 +1e7 55.000000 75.000000 0.500000 0.400000 -0.293333 0.001000 +1e7 -37.000000 -83.000000 -0.600000 0.400000 -0.178313 0.002000 +1e7 -51.000000 -5.000000 0.700000 0.200000 -2.040000 0.001000 +1e7 -96.000000 -31.000000 -0.600000 0.200000 -0.619355 0.004000 +1e7 57.000000 -53.000000 -0.000000 0.600000 0.645283 0.004000 +1e7 -82.000000 -63.000000 -0.700000 0.400000 -0.520635 0.001000 +1e7 51.000000 22.000000 0.000000 0.200000 -0.463636 0.004000 +1e7 -17.000000 -39.000000 -0.200000 0.800000 -0.348718 0.003000 +1e7 -83.000000 -65.000000 0.700000 0.400000 -0.510769 0.002000 +1e7 79.000000 63.000000 -0.900000 0.200000 -0.250794 0.003000 +1e7 5.000000 44.000000 0.600000 0.800000 -0.090909 0.004000 +1e7 -88.000000 52.000000 -0.800000 0.200000 0.338462 0.002000 +1e7 -16.000000 45.000000 0.500000 0.600000 0.213333 0.002000 +1e7 5.000000 -54.000000 -0.000000 0.800000 0.074074 0.003000 +1e7 -39.000000 -45.000000 0.800000 0.400000 -0.346667 0.002000 +1e7 91.000000 -98.000000 0.400000 0.200000 0.185714 0.001000 +1e7 33.000000 92.000000 -0.000000 0.600000 -0.215217 0.003000 +1e7 -28.000000 -82.000000 -0.000000 0.200000 -0.068293 0.001000 +1e7 84.000000 47.000000 -0.800000 0.600000 -1.072340 0.003000 +1e7 -74.000000 61.000000 -0.400000 0.800000 0.970492 0.001000 +1e7 44.000000 -47.000000 -0.700000 0.200000 0.187234 0.003000 +1e7 -36.000000 46.000000 0.700000 0.200000 0.156522 0.003000 +1e7 -81.000000 94.000000 -0.400000 0.400000 0.344681 0.003000 +1e7 -17.000000 93.000000 -0.800000 0.400000 0.073118 0.001000 +1e7 80.000000 -26.000000 0.700000 0.400000 1.230769 0.001000 +1e7 38.000000 -45.000000 -0.500000 0.800000 0.675556 0.001000 +1e7 -41.000000 -81.000000 0.500000 0.600000 -0.303704 0.004000 +1e7 -63.000000 1.000000 -0.000000 0.800000 50.400000 0.002000 +1e7 -80.000000 74.000000 -0.600000 0.800000 0.864865 0.003000 +1e7 68.000000 66.000000 0.400000 0.200000 -0.206061 0.002000 +1e7 -15.000000 -41.000000 -0.800000 0.200000 -0.073171 0.001000 +1e7 61.000000 -72.000000 -0.400000 0.800000 0.677778 0.001000 +1e7 16.000000 83.000000 -0.300000 0.800000 -0.154217 0.003000 +1e7 -59.000000 72.000000 -0.200000 0.800000 0.655556 0.003000 +1e7 43.000000 -9.000000 -0.400000 0.200000 0.955556 0.004000 +1e7 83.000000 -85.000000 0.000000 0.800000 0.781176 0.003000 +1e7 33.000000 85.000000 0.500000 0.800000 -0.310588 0.001000 +1e7 -63.000000 3.000000 -0.300000 0.200000 4.200000 0.002000 +1e7 -89.000000 29.000000 0.900000 0.200000 0.613793 0.001000 +1e7 -11.000000 96.000000 -0.400000 0.600000 0.068750 0.002000 +1e7 20.000000 -65.000000 0.200000 0.200000 0.061538 0.001000 +1e7 -0.000000 -18.000000 -0.900000 0.600000 -0.000000 0.001000 +1e7 58.000000 67.000000 -0.100000 0.200000 -0.173134 0.002000 +1e7 -29.000000 91.000000 0.000000 0.400000 0.127473 0.001000 +1e7 -39.000000 84.000000 0.300000 0.600000 0.278571 0.001000 +1e7 -20.000000 -45.000000 -0.900000 0.400000 -0.177778 0.003000 +1e7 -67.000000 -69.000000 -0.900000 0.600000 -0.582609 0.003000 +1e7 -5.000000 -37.000000 0.900000 0.200000 -0.027027 0.001000 +1e7 72.000000 60.000000 -0.900000 0.800000 -0.960000 0.001000 +1e7 -80.000000 58.000000 0.500000 0.200000 0.275862 0.003000 +1e7 45.000000 -95.000000 0.000000 0.400000 0.189474 0.001000 +1e7 82.000000 1.000000 0.500000 0.800000 -65.600000 0.001000 +1e7 5.000000 77.000000 -0.900000 0.800000 -0.051948 0.001000 +1e7 -24.000000 -61.000000 -0.800000 0.400000 -0.157377 0.002000 +1e7 -13.000000 -51.000000 -0.800000 0.200000 -0.050980 0.001000 +1e7 -89.000000 99.000000 -0.400000 0.600000 0.539394 0.001000 +1e7 -47.000000 93.000000 -0.800000 0.200000 0.101075 0.004000 +1e7 53.000000 -87.000000 -0.900000 0.200000 0.121839 0.001000 +1e7 31.000000 49.000000 -0.900000 0.400000 -0.253061 0.004000 +1e7 84.000000 -53.000000 0.800000 0.600000 0.950943 0.003000 +1e7 7.000000 58.000000 -0.500000 0.400000 -0.048276 0.002000 +1e7 29.000000 -60.000000 -0.700000 0.800000 0.386667 0.001000 +1e7 -64.000000 -36.000000 0.100000 0.200000 -0.355556 0.001000 +1e7 -59.000000 -49.000000 0.200000 0.200000 -0.240816 0.001000 +1e7 42.000000 21.000000 -0.400000 0.600000 -1.200000 0.002000 +1e7 -1.000000 48.000000 0.200000 0.200000 0.004167 0.003000 +1e7 2.000000 19.000000 0.700000 0.200000 -0.021053 0.003000 +1e7 8.000000 -33.000000 0.700000 0.800000 0.193939 0.003000 +1e7 -10.000000 5.000000 -0.700000 0.800000 1.600000 0.004000 +1e7 7.000000 -14.000000 0.900000 0.400000 0.200000 0.001000 +1e7 -48.000000 -13.000000 -0.000000 0.200000 -0.738462 0.003000 +1e7 56.000000 26.000000 -0.200000 0.800000 -1.723077 0.001000 +1e7 -96.000000 41.000000 0.500000 0.200000 0.468293 0.003000 +1e7 7.000000 -92.000000 -0.200000 0.600000 0.045652 0.003000 +1e7 3.000000 17.000000 0.800000 0.600000 -0.105882 0.001000 +1e7 -88.000000 -66.000000 0.800000 0.400000 -0.533333 0.002000 +1e7 22.000000 -31.000000 -0.000000 0.800000 0.567742 0.001000 +1e7 -5.000000 42.000000 0.800000 0.200000 0.023810 0.002000 +1e7 -73.000000 -97.000000 0.200000 0.200000 -0.150515 0.003000 +1e7 17.000000 23.000000 -0.600000 0.800000 -0.591304 0.004000 +1e7 42.000000 97.000000 -0.100000 0.800000 -0.346392 0.002000 +1e7 25.000000 -72.000000 -0.700000 0.400000 0.138889 0.001000 +1e7 -82.000000 44.000000 -0.300000 0.200000 0.372727 0.004000 +1e7 -23.000000 -64.000000 -0.800000 0.600000 -0.215625 0.003000 +1e7 27.000000 33.000000 -0.100000 0.800000 -0.654545 0.004000 +1e7 -30.000000 -76.000000 0.700000 0.600000 -0.236842 0.004000 +1e7 15.000000 -47.000000 0.500000 0.200000 0.063830 0.004000 +1e7 47.000000 -38.000000 -0.200000 0.800000 0.989474 0.002000 +1e7 -46.000000 40.000000 0.100000 0.400000 0.460000 0.001000 +1e7 -69.000000 8.000000 -0.300000 0.200000 1.725000 0.001000 +1e7 2.000000 -70.000000 0.700000 0.600000 0.017143 0.001000 +1e7 -5.000000 -14.000000 -0.500000 0.800000 -0.285714 0.002000 +1e7 -90.000000 82.000000 -0.300000 0.800000 0.878049 0.001000 +1e7 4.000000 27.000000 0.400000 0.800000 -0.118519 0.002000 +1e7 48.000000 -4.000000 0.500000 0.200000 2.400000 0.002000 +1e7 25.000000 54.000000 -0.300000 0.200000 -0.092593 0.004000 +1e7 70.000000 -4.000000 0.900000 0.200000 3.500000 0.001000 +1e7 79.000000 20.000000 0.100000 0.800000 -3.160000 0.002000 +1e7 2.000000 -4.000000 0.000000 0.600000 0.300000 0.002000 +1e7 1.000000 82.000000 -0.500000 0.600000 -0.007317 0.001000 +1e7 68.000000 -27.000000 -0.400000 0.400000 1.007407 0.002000 +1e7 -20.000000 12.000000 0.300000 0.200000 0.333333 0.002000 +1e7 -67.000000 -88.000000 0.300000 0.200000 -0.152273 0.003000 +1e7 -32.000000 -50.000000 -0.000000 0.600000 -0.384000 0.001000 +1e7 -74.000000 -18.000000 0.000000 0.200000 -0.822222 0.002000 +1e7 -19.000000 93.000000 -0.900000 0.600000 0.122581 0.001000 +1e7 -98.000000 57.000000 0.800000 0.200000 0.343860 0.002000 +1e7 -52.000000 -93.000000 -0.100000 0.400000 -0.223656 0.003000 +1e7 -63.000000 -22.000000 0.800000 0.200000 -0.572727 0.004000 +1e7 -63.000000 10.000000 -0.300000 0.400000 2.520000 0.004000 +1e7 7.000000 84.000000 0.500000 0.600000 -0.050000 0.004000 +1e7 26.000000 -34.000000 -0.800000 0.800000 0.611765 0.001000 +1e7 -69.000000 96.000000 0.300000 0.200000 0.143750 0.003000 +1e7 0.000000 -79.000000 -0.900000 0.800000 0.000000 0.004000 +1e7 -84.000000 -44.000000 -0.700000 0.800000 -1.527273 0.002000 +1e7 95.000000 -91.000000 0.800000 0.600000 0.626374 0.003000 +1e7 -23.000000 80.000000 -0.300000 0.200000 0.057500 0.004000 +1e7 -93.000000 43.000000 -0.600000 0.200000 0.432558 0.001000 +1e7 76.000000 35.000000 -0.800000 0.400000 -0.868571 0.001000 +1e7 -47.000000 -14.000000 -0.000000 0.200000 -0.671429 0.001000 +1e7 43.000000 15.000000 -0.200000 0.600000 -1.720000 0.001000 +1e7 -12.000000 -80.000000 0.700000 0.600000 -0.090000 0.003000 +1e7 6.000000 76.000000 -0.800000 0.200000 -0.015789 0.004000 +1e7 9.000000 -96.000000 0.600000 0.200000 0.018750 0.001000 +1e7 -58.000000 3.000000 -0.600000 0.200000 3.866667 0.001000 +1e7 -27.000000 -52.000000 -0.400000 0.200000 -0.103846 0.002000 +1e7 51.000000 83.000000 0.900000 0.400000 -0.245783 0.001000 +1e7 36.000000 -60.000000 0.400000 0.200000 0.120000 0.002000 +1e7 99.000000 19.000000 0.300000 0.200000 -1.042105 0.001000 +1e7 46.000000 -20.000000 -0.900000 0.400000 0.920000 0.004000 +1e7 76.000000 78.000000 0.600000 0.800000 -0.779487 0.004000 +1e7 -79.000000 66.000000 -0.600000 0.200000 0.239394 0.003000 +1e7 46.000000 -33.000000 0.000000 0.600000 0.836364 0.002000 +1e7 94.000000 -97.000000 -0.500000 0.600000 0.581443 0.001000 +1e7 64.000000 88.000000 -0.300000 0.200000 -0.145455 0.003000 +1e7 56.000000 -12.000000 0.200000 0.200000 0.933333 0.001000 +1e7 -35.000000 24.000000 -0.600000 0.600000 0.875000 0.001000 +1e7 -33.000000 3.000000 -0.800000 0.800000 8.800000 0.004000 +1e7 -81.000000 23.000000 0.200000 0.200000 0.704348 0.004000 +1e7 -1.000000 93.000000 0.300000 0.200000 0.002151 0.001000 +1e7 56.000000 6.000000 0.400000 0.200000 -1.866667 0.001000 +1e7 19.000000 -34.000000 0.200000 0.800000 0.447059 0.004000 +1e7 -43.000000 -27.000000 -0.400000 0.200000 -0.318519 0.004000 +1e7 84.000000 21.000000 0.000000 0.400000 -1.600000 0.004000 +1e7 -29.000000 47.000000 0.000000 0.400000 0.246809 0.001000 +1e7 40.000000 -1.000000 0.100000 0.200000 8.000000 0.002000 +1e7 2.000000 11.000000 -0.500000 0.600000 -0.109091 0.002000 +1e7 37.000000 86.000000 0.400000 0.800000 -0.344186 0.001000 +1e7 -95.000000 -81.000000 0.800000 0.600000 -0.703704 0.001000 +1e7 -4.000000 26.000000 -0.000000 0.600000 0.092308 0.001000 +1e7 59.000000 -97.000000 -0.800000 0.400000 0.243299 0.001000 +1e7 -21.000000 71.000000 -0.200000 0.400000 0.118310 0.001000 +1e7 49.000000 4.000000 -0.700000 0.800000 -9.800000 0.002000 +1e7 59.000000 76.000000 0.600000 0.400000 -0.310526 0.001000 +1e7 42.000000 14.000000 -0.900000 0.400000 -1.200000 0.002000 +1e7 -31.000000 -85.000000 -0.900000 0.800000 -0.291765 0.003000 +1e7 53.000000 41.000000 -0.800000 0.200000 -0.258537 0.001000 +1e7 28.000000 -63.000000 0.700000 0.200000 0.088889 0.001000 +1e7 90.000000 -23.000000 -0.900000 0.600000 2.347826 0.004000 +1e7 -74.000000 -46.000000 -0.100000 0.200000 -0.321739 0.001000 +1e7 79.000000 84.000000 0.400000 0.200000 -0.188095 0.002000 +1e7 -45.000000 1.000000 -0.800000 0.400000 18.000000 0.002000 +1e7 50.000000 -85.000000 0.900000 0.600000 0.352941 0.001000 +1e7 -96.000000 73.000000 0.500000 0.800000 1.052055 0.002000 +1e7 -4.000000 29.000000 0.400000 0.200000 0.027586 0.001000 +1e7 69.000000 -99.000000 -0.500000 0.200000 0.139394 0.001000 +1e7 20.000000 -75.000000 0.800000 0.400000 0.106667 0.004000 +1e7 44.000000 -90.000000 0.500000 0.600000 0.293333 0.003000 +1e7 -12.000000 96.000000 0.300000 0.400000 0.050000 0.001000 +1e7 -3.000000 -43.000000 -0.000000 0.800000 -0.055814 0.003000 +1e7 -97.000000 -16.000000 -0.900000 0.600000 -3.637500 0.002000 +1e7 48.000000 60.000000 -0.200000 0.400000 -0.320000 0.001000 +1e7 88.000000 45.000000 -0.900000 0.200000 -0.391111 0.001000 +1e7 -53.000000 -40.000000 -0.700000 0.200000 -0.265000 0.001000 +1e7 -85.000000 -6.000000 -0.200000 0.800000 -11.333333 0.001000 +1e7 -46.000000 -37.000000 0.200000 0.800000 -0.994595 0.002000 +1e7 -46.000000 96.000000 0.200000 0.400000 0.191667 0.001000 +1e7 -99.000000 3.000000 -0.300000 0.200000 6.600000 0.004000 +1e7 -21.000000 52.000000 0.500000 0.600000 0.242308 0.001000 +1e7 -9.000000 -23.000000 -0.200000 0.400000 -0.156522 0.002000 +1e7 -98.000000 -62.000000 0.400000 0.600000 -0.948387 0.004000 +1e7 83.000000 86.000000 -0.300000 0.800000 -0.772093 0.004000 +1e7 67.000000 98.000000 0.200000 0.400000 -0.273469 0.003000 +1e7 1.000000 41.000000 -0.400000 0.800000 -0.019512 0.001000 +1e7 37.000000 -96.000000 0.200000 0.600000 0.231250 0.001000 +1e7 36.000000 15.000000 -0.100000 0.200000 -0.480000 0.001000 +1e7 -20.000000 26.000000 -0.400000 0.200000 0.153846 0.002000 +1e7 -83.000000 45.000000 -0.000000 0.400000 0.737778 0.004000 +1e7 81.000000 -41.000000 -0.100000 0.600000 1.185366 0.001000 +1e7 -61.000000 32.000000 0.000000 0.800000 1.525000 0.004000 +1e7 -77.000000 -55.000000 -0.600000 0.600000 -0.840000 0.001000 +1e7 39.000000 -67.000000 -0.300000 0.600000 0.349254 0.003000 +1e7 -86.000000 -17.000000 -0.300000 0.800000 -4.047059 0.004000 +1e7 -16.000000 -7.000000 0.000000 0.800000 -1.828571 0.001000 +1e7 -44.000000 63.000000 0.200000 0.200000 0.139683 0.004000 +1e7 29.000000 81.000000 0.500000 0.800000 -0.286420 0.001000 +1e7 -95.000000 50.000000 -0.900000 0.400000 0.760000 0.001000 +1e7 -82.000000 -14.000000 -0.200000 0.400000 -2.342857 0.001000 +1e7 66.000000 -90.000000 -0.900000 0.200000 0.146667 0.004000 +1e7 36.000000 -23.000000 -0.200000 0.400000 0.626087 0.003000 +1e7 -5.000000 92.000000 -0.900000 0.600000 0.032609 0.001000 +1e7 31.000000 -28.000000 -0.400000 0.200000 0.221429 0.001000 +1e7 -9.000000 90.000000 0.400000 0.200000 0.020000 0.004000 +1e7 -17.000000 65.000000 -0.000000 0.600000 0.156923 0.003000 +1e7 33.000000 34.000000 0.000000 0.400000 -0.388235 0.001000 +1e7 20.000000 -21.000000 -0.900000 0.200000 0.190476 0.002000 +1e7 90.000000 1.000000 0.800000 0.600000 -54.000000 0.001000 +1e7 15.000000 -47.000000 -0.100000 0.200000 0.063830 0.001000 +1e7 -14.000000 19.000000 0.800000 0.800000 0.589474 0.004000 +1e7 -45.000000 -76.000000 -0.100000 0.200000 -0.118421 0.004000 +1e7 -46.000000 83.000000 -0.300000 0.200000 0.110843 0.002000 +1e7 12.000000 -82.000000 0.800000 0.800000 0.117073 0.001000 +1e7 12.000000 -9.000000 -0.600000 0.200000 0.266667 0.003000 +1e7 -61.000000 -12.000000 0.600000 0.800000 -4.066667 0.002000 +1e7 42.000000 23.000000 0.700000 0.400000 -0.730435 0.001000 diff --git a/course/semester2/pprog/assignment1/nbody.c b/course/semester2/pprog/assignment1/nbody.c new file mode 100644 index 00000000..5891d141 --- /dev/null +++ b/course/semester2/pprog/assignment1/nbody.c @@ -0,0 +1,321 @@ +// nbody.cpp : Template program for N-body +// Copyright UWA, 2012 + +#define _ANSI_SOURCE + +#include +#include +#include +#include +#include +#include +#include +#include + +#define M_PI 3.14159265358979323846264338327950288 /* pi */ +#define WIDTH 800 +#define HEIGHT 800 +#define POINT_SIZE 1 +#define POSITION_X 112 +#define POSITION_Y 20 +#define WORLD_LEFT -10000 +#define WORLD_RIGHT 10000 +#define WORLD_BOTTOM -10000 +#define WORLD_TOP 10000 +#define VIEW_ANGLE 45 +#define RHO 100 +#define WORLD_NEAR 0.1 +#define WORLD_FAR 1000000 +#define BALL_SIZE 0.5 +#define REFRESH_RATE 0.001 +#define LINE_SIZE 1000 +#define G 6.67428E-11 +#define DELTA_T 0.05 + +#define square(x) ((x)*(x)) + +typedef struct { + double mass; + double X; + double Y; + double Z; + double Vx; + double Vy; + double Vz; + double Fx; + double Fy; + double Fz; + int color; +} Particle; + +double previousTime, eyeTheta, eyePhi, eyeRho; +float look[3]; +int windowWidth, windowHeight, upY; + +double SCALE = 1; + +Particle *body; +int N; +int numberOfProcessors=1; + +/* + * Initialization of graphics + */ +void Init(void) { + + glClearColor(1.0,1.0,1.0,0.0); + glColor3f(0.0f, 0.0f, 0.0f); + glPointSize(POINT_SIZE); + glMatrixMode(GL_PROJECTION); + glLoadIdentity(); + + /*init lighting */ + + GLfloat mat_specular[] = { 1.0, 1.0, 1.0, 1.0 }; + GLfloat mat_shininess[] = { 50.0 }; + GLfloat light_position[] = { 1.0, 1.0, 0.0, 0.0 }; + glMaterialfv(GL_FRONT, GL_SPECULAR, mat_specular); + glMaterialfv(GL_FRONT, GL_SHININESS, mat_shininess); + glLightfv(GL_LIGHT0, GL_POSITION, light_position); + + glColorMaterial(GL_FRONT,GL_DIFFUSE); // Set Color Capability + + glEnable(GL_LIGHTING); + glEnable(GL_LIGHT0); + glEnable(GL_DEPTH_TEST); + + glEnable(GL_COLOR_MATERIAL); // Enable color + + double displayRatio = 1.0 * WIDTH / HEIGHT; + windowWidth = WIDTH; + windowHeight = HEIGHT; + previousTime = clock(); + eyeTheta = 0; + eyePhi = 0.5 * M_PI; + eyeRho = RHO; + upY = 1; + look[0] = 0; + look[1] = 0; + look[2] = 0; + gluPerspective(VIEW_ANGLE, displayRatio, WORLD_NEAR, WORLD_FAR); +} + +/* + * This function redraws the screen after the positions of particles + * have been updated + */ +void Display(void) { + glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); + glMatrixMode(GL_MODELVIEW); + glLoadIdentity(); + gluLookAt(eyeRho * sin(eyePhi) * sin(eyeTheta), eyeRho * cos(eyePhi), + eyeRho * sin(eyePhi) * cos(eyeTheta), + look[0], look[1], look[2], 0, upY, 0); + + for (int i = 0; i < N; i++) { + //glClearColor(1.0,1.0,1.0,0.0); + glColor3f(0.0f, body[i].mass/1e11*100, 0.0f); + //glColor3f(1.0f, 0.0f, 0.0f); + glPushMatrix(); // to save the current matrix + glTranslated(SCALE*body[i].X, SCALE*body[i].Y, SCALE*body[i].Z); + glutSolidSphere (BALL_SIZE, 10, 10); + glPopMatrix(); // restore the previous matrix + } + glFlush(); +} + +/* + * Prints the body on screen + */ +void PrintBody(int i) +{ + printf("Body #%d M=%f X=%f Y=%f Z=%f Fx=%f Fy=%f Fz=%f Vx=%f Xy=%f Vz=%f\n", + i, body[i].mass, body[i].X, body[i].Y, body[i].Z, body[i].Fx, + body[i].Fy, body[i].Fz, body[i].Vx, body[i].Vy, body[i].Vz); +} + +/* + * Computing forces + */ +void Force(int a) { + double distance; + double con; + double gd; + + body[a].Fx = body[a].Fy = body[a].Fz = 0; + + for(int b=0; b 0) upY = 1; + else upY = 1; +} + +void Reshape(int width, int height) { + double displayRatio = 1.0 * width / height; + windowWidth = width; + windowHeight = height; + glMatrixMode(GL_PROJECTION); + glLoadIdentity(); + gluPerspective(VIEW_ANGLE, displayRatio, WORLD_NEAR, WORLD_FAR); + glViewport(0, 0, windowWidth, windowHeight); +} + +/* + * This function reads an input file. You can change it if you choose a + * different file format + */ +void readFile(char *fileName) { + char line[LINE_SIZE]; + char *token; + FILE *file; + + file = fopen(fileName, "rt"); + N = atoi(fgets(line, LINE_SIZE, file)); + body = (Particle*) calloc((size_t)N, sizeof(Particle)); + + puts("----------------------Initial field-------------------------------"); + + for (int i=0; i