POV-Ray : Newsgroups : povray.general : Spline vector function : Spline vector function Server Time
23 Apr 2024 23:56:50 EDT (-0400)
  Spline vector function  
From: John Greenwood
Date: 19 Nov 2016 13:40:00
Message: <web.58309bfd590a407fa7cafab50@news.povray.org>
I am experimenting with this:
#version 3.7 ;
  global_settings {assumed_gamma 1.0 }

    camera {location <-10,40,-40> angle 4 look_at <0,0,0> }
    light_source {<-5,20,-20> colour rgb<1,1,1>}
  background { color rgb<0.2, 0.4, 0.8>  }


#declare Place = function {
  spline {
    linear_spline
//    -4, <-10,0,-2>
    -2, <0,0,-1>
    0, <1,0,0>
    2.0, <0,1,1>
    }
  }
 sphere {Place(-1),.1 pigment {color rgb < 1, 0, 0>}}
 sphere {Place(-.5),.1pigment {color rgb < 1, 1, 0>} }
 sphere {Place(-0),.1 pigment {color rgb < 0, 1, 0>}}
 sphere {Place(+.5),.1 pigment {color rgb < 1, 0, 1>}}
 sphere {Place(+1),.1 pigment {color rgb < 0, 0, 1>}}

This seems to work but if I add another point by deleting the // I get an error
which does not make sense (to me).

Should it be possible to do arbitarily long bezier splines?


Post a reply to this message

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