// Persistence of Vision Ray Tracer Scene Description File // File: wiggly.pov // Vers: 3.1 // Desc: // Date: // Auth: Noam Lewis // ==== Standard POV-Ray Includes ==== #include "colors.inc" // Standard Color definitions #include "textures.inc" // Standard Texture definitions #macro DNA2(BallRad, BallThres, StickRad, Len, Dens, NumBalls, BallUseT, BallTex, StickUseT, StickTex) #macro SphereStringTex(Radius, Length, Pack, InitBallCount, UseTex, BallTexture, Rot) #declare BallCount = -(InitBallCount*Length); #while (BallCount <= (InitBallCount*Length)) #declare X = (BallCount*10)/(InitBallCount*Pack*2); sphere { < X ,1,0>, //BallCount/Length/InitBallCount Radius, 1 #if (UseTex != 0) texture { BallTexture } #end rotate <(BallCount/InitBallCount)*360+Rot,0,0> } #declare BallCount = BallCount+1; // increment our counter #end #end #macro StickStringTex(Radius, Length, Pack, InitBallCount, UseTex, BallTexture) #declare BallCount = -(InitBallCount*Length); #local s1 = seed(33); #local s2 = seed(27567); #while (BallCount <= (InitBallCount*Length)) #declare X = (BallCount*10)/(InitBallCount*Pack*2); cylinder { , //BallCount/Length/InitBallCount , Radius,1 #if (UseTex != 0) texture { BallTexture } #else #declare c = rand(s1)*4; #if (c<=1) #declare r = 0; #declare g = 0; #declare b = 1; #else #if (c<=2) #declare r = 0; #declare g = 1; #declare b = 0; #else #if (c<=3) #declare r = 1; #declare g = 0; #declare b = 0; #else #if (c<=4) #declare r = 1; #declare g = 1; #declare b = 0; #end #end #end #end texture { pigment { color rgb } } #end rotate <(BallCount/InitBallCount)*360,0,0> } cylinder { , //BallCount/Length/InitBallCount , Radius,1 #if (UseTex != 0) texture { BallTexture } #else #if (c<=1) #declare r = 0; #declare g = 1; #declare b = 0; #else #if (c<=2) #declare r = 0; #declare g = 0; #declare b = 1; #else #if (c<=3) #declare r = 1; #declare g = 1; #declare b = 0; #else #if (c<=4) #declare r = 1; #declare g = 0; #declare b = 0; #end #end #end #end texture { pigment { color rgb } } #end rotate <(BallCount/InitBallCount)*360,0,0> } #declare BallCount = BallCount+1; // increment our counter #end #end blob { threshold BallThres SphereStringTex(BallRad, Len, Dens, NumBalls, BallUseT, BallTex,0) SphereStringTex(BallRad, Len, Dens, NumBalls, BallUseT, BallTex, 180) StickStringTex(StickRad, Len, Dens, NumBalls, StickUseT, StickTex) } #end union { DNA2(0.2, 0.6, 0.028, 2, 3, 30, 0,0, 0, 0) texture { pigment { color rgb 1}} rotate <0,0,90> } #declare ic = 0; #declare s1 = seed(13214); #while (ic<=40) object { DNA2(0.3, 0.6, 0.028, 2, 1, 20+rand(s1)*5, 0,0, 0, 0) texture { pigment { color rgb 1}} rotate translate } #declare ic = ic + 1; #end camera { location <0 , 0.0 , -5> look_at <0.0 , 0.0 , 0.0> aperture 0.1 blur_samples 40 focal_point <0,0,0> } #declare Glow_Water = texture { Water finish { ambient 0.6 phong 1 } scale 2 } // create a regular point light source light_source { 0*x // light's position (translated below) color red 1.0 green 1.0 blue 1.0 // light's color translate <10, 10, -100> }