12.07.2015 Views

The memoir class - The UK TeX Archive

The memoir class - The UK TeX Archive

The memoir class - The UK TeX Archive

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

D.4. Bezier curvesTypeset example D.11: Picture: repetitions You can also make regular two-dimensional patterns by using a \multiput pattern insideanother \multiput. As La<strong>TeX</strong> will process each \multiput every time it is repeatedit is often more convenient to store the results of the first \multiput in a bin and then usethis as the argument to the second \multiput.Source for example D.11\setlength{\unitlength}{1mm}\begin{picture}(32,14)\put(0,0){\framebox(32,14){}}\savebox{\Mybox}(8,8){\multiput(0,0)(4,4){3}{\circle*{1}}}\multiput(4,4)(6,0){4}{\usebox{\Mybox}}\sbox{\Mybox}{}\end{picture}\setlength{\unitlength}{1pt}Remember that a storage bin must have been declared via a \newsavebox commandbefore it can be used. I originally declared and used the \Mybox bin in §D.2.2. As the aboveexample shows, you can change the contents of a storage bin by utilising it in another\savebox. Storage bins can use up a lot of La<strong>TeX</strong>’s memory. After you have finished witha storage bin empty it via the \sbox command with an empty last argument, as shown inthe example.D.4 BEZIER CURVESStandard La<strong>TeX</strong> provides one further drawing command — the \qbezier command. Thiscan be used for drawing fairly arbitrary curves.\qbezier[〈num〉](〈Xs, Ys〉)(〈Xm, Ym〉)(〈Xe, Ye〉)<strong>The</strong> command will draw what geometers call a quadratic Bezier curve from the point (〈Xs,Ys〉) to the point (〈Xe, Ye〉). <strong>The</strong> curve will pass somewhere near to the point (〈Xm, Ym〉).Bezier curves are named after Pierre Bezier who first used them in 1962. <strong>The</strong>y arewidely used in Computer Aided Design (CAD) programs and other graphics and fontdesign systems. Descriptions, with varying degrees of mathematical complexity, can befound in many places: when I was a practicing geometer these included [FP80], [Mor85]425

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!