23.10.2014 Views

mfpic-doc.pdf.

mfpic-doc.pdf.

mfpic-doc.pdf.

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

4.2 COMMON OBJECTS. 23<br />

\pshcircle{〈center〉,〈radius〉}<br />

\pshcircle*{〈center〉,〈radius〉}<br />

This produces the circle whose hyperbolic center is at 〈center〉 and whose pseudohyperbolic<br />

radius is 〈radius〉. This all takes place inside the circle with center (0,0) and radius 1 (the unit<br />

circle). The 〈center〉 is required to be inside the unit circle and the 〈radius〉 is required to be less<br />

than 1.<br />

The star-form is for the upper half-plane, which is the set of points with positive y-coordinate In<br />

this case, the 〈center〉 must be in the upper half-plane and the 〈radius〉 must still be less than 1. If<br />

you are not versed in hyperbolic geometry, be warned that the actual diameter of the resulting circle<br />

is on the order of 2y/(1 − R), where R is the 〈radius〉 and y is the y-coordinate of 〈center〉. This can<br />

be quite large even for modest values of R and y.<br />

Finally, an arc-producing macro. This is also related to the hyperbolic geometry of a disk or<br />

a half-plane. The hyperbolic geometry includes a notion of distance that allow one to determine<br />

‘shortest’ path between two points. This shortest path is called a ‘geodesic’ and it turns out (in the<br />

case of the upper half-plane or a disk) to be an arc of a circle: the unique circle that passes through<br />

both points and meets the boundary (of the half-plane or disk) at right angles.<br />

\hypergeodesic{z 1 ,z 2 }<br />

\hypergeodesic*{z 1 ,z 2 }<br />

This produces the hyperbolic geodesic from z 1 = (x 1 ,y 1 ) to z 2 = (x 2 ,y 2 ). For guaranteed results<br />

both points should be in the unit disk (i.e., |z 1 | < 1 and |z 2 | < 1) or, for the star form, both in the upper<br />

half-plane (i.e., y 1 > 0 and y 2 > 0). However, if these are not satisfied an arc of the circle described<br />

above will be drawn whenever not prevented by a numeric overflow. The star form produces the<br />

geodesic for points in the upper half-plane. The normal form produces the geodesic for points in the<br />

unit disk (inside of the circle of radius 1 and center (0,0)). One can use transforms of these to get<br />

geodesics suitable for other disks and other half-planes.<br />

4.2.5 CURVES<br />

\curve[〈tension〉]{〈p 0 〉,〈p 1 〉,...}<br />

\cyclic[〈tension〉]{〈p 0 〉,〈p 1 〉,...}<br />

\closedcurve[〈tension〉]{〈p 0 〉,〈p 1 〉,...}<br />

These figure macros produce a smooth path through the specified points, in the specified order.<br />

It is ‘smooth’ in two ways: it never changes direction abruptly (no ‘corners’ or ‘cusps’ on the<br />

curve), and it tries to make turns that are not too sharp. This latter property is acheived by specifying<br />

(to METAFONT) that the tangent to the curve at each listed point is to be parallel to the line<br />

from that point’s predecessor to its successor. The \cyclic variant arranges for the last point to be<br />

connected (smoothly) to the first, and produces a closed METAFONT Bézier curve. The command<br />

\closedcurve is an alias for \cyclic.<br />

The optional 〈tension〉 influences how smooth the curve is. The special value infinity (in<br />

fact, usually anything greater than about 10), makes the curve not visibly different from a polyline.<br />

The higher the value of tension, the sharper the corners on the curve and the flatter the portions in<br />

between. METAFONT requires the tension to be larger than 0.75. The default value of the tension is<br />

1 when MFPIC is loaded, but that can be changed with the following command.<br />

\settension{〈num〉}<br />

This sets the default tension for all commands that take an optional tension parameter.<br />

Sometimes one would like a convex set of points to produce a convex curve. This will not always

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

Saved successfully!

Ooh no, something went wrong!