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.

12<br />

Note that rotated 15 is equivalent to p rotatedaround (origin, 15).<br />

It may make more sense to rotate the shape around its center. This can easily be achieved with the<br />

rotatedaround command. Again, we move the path to the right afterwards.<br />

p rotatedaround(center p, 15) shifted (4cm,0cm)<br />

Yet another transformation is slanting. Just like characters can be upright or slanted, a graphic can<br />

be:<br />

p slanted 1.5 shifted (4cm,0cm)<br />

The slant operation's main application is in tilting fonts. The x--coodinates are increased by a percentage<br />

of their y--coordinate, so here every x becomes x+1.5y. The y--coordinate is left untouched.<br />

The following table summarizes the most important primitive transformations that METAPOST supports.<br />

METAPOST code mathematical equivalent<br />

(x,y) shifted (a,b) (x + a,y + b)<br />

(x,y) scaled s (sx,sy)<br />

(x,y) xscaled s (sx,y)<br />

(x,y) yscaled s (x,sy)<br />

Welcome to MetaPost Transformations

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

Saved successfully!

Ooh no, something went wrong!