POV-Ray : Newsgroups : povray.general : Pinching points : Re: Pinching points Server Time
10 Aug 2024 17:32:04 EDT (-0400)
  Re: Pinching points  
From: Bill DeWitt
Date: 24 Nov 1999 09:40:01
Message: <383bf8c1@news.povray.org>
Alf Peake <alf### [at] peake42freeservecouk> 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

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.