Some More POV-Ray Kaleidoscope Source Code


By request, here is the POV-Ray code for some more kaleidoscopes.
Examples of all (except the 45-60-90 spherical) are shown on my Kaleidoscope Page.
If you make any POV-Ray kaleidoscopes and put them on a web page, please send me the URL.
Render with a square output image resolution (I added 300x300, 400x400, etc. to my RENDERER\QUICKRES.INI file).

30-30-30 Degree Plane Kaleidoscope:

The input image "oak01.gif" is a square non-interlaced GIF (mine was 300 x 300 pixels).
  global_settings { assumed_gamma 2.2 }
  global_settings { max_trace_level 9 }

  camera {
    location <0, 0, -4>
    look_at <0, 0, 0>
    right x
  }

  #declare Mirrors = union {
  #declare P=3
  #declare Count=0
  #while (Count < P)
    #declare Theta=(2*Count*pi/P)
    plane { <cos(Theta),sin(Theta),0>, .245
      finish {
        reflection 1
        ambient 0
        specular 0
      }
    }
    #declare Count=Count+1
  #end
  }

  #declare myimage=pigment {
    image_map {
      gif "input\oak01.gif"
      once
    }
  }

  union {
    plane { <0, 0, -1>, 0
      pigment {myimage}
      translate <-.5,-.5,0>
      finish { ambient 1.4 }
    }
    object {
      Mirrors
      rotate 62*z
    }
  }

36-60-90 Degree Spherical Kaleidoscope (icosahedral symmetry):

The input image "oak01.gif" was made by pasting a 300 x 200 (pixels) image into the exact center of a 3000 x 1500 image. The large image gets wrapped around the sphere but most it lies outside the wedge formed by the mirrors. Only pixels from the centered smaller image end up in the final rendering. I use a 256-color palette to keep the image sizes manageable.
  global_settings { assumed_gamma 2.2 }
  global_settings { max_trace_level 8 }

  camera {
    location <0, 0, -10>
    look_at <0, 0, 0>
    right x
  }

  #declare Mirrors = union {
    plane { y, 0 }
    plane { x, 0 }
    plane { <.381966, .618034, .236068>, 0 }
    finish {
      reflection 1
      ambient 0
      specular 0
    }
    rotate 12*y
    rotate -8*x
  }

  #declare myimage=pigment {
    image_map {
      gif "input\oak01.gif"
      map_type 1
      once
    }
  }

  union {
    sphere { 0, 1
      pigment {myimage}
      finish { ambient 1.4 }
      rotate -94*y
      rotate 2*x
    }

    object { Mirrors }
    scale 4.2
  }

45-60-90 Degree Spherical Kaleidoscope (octahedral symmetry):

The input image "oak01.gif" was made by pasting a 480 x 340 (pixels) image into the exact center of a 3000 x 1500 image. The large image gets wrapped around the sphere but most of it lies outside the wedge formed by the mirrors. Only pixels from the centered smaller image end up in the final rendering. I use a 256-color palette to keep the image sizes manageable.
  global_settings { assumed_gamma 2.2 }
  global_settings { max_trace_level 8 }

  camera {
    location <0, 0, -10>
    look_at <0, 0, 0>
    right x
  }

  #declare Mirrors = union {
    plane { y, 0 }
    plane { x, 0 }
    plane { <1, 1.414213562, 1>, 0 }
    finish {
      reflection 1
      ambient 0
      specular 0
    }
    rotate 15*y
    rotate -11*x
  }

  #declare myimage=pigment {
    image_map {
      gif "input\oak01.gif"
      map_type 1
      once
    }
  }

  union {
    sphere { 0, 1
      pigment {myimage}
      finish { ambient 1.4 }
      rotate -98*y
      rotate 6*x
    }

    object { Mirrors }
    scale 4.2
  }

<Dogfeathers Home Page>  <Mark's Page>  <Mark's Kaleidoscope Page>
Email: Mark Newbold
This page URL: http://dogfeathers.com/kaleido/kaleido2.html