|
![](/i/fill.gif) |
Alf Peake <alf### [at] peake42 freeserve co uk> wrote in message
news:383b2166@news.povray.org...
> Given a loop that goes from 0 to 1, in say, 20 equal steps,
> how would I use these figures to give me the same range but
> in non-linear steps that "pinch" or tend to bunch together at
> around 0.75?
>
I use a simple sine function to offset the peak a little, perhaps it will
help you.
////////////// Camera //////////////////////
camera { //
right < -1.333, 0.0, 0.0 > //
up < 0.0, 1.0, 0.0 > //
direction < 0.0, 0.0, 1.0 > //
location < 0.0, 0.0, 4.0 > //
look_at < 0.0, 0.0, 0.0 > //
} //
////////////// end Camera //////////////////
/////////////// Light ////////////////
light_source { < 100.0, 100.0, 100.0 >
color rgb < 1.0, 1.0, 1.0 > }
///////////////////////////////////////
#declare I = 0;
#while ( I < 1)
sphere {0, 0.05 pigment { rgb 1 } translate < I, sin((I*I*I)*pi), 0 > }
#declare I = I + 0.001;
#end
Post a reply to this message
|
![](/i/fill.gif) |