Packinon Home > Python programs > pg_spiral.py

pg_spiral.py

pg_circle.py distributes points on a spherical spiral. The distance between successive points is constant. The spiral runs from the top of a sphere to the bottom with the angle turned about the axis being proportional to the angle swept down from the top.

The positions of the points are found using an approximation method rather than being calculated directly.

Here are some images of points distributed on a 1.0 radius sphere in 10 turns:
pg_spiral.py -S 0.1
0.1 between points
pg_spiral.py -S 0.1
0.2 between points
pg_spiral.py -S 0.1
0.3 between points
A good distribution is achieved when the distance between points is the same as the distance between successive turns.

Program Help

usage: pg_spiral.py [options]

options
   -h       this help message
   -T val   number of turns in the spiral (default 10)
   -S val   create sphere points with radius of val (default, half
            the distance between turns)
   -N val   number of points to plot (not used)
   -o file  write output to file, if this option is not used
            the program writes to standard output.




SourceForge.net Logo Adrian Rossiter - adrian_r@teleline.es