Thursday, May 29, 2008

polyhedral playground part I



i have been playing around with a 3d modeling program called ayam, which by the way is really great, and i wanted to import some polyhedra into some scenes. of course, i can no longer remember exactly why i wanted to do that, but it led me on a fascinating journey through the internet's nooks and vertices searching for polyhedral archana.

this is the first of a three part series of tutorials on how to generate polyhedra using antiprism, convert it using geomview and finally import it into ayam (or other modeling package) to make cool stuff like the above image. all three programs are cross platform so they can all be run under linux, irix, osx, or even windows.

antiprism
antiprism is a collection of programs for generating, manipulating, transforming and visualising polyhedra. i know because that's what it says on the home page. in particular it is a collection of command line utilities to generate, merge, tweak and wrangle polyhedra. in addition to the command line apps, antiprism comes with antiview which is an opengl based viewer for polyhedra. antiprism does most of its work with '.off' files. an '.off' file is a convenient and human readable representation of polyhedra. unfortunately most 3d modeling packages are unable to read these files directly. i will cover converting these '.off' files using geomview in the next instalment, but for today we will just play with antiprism and scratch the surface of all the cool things that can be done with it.

installation
since i run ubuntu linux, i will cover how to get antiprism going in ubuntu. for other platforms, you will have to follow the instructions at the antiprism homepage.

the simplest way would be to get antiprism from the ubuntu repositories, unfortunately it isn't there, so as of this writing, we have to compile it ourselves. if you are put off by that, please hang on as this is one of the easier programs to compile and install.

first thing is to get the dingus. go to the antiprism home page and navigate to downloads. click on the link to download the latest version.

on my system, firefox asks if i want to open the file with archive manager. say yes, or if you get another option then save the file and open it manually by clicking on it in your file browser.

extract the file to your home folder. in my case that is /home/dave so when fully extracted there is a new folder /home/dave/antiprism-0.18 (or perhaps a newer version number)

open up a terminal window and navigate to the newly created folder and type:

./configure

this will check if your system has everything it needs to build antiprism. scan the output and if it is plain that it is not happy then fire up your synaptic package manager and see if the following packages are installed:

build-essential
freeglut3-dev

if they are not installed, install them and then return to the terminal window and again type

./configure

this time all should be in order.
next type:

make

this should take a while, do some stretching exercises while it is busy.
when make is done type:

sudo make install

you will be prompted for a password, enter it.

if all has gone well, you are done. lets test it. type:

unipoly 25 | antiview

if all goes well you will be presented with an antiview window that resembles this:



congratulations, you have just compiled and installed antiprism! take a moment to play around with antiview. clicking and dragging within this window will spin the figure (a truncated icosahedron or perhaps more widely known as a buckeyball) and right clicking in the window will show a menu of display options. when you are done, quit antiview and we will explore some more things to do with antiprism.

unipoly
unipoly is the program that generates all the uniform polyhedra. to see a list of what it knows how to generate, type:

unipoly -l

note that the -l is a lower case L and not the numeral 1
and you will be presented with a list of 80 polyhedra unipoly knows how to generate. if you want to see what a great dodecicosahedron looks like, then look down the list and note it's number is 63 and type:

unipoly 63 | antiview

other than viewing these objects, it is useful to save them. this is done by specifying the output file using the -o option like this:

unipoly 25 -o buckyball.off

this creates the file buckyball.off which can be used as input into some of the other antiprism programs or, as we will see in part two of this tutorial, can be converted into a format more agreeable to a 3d modeling program.

johnson
this program generates the johnson polyhedra in pretty much the same way as unipoly. try this:

johnson -l

(again -l is a lowercase L not the numeral 1)
this gets you a list of 92 polyhedra to play around with. to make a .off file with the geometry of a metabiaugmented truncated dodecahedron type:

johnson 70 -o mtd.off

antiview can also read .off directly like this:

>antiview mtd.off

geodesic
this program generates geodesic 'spheres' like this:

geodesic -c 2 4 | antiview

cool, huh?

this is enough to get started with antiprism. i encourage you to crawl the web site and scour the docs. there is a script called demo.sh in the extras folder that will give you some great places to jump off from. if you come up with any, shall we say, 'stupid antiprism tricks', then please post them to the comments.

stay tuned for part II of polyhedral playground: geomview

peace

Sunday, May 25, 2008

serpent mound



on april 27 the family went to the serpent mound in peebles, oh which turns out to be largest pre-columbian earthwork east of the mississippi. it was a glorius day and a great time was had by all. there is a very old steel tower on the site where one can gain a bird's eye view of the mound. this is required because the serpent mound is on the highest ground around. i took a series of images and stitched them together into a panoramic image of the entire mound.

before i decided i wanted to publish this image, i started investigating some of the various copyleft licenses i might use to assure my name accompanies any derivative works in perpetuity and i thought my head was going to explode. i have therefore decided to release this into the public domain. enjoy.

the image was photographed by dave shemano on may 27th 2008 from the steel tower at the serpent mound. it is comprised of 3 images stitched together with hugin. the result was then loaded into the gimp for perspective correction and a small patch of asphalt in the lower right corner of the image was made into grass. it was finally scaled to 2304x864 so that it could be used as my desktop wallpaper that spans two monitors at 1152x864.

peace