[vtkusers] vtkSpline and self closing loop

Vladan Bato vbato at ieee.org
Tue Oct 21 11:27:18 EDT 2003


Shyam Prakash wrote:
> Hello,
> 
>             I was trying to create a spline from a set of points using 
> the example CSpline(/Examples/Rendering/Python/CSpline.py 
> <http://public.kitware.com/cgi-bin/cvsweb.cgi/~checkout~/VTK/Examples/Rendering/Python/CSpline.py> 
> / /Examples/Rendering/Tcl/CSpline.tcl 
> <http://public.kitware.com/cgi-bin/cvsweb.cgi/~checkout~/VTK/Examples/Rendering/Tcl/CSpline.tcl> 
> ). Attached file gives my point coordinate. The strange thing is, the 
> output of the spline contains a self closing loop ( please refer the 
> attached image).  There are no control points lying on this self closing 
> loop. Does any body have the idea why this is happening? 

There are no points lying on the loop, but there is a duplicate control 
point:

> -41.332847595214844, 86.97013092041016, 313.6824035644531
> -41.332847595214844, 86.97013092041016, 313.6824035644531

This causes the loop to be generated. The points on the loop are the 
interpolated values between these control points. Think about what 
happens in 1-D for each coordinate and you'll see why.

 > Is there a way to avoid this?

Just remove duplicate points...

-- 
Vladan Bato
vbato at ieee.org
http://www.geocities.com/vbato/




More information about the vtkusers mailing list