Next: , Previous: , Up: picture   [Contents][Index]

#### 8.19.3 \qbezier

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), (x2,y2), and (x3,y3). That is, the curve runs from (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}
{"ft_lang_label":"__label__en","ft_lang_prob":0.661991,"math_prob":0.999918,"size":1270,"snap":"2022-27-2022-33","text_gpt3_token_len":489,"char_repetition_ratio":0.123222746,"word_repetition_ratio":0.0,"special_character_ratio":0.38740158,"punctuation_ratio":0.22822823,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9983567,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2022-06-27T09:26:21Z\",\"WARC-Record-ID\":\"<urn:uuid:90863fe4-f974-4827-8f31-66b718e9ec83>\",\"Content-Length\":\"7045\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:b3c305d9-d1a1-4c0b-a278-3f919de3823d>\",\"WARC-Concurrent-To\":\"<urn:uuid:0a9dff0f-d838-4a8f-ac71-ef597486a180>\",\"WARC-IP-Address\":\"96.88.95.60\",\"WARC-Target-URI\":\"https://latexref.xyz/_005cqbezier.html\",\"WARC-Payload-Digest\":\"sha1:R633ASPY3L5TUUUJONGJYFNIJL7IBAMZ\",\"WARC-Block-Digest\":\"sha1:SM5JLPKYABLLDR6IA4BT6WSMEMHKWWIN\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2022/CC-MAIN-2022-27/CC-MAIN-2022-27_segments_1656103329963.19_warc_CC-MAIN-20220627073417-20220627103417-00611.warc.gz\"}"}