home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 7 / Apprentice-Release7.iso / Source Code / C / Applications / POV-Ray 3.0.2 / Scenes / Zonohedra / PZ.inc < prev    next >
Encoding:
Text File  |  1997-06-19  |  493 b   |  26 lines  |  [TEXT/POV3]

  1. #declare J = 1 //initialize outer loop
  2. #declare POLAR_ZONOHEDRON =
  3. mesh{
  4. #while (J <= N)
  5. #declare K = 1
  6. #declare MARK = NORTH //a "point of reference" for the triangles
  7. #declare R = <A * cos(J*2*pi/N), A * sin(J*2*pi/N), -RISE>
  8.     #while (K <= N-1)
  9.     #declare S = <A * cos((J+K)*2*pi/N), A * sin((J+K)*2*pi/N), -RISE>
  10.     triangle {
  11.         MARK
  12.         MARK+R+S
  13.         MARK+R
  14.     texture{T3}}
  15.     triangle {
  16.         MARK
  17.         MARK+S
  18.         MARK+R+S
  19.     texture{T3}}
  20.     #declare MARK = MARK+S
  21.     #declare K = K+1
  22.     #end
  23. #declare J = J+1
  24. #end
  25. }
  26.