POV-Ray : Newsgroups : povray.general : Help on Splines : Help on Splines Server Time
1 Aug 2024 16:30:59 EDT (-0400)
  Help on Splines  
From: Chrisir
Date: 20 Jul 2005 04:05:02
Message: <web.42de04fd3147da22c869c55d0@news.povray.org>
Hello!

I am looking for a function that helps me with splines.

I want to give the function the ***exact*** start point (x1,y1,z1) and end
point (x2,y2,z2) of an spline and the height (h) of it - nothing more.



All other things should be figured out by the function.
The spline stands in a right angle to plane below.


The stuff in the function should be something similar to what you see below
the message.
A sphere i moved along the spline.

The Problem is to get the points ***exactly*** to a given start and end
position (x,y,z). I'd line to begin the first sphere exact at (above) the
star-point xyz.

I really like to have a functon doing it.

Thanks a lot!

Chrisir


// +++++++++++++++++++++++++++++++++++++++++++++++++++


#declare MySpline =
  spline {
    cubic_spline
    -0.25,<-1,  -1.6,-.85>
   0.10, <-.87,1.05,-.85>
   0.80, <.64, 1.1,.6>
   1, <1.8, -1.4, 1.1>
  }

#declare ctr = -.3;
#while (ctr < 1.2)
  sphere {
    MySpline(ctr), .05
    pigment { rgb <0.5,1,0> }
  }
  #declare ctr = ctr + 0.01;
#end

// +++++++++++++++++++++++++++++++++++++++++++++++++++


Post a reply to this message

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