|
|
#include "transforms.inc"
global_settings {assumed_gamma 1}
#default {finish {ambient 0 diffuse 1}}
background {rgb 1}
#local CamPos = < 0, 5,-8>*2;
camera {
location CamPos
up y*image_height/image_width
right x
look_at < 0, 1, 0>
angle 35
}
light_source {CamPos, color rgb 0.05}
light_source {<-100, 100,-500>, color White}
light_source {<100, 50,-25>, color rgb 0.1}
plane {y, 0
texture {
pigment {checker rgb 0, rgb 1}
}
}
#local Path =
spline {natural_spline
-0.1, <-0.5, 0, 0>,
0.0, < 0, 0, 0>,
0.3, < 2, 0, 0.5>,
0.5, < 4, 0, 2>,
0.6, < 5, 0, 6>,
0.7, < 0, 0, 4>,
0.75, <-2, 0, 5>,
0.8, <-4, 0, 5>,
0.9, <-3, 0, 1>,
1.0, <-2, 0,-1>,
1.1, <-2, 0,-1.5>,
}
#macro SplineLength(Spline, IntStart, IntEnd, SubIntervals)
#local J = 0;
#local Len = 0;
#local N = SubIntervals;
#local IntLen = (IntEnd - IntStart);
#local Delt = IntLen/N;
#while(J < SubIntervals)
#local Len = Len + vlength(Spline(IntLen*J/N + IntStart + Delt)
- Spline(IntLen*J/N + IntStart));
#local J = J + 1;
#end
(Len)
#end
#macro SplineDirection(Spline, T)
vnormalize(Spline(T + 0.01) - Spline(T))
#end
#macro Wheel(Spline, Clock, Rad, Obj)
#local Circumference = Rad*2*pi;
object {Obj
rotate -z*360*SplineLength(spline {Spline}, 0, Clock,
500)/Circumference
Reorient_Trans(x, SplineDirection(spline {Spline}, Clock))
translate y*Rad + Spline(Clock)
}
#end
/*union {
#local J = 0;
#local N = 20;
#while(J < N)
Wheel(spline {Path}, J/N, 1,
sphere {< 0, 0, 0>, 1 scale < 1, 1, 0.1>
texture {
pigment {radial rotate -x*90
color_map {
[0 rgb < 1, 0, 0>]
[1/6 rgb < 1, 1, 0>]
[2/5 rgb < 0, 1, 0>]
[3/6 rgb < 1, 0, 1>]
[4/6 rgb < 0, 0, 1>]
[5/6 rgb < 0, 1, 1>]
[6/6 rgb < 1, 0, 0>]
}
}
}
}
)
#local J = J + 1;
#end
}*/
Wheel(spline {Path}, clock, 1,
sphere {< 0, 0, 0>, 1 scale < 1, 1, 0.1>
texture {
pigment {radial rotate -x*90
color_map {
[0 rgb < 1, 0, 0>]
[1/6 rgb < 1, 1, 0>]
[2/5 rgb < 0, 1, 0>]
[3/6 rgb < 1, 0, 1>]
[4/6 rgb < 0, 0, 1>]
[5/6 rgb < 0, 1, 1>]
[6/6 rgb < 1, 0, 0>]
}
}
}
}
)
--
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tagpovrayorg
http://tag.povray.org/
Post a reply to this message
|
|