/* iic.pov - iterative imaging version 3 2007 Sam Benge Suggested command line options: +w300 +h300 +ft +kff40 This file will produce an error for the last frame. I haven't fully investigated the reason, but it should not be a problem. The code is messy and disorganized. Good luck! */ // Modified by Tor Olav Kristensen 23. February 2008 #version 3.6; global_settings { assumed_gamma 2.2 } #default { finish { ambient 1 } } // Change the random seed for different results #declare R = seed(0003); // This is the number total elements #declare Iterations = int(10 + 10*rand(R)); #declare FileName = "IIC_"; #declare FrameNumber = frame_number - 1; plane { z, 0 pigment { radial rotate 90*x + 720*rand(R)*z triangle_wave color_map { #declare V = 0; #declare rrgb = -0.4; #while (V <= 10) [ V/10 rgb rrgb ] #declare rrgb = rrgb + 0.4*; #declare V = V + 1; #end // while } } } // TOK: I suspect that playing with this - #macro PigmTrans() transform { rotate 720*rand(R)*z #if (rand(R) > 0.5) translate rand(R)/2*y warp { repeat y flip y } #end // if } #end // macro PigmTrans // TOK: - and this may be fruitful... #macro DiscTrans() transform { scale (1.0 - 0.7*rand(R))*(x + y) rotate 720*rand(R)*z translate 2*((rand(R) - rand(R))*x + (rand(R) - rand(R))*y) } #end // macro DiscTrans #if (FrameNumber > 0) #declare Zeros = ""; #if (FrameNumber < 10) #declare Zeros = concat("0", Zeros); #end // if #declare FileName = concat(FileName, Zeros, str(FrameNumber, 0, 0), ".tga"); #declare Pigm = pigment { image_map { tga FileName interpolate 2 } scale 2*(x + y) translate -(x + y) PigmTrans() } #declare V = 0; #while (V < Iterations) disc { 0, z, 1 pigment { pigment_pattern { cylindrical rotate 270*x } pigment_map { [ 0.00 Pigm transmit 1 filter 1 ] [ 0.25 Pigm ] } } DiscTrans() translate -(1 + V)*z } #declare V = V + 1; #end // while #end camera{ orthographic right 2*x up 2*y location -100*z look_at 0*y }