|
![](/i/fill.gif) |
I've uploaded to my freeserve site an 800*600 52k jpeg to show why I was
yelling for help. I wanted a spider's web to go with my 2 year old spider on
Compuserve homepage. One part completed fly to go. Been nibbling at the web
problem for months.
Your solution looks just dandy Chris, many thanks and looks like I can sleep
now :o)
Thanks Bill for your suggestion. Curve is the right shape but x-spacing is
linear. I can work from that tho' if I need to..
And Peter - still working on yours before I had to get upstairs too. Added
the loop decrements as well <i=i-1> incase anyone is puzzled.
Alf
One spider's web (under construction ;-)
http://www.peake42.freeserve.co.uk/pix1/web.jpg
and 1 completed hairy spider:
http://ourworld.compuserve.com/homepages/Alf_Peake/
Chris Colefax <cco### [at] geocities com> wrote in message
news:383bde32@news.povray.org...
> Alf Peake <alf### [at] peake42 freeserve co uk> wrote:
> > 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 feel a sine function is involved but the best I have managed
> > is shown here which I'm not satisfied with. It shows linear Red
> > points converted to nonlinear Blue points.
>
> You could use a sine curve, but this doesn't give you much control over
> the amount of pinching. Perhaps breaking the linear sequence into two
> sections (before and after 0.75) and applying powers to them could work
> (normalising each section first, inverting the first and raising both to
> the same power, and then retransforming each section back to fit):
>
> union {
> #declare C = 0; #while (C <= 1)
> sphere {x*(C < .75
> ? (1 - pow(1 - (C/.75), 2))*.75
> : pow((C-.75)/.25, 2)*.25 + .75
> ), .02}
> #declare C = C + 1/20; #end
> pigment {rgb <0, 0, 1>}}
>
Post a reply to this message
|
![](/i/fill.gif) |