Example: Icosahelix
The example is used to present a variety modelling techniques. For
an easy way to make helixes from polyhedra see extras/python/helix.py
in the Antiprism data directory, which bonds by face rather than vertex
using off_align -F.
1. Make an icosahedron
This can be done with unipoly, which can be used to make all
the uniform polyhedra.
unipoly icosahedron > icosa.off
Display with
off2pov -o icosa.pov icosa.off
povray +a +p icosa.pov
2. Find faces to join
The icosahelix will be made by repeatedly copying the icosahadron
and always bonding the same two faces together. The faces are
specified by three index numbers. Use off2pov with the
-n option to display the icosahedron with its vertex numbers.
off2pov -x vf -n -o icosa.pov icosa.off
povray +a +p icosa.pov
If you have antiview available then that is the easier option
antiview -x f -n v icosa.off
Joining vertices 3,8,9 to 10,7,11 looks like it would make
a nice helix.
3. Colour the icosahedron
Colour the icosahedron with off_color. It might be nice
to give it a minimal proper colouring. It would have three
colours with no two adjoining faces having the same colour.
This can be done with -f P option.
off_color -f P icosa.off > color_icosa.off
Display the result.
off2pov -o color_icosa.pov color_icosa.off
povray +a +p color_icosa.pov
Colours with a bit more contrast would be better. Instead
of setting colour values use the -f P option (small p)
to set colour indexes, which can be converted into colour
values using a color map file.
Make a the file containing the following lines and call it colormap.txt
1 = 0.3 0.3 0.8
2 = 0.8 0.1 0.2
3 = 0.9 0.9 0.7
The first number is the index followed by three numbers ranging 0-1
for the colour value. The first number is the amount of red, then the
amount of green, then the amount of blue. Using this file index 1 will
be coloured bluish, index 2 reddish, and index 3 pale cream.
Colour the icosahedron again, this time using the colour map.
off_color -f p icosa.off -m colormap.txt > color_icosa.off
Display it.
off2pov -o color_icosa.pov color_icosa.off
povray +a +p color_icosa.pov
4. Build the helix
The off_align program will align one polyhedron relative to
another.
Copy color_icosa.off to icosahx.off to start the helix. Now join
a copy of the icosahedron to the start of the helix. The -p
option specifies the vertices that will be joined. The -Mi 2
option makes sure the new icosahedron is joined at the front of the
file. This is so its vertex numbers won't change and then the command
can be repeated to add the following icosahedra.
off_align -p 3,8,9,10,7,11 -M 2 -b color_icosa.off -o icosahx.off icosahx.off
Repeat the command another ten times for a twelve icosahedron icosahelix.
Display the completed icosahelix.
off2pov -o icosahx.pov icosahx.off
povray +a +p icosahx.pov
Next:
Downloads
Up:
Examples Using the Programs
|