POV-Ray : Newsgroups : povray.newusers : Splines? Server Time
3 Nov 2024 05:20:39 EST (-0500)
  Splines? (Message 1 to 2 of 2)  
From: Greg M  Johnson
Subject: Splines?
Date: 4 Aug 2002 12:59:07
Message: <3d4d5d5b@news.povray.org>
Why does 3.5 accept the first spline but gag on the second??

#declare MySpline =
  spline {
    cubic_spline
    -.25, <0,0,-1>
    0.00, <1,0,0>
    0.25, <0,0,1>
    0.50, <-1,0,0>
    0.75, <0,0,-1>
    1.00, <1,0,0>
    1.25, <0,0,1>
  }


#declare rwristspl=
        spline {
        cubic_spline
       -0.66, <25,68,25>


       -0.33, <12,65,28>


        0.00,  <6,94,15>
        0.33, <25,68,25>
        0.66,  <12,65,28>
        1.00,  <6,94,15>
        1.33, <25,68,20>
        1.66,  <12,65,28>
}


Post a reply to this message

From: Christopher James Huff
Subject: Re: Splines?
Date: 4 Aug 2002 15:40:34
Message: <chrishuff-7CFC92.14313204082002@netplex.aussie.org>
In article <3d4d5d5b@news.povray.org>,
 "Greg M. Johnson" <gregj:-)56590@ao:-)l.com> wrote:

> Why does 3.5 accept the first spline but gag on the second??

This part:

>        -0.66, <25,68,25>
>        -0.33, <12,65,28>
>         0.00,  <6,94,15>

POV ignores white space, so it reads this as:
Pair 1: -0.66, < 25, 68, 25> - 0.33
Pair 2: < 12, 65, 28>, 0.00

Put a comma after each entry to make it unambiguous:

       -0.66, <25,68,25>,
       -0.33, <12,65,28>,
        0.00,  <6,94,15>,

-- 
Christopher James Huff <chr### [at] maccom>
POV-Ray TAG e-mail: chr### [at] tagpovrayorg
TAG web site: http://tag.povray.org/


Post a reply to this message

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