[Tugindia] psbezier

Ravi Gautam aol_gautam at rediffmail.com
Sun Aug 14 19:03:25 CEST 2005


Yes Krishnan, 
You are correct. Actually I didn't see the output, for the case in which number of control points are more than four, carefully as I was mainly concerned about the quadratic case. In my experiment I had taken first point as (0,0) and the curve was very twisted I didn't notice that it is actually interpolating one of the input points. 

Thanks for your reply. 

Also Can any body please help me getting started with pstricks for plotting 3D curves and surfaces. More precicisely 3d Bezier curves and surfaces.

I have tried few instructions given in CTAN home /  tex-archive/  graphics/  pstricks/  doc

etc. But I am yet to get my programs compiling. 

Thanking you in advance.


Regards,
Ravi Shankar Gautam


On Sun, 14 Aug 2005 EKrishnan wrote :
>On Fri, 12 Aug 2005, Ravi Gautam wrote:
>
> > I am confused about psbezier. It takes more than 4 control points
> > without any problem. But It gives error output for 3 and lesser number
> > of control points.
>
>By definition, the command "\psbezier" draws a curve dtermined by
>\emph{four} specified points, using a \emph{cubic} polynomial (called the
>Berstien polynomial). Some experiments with this command gave these
>results.
>
>If only three points are specified, the origin (0,0) is taken as the first
>point to compute this polynomial. If only two points are specified, the
>origin is taken as the first point and the last point given is taken as
>the third \emph{and} fourth points to compute the polynomial.
>
>IF more than four points are specified, various Bezier curves are drawn
>and pasted together like this: the last four points are used to draw a
>Bezier curve, then the four points ending at the first of the last four
>points are used to draw another curve and so on.
>
>Thus
>
>  \psbezier(1,2)(2,2)(2,3)(4,3)(5,1)(6,2)(7,2)(8,1)
>
>is equivalent to
>
>  \psbezier(5,1)(6,2)(7,2)(8,1)
>  \psbezier(2,2)(2,3)(4,3)(5,1)
>  \psbezier(0,0)(1,2)(2,2)(2,2)
>
>--
>Krishnan
>
>


More information about the tugindia mailing list