|
![](/i/fill.gif) |
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.
Thank you very much for your help!
J T
Post a reply to this message
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
J T <jte### [at] chello nl> 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
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
In article <oprto4gdzg7d64w7@news.povray.org>,
J T <jte### [at] chello nl> wrote:
> 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.
Put a comma after MyPoint? If that doesn't work...what is the code
you're using for the random point generator?
--
Christopher James Huff <cja### [at] earthlink net>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tag povray org
http://tag.povray.org/
Post a reply to this message
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
Christopher James Huff wrote:
>In article <oprto4gdzg7d64w7[at]news.povray.org>,
>Put a comma after MyPoint? If that doesn't work...what is the code
>you're using for the random point generator?
>
Yeah, it does work!
I had to generate random points before and always got an error about some
code found where some value was expected, so I just figured that a spline
didn't like to see code in the definition.
This post made me go back and play around with it some more. Don't know
what I was doing before, but it works fine now!
RG - yet another question answered that I didn't ask
Post a reply to this message
|
![](/i/fill.gif) |