POV-Ray : Newsgroups : povray.programming : function helps with splines?? : function helps with splines?? Server Time
16 Jun 2024 16:27:46 EDT (-0400)
  function helps with splines??  
From: Chrisir
Date: 19 Jul 2005 18:20:01
Message: <web.42dd7b77fecffd8e547270140@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.