Synopsis:

\qbezier(x1,y1)(x2,y2)(x3,y3) \qbezier[num](x1,y1)(x2,y2)(x3,y3)

Draw a quadratic Bezier curve whose control points are given by the three required arguments `(`

, `x1`,`y1`)`(`

, and `x2`,`y2`)`(`

. That is, the curve runs from `x3`,`y3`)`(x1,y1)` to `(x3,y3)`, is quadratic, and is such that the tangent line at `(x1,y1)` passes through `(x2,y2)`, as does the tangent line at `(x3,y3)`.

This draws a curve from the coordinate (1,1) to (1,0).

\qbezier(1,1)(1.25,0.75)(1,0)

The curve’s tangent line at (1,1) contains (1.25,0.75), as does the curve’s tangent line at (1,0).

The optional argument `num` gives the number of calculated intermediate points. The default is to draw a smooth curve whose maximum number of points is `\qbeziermax`

(change this value with `\renewcommand`

).

This draws a rectangle with a wavy top, using `\qbezier`

for that curve.

\begin{picture}(8,4) \put(0,0){\vector(1,0){8}} % x axis \put(0,0){\vector(0,1){4}} % y axis \put(2,0){\line(0,1){3}} % left side \put(4,0){\line(0,1){3.5}} % right side \qbezier(2,3)(2.5,2.9)(3,3.25) \qbezier(3,3.25)(3.5,3.6)(4,3.5) \thicklines % below here, lines are twice as thick \put(2,3){\line(4,1){2}} \put(4.5,2.5){\framebox{Trapezoidal Rule}} \end{picture}

© 2007–2018 Karl Berry

Public Domain Software

http://latexref.xyz/_005cqbezier.html