POV-Ray : Newsgroups : povray.general : b-spline help : Re: b-spline help Server Time
29 Jul 2024 18:24:25 EDT (-0400)
  Re: b-spline help  
From: Le Forgeron
Date: 23 Nov 2010 17:47:19
Message: <4cec4477$1@news.povray.org>
Le 23/11/2010 16:35, Thomas A. Fine nous fit lire :
> Is my assumption about the relationship between cubic b-splines and
> beziers wrong?  Or is povray's sphere_sweep b_spline just some other kind
> of curve?  Or am I on the right track, but just making some mistake in
> representing the data in the appropriate order?
> 

The sphere_sweep object is complex in regard to the type of splines.
(in particular, they are different from the lathe & prism).

For sphere_sweep:
 * linear_spline : reuse the points from one segment to another, need 2
points per segment (the curve (aka line!) go through each point)
 * cubic_spline : reuse the points from one segment to another, need 4
points per segment (preceding, 2 points to go through, next)
cubic_spline is also catmull_rom spline.
 * b_spline : reuse the points from one segment to another, need 4
points per segment (this is not cubic_spline),

For lathe & prism:
 * bezier_spline: group of 4 points not reused per segment: first point
(a), 2 control (b,c) , second point (d). (a,b,c,d)
Recommended that next segment start with (d,...) if continuity is wanted
(you better want that most of the time, but prism can have holes)
 * quadratic_spline: reuse the points from one segment to another, need
3 points per segment : preceding, 2 points to go through.
 * linear_spline, same as sphere_sweep
 * cubic_spline, same as sphere_sweep

And to make matter worse, the spline in SDL is also different (sometime
it maps fine, sometime it's totally different: natural_spline is
unmatched as a shape (lathe/prism/spheresweep), and b_spline is not
available (nor bezier_spline)

(oh, the spline of sor is yet another kind)


Post a reply to this message

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