
Thu, 07/19/2007 - 00:33
Forums:
# This is a 3D polyline. It turn like half a circle in the plan +X+Y
# and for each segment, the line lift in the air. It make like a rought
# toronado made with 4 segements. How can I transforme this line in a
# nice and smouth 3D curve ?
polyline p \
cos(0) sin(0) 0 \
cos(pi/4) sin(pi/4) 1 \
cos(pi/2) sin(pi/2) 2 \
cos(3*pi/4) sin(3*pi/4) 3 \
cos(pi) sin(pi) 4
Is somebody can give me a hint ?
Thu, 07/19/2007 - 14:11
I think spline B-spline can do the work
Thu, 07/19/2007 - 18:38
And for my case, what parameters do I need to use to feed the bsplincurve fonction ?
degree ?
nbknots ?
umult pole ?
weight ?
What is the formula to passe my polyline parameters to the bsplinecurve parameters ?
Thu, 07/19/2007 - 18:41
check GeomAPI_PointsToBSpline or GeomAPI_Interpolate
HTH,
Stephane
Thu, 07/19/2007 - 19:02
Wow, it seem very interesting, but how I can use it in DRAWEXE ? I am not a programmer !
Fri, 07/20/2007 - 10:10
The following script produces the b-spline curve. It writes the intermediate file with points. The command interpol calls GeomAPI_Interpolate.
set fid [open "pnts.dat" w]
puts $fid "5 3d"
puts $fid "[dval cos(0)] [dval sin(0)] 0"
puts $fid "[dval cos(pi/4)] [dval sin(pi/4)] 1"
puts $fid "[dval cos(pi/2)] [dval sin(pi/2)] 2"
puts $fid "[dval cos(3*pi/4)] [dval sin(3*pi/4)] 3"
puts $fid "[dval cos(pi)] [dval sin(pi)] 4"
close $fid
interpol c "pnts.dat"