Mike's Povray Page
News
Gallery
Tutorials
Library
Tools
Links
 
E-mail






POV-Ray Ring

< Prev Next >
Random List Sites



df3 Python Class

The df3 python library is a importable python class that facilitates working with Povray .df3 density files

This library is licenced under the LGPL

No promises for backward compatibility until a few more iterations happen

Screenshot

To create the screenshot:

  • 1. Download latest df3 zip file
  • 2. Unzip file
  • 3. 'python df3.py' - this generates temp.df3
  • 4. 'povray df3.pov'

Using The Class

A quick example that creates a 10x10x10 voxel .df3 file and initializes all values to 10. Start python and do the following with df3.py in either your path or the current directory:

import df3

mydf3 = df3.df3(10,10,10)
for x in range(mydf3.sizeX()):
    for y in range(mydf3.sizeY()):
        for z in range(mydf3.sizeZ()):
            mydf3.set(x, y, z, 10) 

mydf3.exportDF3('out.df3')

Typing 'help(df3)' at the python prompt will give class information after df3 has been imported

Known Problems

  • No known problems - report bugs: contact@povray.tashcorp.net

Download

08/09/05 - Version 0.20
07/13/05 - Version 0.10


 
Web povray.tashcorp.net