POV-Ray : Newsgroups : povray.general : spline question : Re: spline question Server Time
4 Aug 2024 02:21:53 EDT (-0400)
  Re: spline question  
From: gonzo
Date: 10 Aug 2003 16:43:22
Message: <3f36ae6a@news.povray.org>
J T <jte### [at] chellonl> wrote in message
news:oprto4gdzg7d64w7@news.povray.org...
> Hi,
>
> I am using a spline, with randomly generated points. I use a while loop
for
> placing spheres on the points of the spline. I want to set the first point
> of the spline myself, instead of randomly generated. How can I do that? I
> tried the following:
>
> spline {
>  natural_spline
>   0,MyPoint
>   // ...here is the code for the randomgenerator...
>  }
>
> But that doesn't work. First the randomgenerator and then my point didn't
> work either.
>

I don't think you can have the generator code within the spline definition.
I did something like that & I had to declare ;
    array points[num_points] { my_point, ,,(fill rest of array with
randomgenerator),, }

Then build the spline from the array;
    spline {
        natural_spline
         0, points[0], points[1], ,,(on out to num_points...)
    }

RG


Post a reply to this message

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