29.11.2012 Views

MetaFun - Pragma ADE

MetaFun - Pragma ADE

MetaFun - Pragma ADE

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

The open path is defined as:<br />

(1cm,1cm)..(1.5cm,1.5cm)..(2cm,0cm)<br />

The ‘double period' connector .. tells METAPOST that we want to connect the lines by a smooth<br />

curve. If you want to connect points with straight line segments, you should use --.<br />

Closing the path is done by connecting the first and last point, using the cycle command.<br />

(1cm,1cm)..(1.5cm,1.5cm)..(2cm,0cm)..cycle<br />

Feel free to use .. or -- at any point in your path.<br />

(1cm,1cm)--(1.5cm,1.5cm)..(2cm,0cm)..cycle<br />

This path, when drawn, looks like this:<br />

As you can see in some of the previous examples, METAPOST is capable of drawing a smooth curve<br />

through the three points that make up the path. We will now examine how this is done.<br />

The six small points are the so called control points. These points pull their parent point in a<br />

certain direction. The further away such a point is, the stronger the pull.<br />

Each point has at most two control points. As you can see in the following graphic, the endpoints<br />

of a non closed curve have only one control point.<br />

Paths Welcome to MetaPost<br />

9

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

Saved successfully!

Ooh no, something went wrong!