POV-Ray : Newsgroups : povray.beta-test : Filling in T values in splines : Re: Filling in T values in splines - update Server Time
30 Jul 2024 06:26:27 EDT (-0400)
  Re: Filling in T values in splines - update  
From: Rune
Date: 24 Feb 2002 13:49:11
Message: <3c7935a7@news.povray.org>
I've currently gotten the syntax below to work. It's not nessesary to
specify the number of points, and it's possible to mix points that has
optional T values with points extracted from an array.

#declare MyArray = array[6]{
   <4,5,8>,<5,7,3>,<5,1,2>,<6,5,2>,<7,5,3>,<2,0,6>
}

#declare Spline =
spline {
   cubic_spline

   SCP( 0.0, <0,1,2>)
   SCP(   x, <1,5,0>)
   SCP(   x, <4,1,0>)
   SCP( 0.9, <0,2,1>)
   SCP( 1.0, <0,0,1>)
   SCP(   x, <6,5,4>)
   SCP( 2.0, <4,3,2>)
   Spline_Add_Points(MyArray,2.5,4.5)

   Spline_End()
}

Rune
--
3D images and anims, include files, tutorials and more:
Rune's World:    http://rsj.mobilixnet.dk (updated Feb 16)
POV-Ray Users:   http://rsj.mobilixnet.dk/povrayusers/
POV-Ray Webring: http://webring.povray.co.uk


Post a reply to this message

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