home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga MA Magazine 1998 #7
/
amigamamagazinepolishissue1998.iso
/
varia
/
povray3
/
povray3_fpu
/
pov3demo
/
recurse
/
pyramid.inc
next >
Wrap
Text File
|
1997-12-12
|
984b
|
44 lines
// recursive subroutine for PYRAMID.POV
// #debug str(level,4,0)
sphere { <x_pos, y_pos, z_pos>, radius_max }
#if (level > 0)
#declare level = level - 1
#declare radius_max = radius_max / 2
// z+
#declare z_pos = z_pos + radius_max * 3
#include "pyramid.inc"
#declare z_pos = z_pos - radius_max * 3
// z-
#declare z_pos = z_pos - radius_max * 3
#include "pyramid.inc"
#declare z_pos = z_pos + radius_max * 3
// x+
#declare x_pos = x_pos + radius_max * 3
#include "pyramid.inc"
#declare x_pos = x_pos - radius_max * 3
// x-
#declare x_pos = x_pos - radius_max * 3
#include "pyramid.inc"
#declare x_pos = x_pos + radius_max * 3
// y+
#declare y_pos = y_pos + radius_max * 3
#include "pyramid.inc"
#declare y_pos = y_pos - radius_max * 3
// y-
#declare y_pos = y_pos - radius_max * 3
#include "pyramid.inc"
#declare y_pos = y_pos + radius_max * 3
#declare level = level + 1
#declare radius_max = radius_max * 2
#end