POV-Ray : Newsgroups : povray.general : help in creating a kaleidescope effect : Re: help in creating a kaleidescope effect Server Time
5 Nov 2024 01:26:13 EST (-0500)
  Re: help in creating a kaleidescope effect  
From:
Date: 28 Jul 2003 01:37:32
Message: <3f24b69c$1@news.povray.org>
// What about the following kaleidoscope, using a prism?
// An arbitrary number of mirrors are possible.
//
//   Sputnik


global_settings { max_trace_level 10 }

#declare N = 6; // number of mirrors

// kaleidoscope
prism { linear_spline linear_sweep 0, -6, (N+1)*2
  #declare I = 0;
  #while (I<=N)
    , <cos(I/N*2*pi), sin(I/N*2*pi)>*1.06
    #declare I = I+1;
    #end//while I
  #declare I = 0;
  #while (I<=N)
    , <cos(I/N*2*pi), sin(I/N*2*pi)>
    #declare I = I+1;
    #end//while I
  texture {
    pigment { color rgb 1 }
    finish { reflection 1 }
    }
  }

// wooden disc to look at
cylinder { 0, -y, 1
  pigment { wood scale .15 rotate 5*x translate 0.5 }
  finish { ambient 1 }
  translate -6*y
  }

// camera, light
camera { location <0, 2, -0.25> look_at 0 }
light_source { <-4, 3, 2>*1000, rgb 1 }

// END


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.