POV-Ray : Newsgroups : povray.beta-test : Filling in T values in splines : Re: Filling in T values in splines Server Time
30 Jul 2024 04:21:08 EDT (-0400)
  Re: Filling in T values in splines  
From: Warp
Date: 24 Feb 2002 07:27:55
Message: <3c78dc4b@news.povray.org>
Rune <run### [at] mobilixnetdk> wrote:
> #declare Spline =
> spline {
>    cubic_spline
>    Spline_Points(7)

>    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_End()
> }

  That would be better than nothing.
  Of course there are two things that are a bit bothering: You have to
specify the number of points at the beginning (as always with arrays) and
you have to write extra text ('SCP(...)' and those x's), but I think those
are things that can't be helped currently.

  By the way, it could also be a good idea to add another macro:

#declare Spline =
  spline
  { cubic_spline
    Even_Spline_Points(array[5]{<1,2,3><4,5,6><7,8,9><10,11,12><13,14,15>})
  }

or something similar.

-- 
#macro M(A,N,D,L)plane{-z,-9pigment{mandel L*9translate N color_map{[0rgb x]
[1rgb 9]}scale<D,D*3D>*1e3}rotate y*A*8}#end M(-3<1.206434.28623>70,7)M(
-1<.7438.1795>1,20)M(1<.77595.13699>30,20)M(3<.75923.07145>80,99)// - Warp -


Post a reply to this message

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