Description Usage Arguments Details Value Author(s) References See Also Examples
These functions can be used to describe a MetaPost path, consisting of two or more knots, with various constraints on how the path behaves between the knots.
1 2 3 4 5 6 7 8 9 10 | knot(x, y, units = getOption("metapost.units"),
dir = NA, dir.left = dir, dir.right = dir,
cp.left.x = NA, cp.right.x = NA, cp.left.y = NA, cp.right.y = NA,
curl.left = NA, curl.right = NA,
tension.left = NA, tension.right = NA)
cp(x, y, units = getOption("metapost.units"))
curl(x)
cycle()
dir(x, y = NULL)
tension(x)
|
x |
Numeric value: a location (for |
y |
Numeric value: a location (for |
units |
The grid coordinate system to use for locations (if locations are only given as numeric values). |
dir, dir.left, dir.right |
A numeric angle. |
cp.left.x, cp.right.x, cp.left.y, cp.right.y |
A numeric location. |
curl.left, curl.right |
A numeric curl value (must be at least 0). |
tension.left, tension.right |
A numeric tension value (must be at least 3/4). A negative values indicates a lower bound. |
A MetaPost path is constructed using calls to knot
and
combining the results using the +
operator (see the examples
below).
Constraints for a knot can be specified within the call to knot
or by combining connectors (cp
, dir
, etc)
with a knot using +
.
Knots can also be combined using -
(a straight line rather than
a curve), %+%
(no inflection), and %-%
(straight
line with smooth connection) operators.
The individual functions generate knots and connectors, but when
combined together, they produce a MetaPost path ("mppath"
) object.
Paul Murrell
Hobby, J. D. and the MetaPost development team (2018). METAPOST a user's manual. https://www.tug.org/docs/metapost/mpman.pdf
metapost
,
mpost
,
mptrace
,
grid.metapost
.
1 2 3 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.