// Simple Tentacley thing by Fergus C. Murray (1) // (C) May 2000 #version 3.0 global_settings { assumed_gamma 1.0 } camera { location < 0, 0, -30> direction 1*z look_at < 0, 0, 0> } background { color rgb <0.0, 0.0, 0.0> } light_source { <50, 20, -50> color rgb 1 } #declare BasicShape = sphere { 0,1 } // ------------------------------------------------------------------ // Set up the loop variables: // the Counter variable will go from 0.0 to 1.0 // in NumIterations loops. #declare NumIterations = 240 #declare Counter = 0.0 #declare Increment = 1.0/NumIterations #declare Arm = 1 #declare armangle = 0.0 #declare NumTwists = 360*2 union{ #declare Flipper = 1 // Flipper will switch between 1 and -1 each loop #while (Counter<1.0) object { BasicShape scale <(1-Counter),(1-Counter),(1-Counter)> translate <12*(Counter), 0, 0> rotate 30*cos((Counter*2-clock)*pi*2)*z+armangle*z #declare armangle=armangle+60 texture { pigment { color rgb <1-Counter/2, 1-Counter, 0.1+0.1*cos(Counter*360)> } finish { ambient 0.2 specular 0.5 roughness 0.08 } } } #declare Flipper = - Flipper // flip its value (0->1 or 1->0) #declare Counter=Counter+Increment #end }