POV-Ray : Newsgroups : povray.general : Another Spline Inconsistency : Another Spline Inconsistency Server Time
19 Nov 2024 15:36:35 EST (-0500)
  Another Spline Inconsistency  
From: Rune
Date: 16 Feb 2002 06:54:39
Message: <3c6e487f@news.povray.org>
As shown in my post "Cubic spline question" the cubic spline used in
spline{} is completely different from the cubic spline used in prisms, yet
they go under the same name.

In this post I'll show a case of the opposite - two identical splines go
under completely different names.

The catmull_rom_spline used in sphere_sweeps is in fact exactly identical to
the cubic_spline used in prisms. Why do they have different names? I don't
know. It dates back to MegaPov of course, but POV-Ray 3.5 is not MegaPov.
Well, at least it should be rather easy to fix as it's just a matter of
changing the keyword I would think. The code below illustrates that the two
spline types are in fact the same.

camera {location 10*y look_at 0}
light_source {1000*y, color 1}
plane {y, 0 pigment {checker rgb 1.0, rgb 0.9}}
sphere_sweep {
   catmull_rom_spline
   8,
   <-2,0, 0>, 0.02,
   < 0,0,-2>, 0.02,
   < 4,0, 0>, 0.03,
   < 1,0, 1>, 0.01,
   < 0,0, 4>, 0.03,
   <-2,0, 0>, 0.02,
   < 0,0,-2>, 0.02,
   < 4,0, 0>, 0.03
   pigment {color <0,0,1>}
}
prism {
   cubic_spline
   0, 0.01
   8,
   <-2, 0>,
   < 0,-2>,
   < 4, 0>,
   < 1, 1>,
   < 0, 4>,
   <-2, 0>,
   < 0,-2>,
   < 4, 0>
   pigment {color <0,1,0>}
}

Rune
--
3D images and anims, include files, tutorials and more:
Rune's World:    http://rsj.mobilixnet.dk (updated Jan 20)
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.