Skip to content

ccluri/Polyhedrons

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages