-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME
27 lines (19 loc) · 1013 Bytes
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
what does this code do?
- intend to draw a polyhedron of given number of vertices. Each vertex of the polyhedron is assumed to be a point charge, intially dispersed randomly over a unit radius sphere,forces & energy on each of the chagre is computed, and each of the charge is iteratively moved by small angles along the dir of the force vector, (if the change reduces the overall energy of the system).
Edit, 7th June: (change of algorithm)
- places the charges in the direction of the force acting upon them. Not accounting for energy at all.
- also draws edges instead of displaying the points itself.
requirements:
PyQt4, OpenGL, numpy, scipy
how to run?
>python poly.py
to change the number of vertices(x) and/or iterations(n)
in ln 120 of poly.py change x,n in
mainwindow.mCarlo(x,n)
To Do:
1) correct the algorithm, to always ensure it reaches the global maximum
2) algorithm to draw edges and hence faces
Credits:
this is based on, http://www.wmeadow.demon.co.uk/poly/index.htm
By:
chaitanya ch