|
|
"Kenneth" <kdw### [at] gmailcom> wrote:
> At this point, I'll assume that phase *is* operating correctly (but that the
> radial pattern example is wrong.) Barring any last-minute brainstorms in this
> newsgroup thread about the reverse being true, I'll go with that assumption.
I made boxes with a frequency of 1/pi, and did the same 5-degree phase shift per
box. It gives you the same "backwards" shift,
BUT
if you think about what sin(x+_phase) would give you as you increase _phase,
then I suppose it makes sense...
//------------
#version 3.71;
global_settings {assumed_gamma 1.0}
#declare W = image_width;
#declare H = image_height;
#declare Zoom = 1;
camera {
orthographic
location <W/2, -H/2, -10> // position & direction of view
look_at <W/2, -H/2, 0>
right 1*x*image_width/Zoom // horizontal size of view
up 1*y*image_height/Zoom // vertical size of view
}
// 0 for radial, 1 for translation
#declare N = 1;
#switch (N)
#case (0)
#for (Y, 0, 5)
#for (X, 0, 5)
cylinder { <0, -1, 0>, <0, 0, 0>, min (W/14, H/14)
texture {
pigment {
radial
frequency 1
phase radians(Y*5+X)
color_map {
[0.5 srgb <248, 196, 121>/255]
[0.5 rgb 1]
}
}
finish {ambient 0 emission 1 diffuse 0}
}
rotate -x*90
translate <(W/12+X*W/6), -(Y*H/6+H/12), 0>
}
#end
#end
#break
#case (1)
#for (Y, 0, 5)
#for (X, 0, 5)
box { <1, 1, 1>*-1, <1, 1, 1>
texture {
pigment {
gradient x
frequency 1/pi
phase radians(Y*5+X)
color_map {
[0.5 rgb <1, 0, 0>]
[0.5 rgb 1]
}
}
finish {ambient 0 emission 1 diffuse 0}
}
scale min (W/14, H/14)
translate <(W/12+X*W/6), -(Y*H/6+H/12), 0>
}
#end
#end
#break
#else
// Do nothing
#end // end switch - case/range - break
Post a reply to this message
|
|