|
|
"Numb-C" <ann### [at] philipscom> wrote:
> I always liked this effect and it's cool to see it's done in POVRay too.
> But since I just started with POVRay after years of absence I was wondering
> if one of you guys could post the complete scene ?
Sure, here's mine:
// Persistence of Vision Ray Tracer Scene Description File
// File: elmicro.pov
// Vers: 3.6
// Desc: electron-microscope-like effect
// Date: 050809
// Auth: Helge Hansen
//
#version 3.6;
global_settings {
assumed_gamma 1.0
}
// ----- Camera, etc. -----
camera {
location <0, 0, -8>
direction 1.5*z
right x*image_width/image_height
look_at <0, 0, 0>
}
background { color <1,1,1> * 0 }
fog {
fog_type 1
distance 15
color <0,0,0>
}
// ----- Lights ------
#local N = 12; // number of lights
#local I = 0;
#while (I < N)
light_source {
<0, 500, 50> // (note the z distance)
color <1, 1, 1> * 7.5 / N // adjust strength
parallel
point_at <0, 0, 0>
shadowless
rotate z * I * 360 / N
}
#local I = I + 1;
#end
// ------ Texture -------
#local Surface = texture {
pigment { color rgb <0.80, 0.82, 0.85> }
normal { agate scale 0.1 }
finish { ambient 0 diffuse 1 }
}
// ------ Parts ------
#local Tentacle = union {
torus { 0.1, 0.1 }
cylinder { <0,0,0>, <0,1,0>, 0.1 }
sphere { <0,1,0>, 0.2 }
}
#local Tentacle_sphere = union {
sphere { 0,1 } // main sphere
union {
object { Tentacle
translate y * 1.0
}
object { Tentacle
translate y * 1.0
rotate x * 180
}
#local Tentacles = 0;
#while (Tentacles < 6)
object { Tentacle
translate y * 1.0
rotate x * 60
rotate y * Tentacles * 60
}
#local Tentacles = Tentacles + 1;
#end
#local Tentacles = 0;
#while (Tentacles < 6)
object { Tentacle
translate y * 1.0
rotate x * 120
rotate y * (Tentacles * 60 + 30)
}
#local Tentacles = Tentacles + 1;
#end
}
rotate <90,15,0> // adjustment to avoid looking straight at
// one of the tentacles on one of the closest 'things'
}
// ------ Placing the parts -------
// (not sure if this is optimal; probably a lot of 'things' out of view,
// and some collisions)
#local Distance = 7;
union {
#local rx = seed (1.11);
#local ry = seed (2.22);
#local rz = seed (3.33);
#local rr = seed (4.44);
#local i_z = 15;
#while (i_z > 0)
#local i_y = 6;
#while (i_y > 0)
#local i_x = 8;
#while (i_x > 0)
object { Tentacle_sphere
rotate y * 360 * rand (rr)
translate <
8 * Distance / 2 - i_x * (Distance - 0.5 * Distance * rand(rx)),
6 * Distance / 2 - i_y * (Distance - 0.5 * Distance * rand(ry)),
Distance / 2 + i_z * (Distance - 0.5 * Distance * rand(rz))
>
}
#local i_x = i_x - 1;
#end
#local i_y = i_y - 1;
#end
#local i_z = i_z - 1;
#end
texture { Surface }
}
// ------- the end --------
H
Post a reply to this message
|
|