Personal tools
You are here: Home Subsections Intro Game Programming Graphics POV-Ray Examples POV Axes

POV Axes

— filed under: , ,

A python program which generates a POV file that has visual axes for orientation verification.

About

This is a python program which generates POV-Ray code for visual orientation in other projects.  It lets you see which way you're looking, and where you're at.  Good for troubleshooting of "black screen" renderings.
Please see the authors description of the file below.

 

Download

GenPlanes - genplanes.py

Description and Instructions - describe.txt

 

Screenshot

 

Details 

Authors description and instructions (download here):

Any time you start to play with a new 3D graphics package, or come back to one after a while, you might end up with the dreaded "black screen".  You know that you drew something there, but it doesn't show up.

This has happened to me often enough that I have developed a standard way to try to solve the problem.  I draw each of the X, Y, and Z axes as cylinders, put a marker on the positive side of each (so I know which direction is up and which is down) and put markers at regular intervals along those axes.  

This does several things - it provides me with a set of visual cues that I can use to figure out where things are, it gives me a chance to build the simple primitives used in the system (cylinders, colors and so on), and it gives me a framework on which I can build bigger and more complex images over time.

Here is a python program that generates exactly this.  The three axes are cylinders and each is a different color.  At the positive end of each axis (and pointing toward the positive direction) is a cone of that color.  And at regular intervals along the axis are squares perpendicular to the axis and of the same color. 

Why a program?  Because I'd get very bored trying to do (as the program does) 60 squares.  And being bored, I'd make mistakes. Because by using a program I can change the size of the squares, the interval between them and other factors far more quickly than if I need to do it by hand.

To run this and put the pov file in "output.pov" :

   python genplanes.py output.pov

Then :

   povray output.pov

 

Webpage

This tool has no webpage.  The authors homepage can be found at: http://foo.ewu.edu/

 

Author

Jeff Putnam

Author homepage: http://foo.ewu.edu/

 

Copyright

This program is release as Public Domain.  See the Wikipedia article for more on what this means.  Essentially this makes it free to use as you like (e.g. owned by the public at large).

Document Actions