MetaFun - Pragma ADE
MetaFun - Pragma ADE MetaFun - Pragma ADE
8 This path is constructed out of four points: Such a path has both a beginning and end and runs in a certain direction: A path can be open or closed. The previous path is an example of a closed path. An open path looks like this: When we close this path —and in a moment we will see how to do this— the path looks like: Welcome to MetaPost Paths
The open path is defined as: (1cm,1cm)..(1.5cm,1.5cm)..(2cm,0cm) The ‘double period' connector .. tells METAPOST that we want to connect the lines by a smooth curve. If you want to connect points with straight line segments, you should use --. Closing the path is done by connecting the first and last point, using the cycle command. (1cm,1cm)..(1.5cm,1.5cm)..(2cm,0cm)..cycle Feel free to use .. or -- at any point in your path. (1cm,1cm)--(1.5cm,1.5cm)..(2cm,0cm)..cycle This path, when drawn, looks like this: As you can see in some of the previous examples, METAPOST is capable of drawing a smooth curve through the three points that make up the path. We will now examine how this is done. The six small points are the so called control points. These points pull their parent point in a certain direction. The further away such a point is, the stronger the pull. Each point has at most two control points. As you can see in the following graphic, the endpoints of a non closed curve have only one control point. Paths Welcome to MetaPost 9
- Page 1: Hans Hagen metafun context mkiv
- Page 5 and 6: Introduction This document is about
- Page 7 and 8: Content Conventions . . . . . . . .
- Page 9 and 10: 1 Conventions When reading this man
- Page 11: 1 Welcome to MetaPost 1.1 Paths 2 I
- Page 15 and 16: 1.2 Transformations We can store a
- Page 17 and 18: (x,y) zscaled (u,v) (xu − yv,xv +
- Page 19 and 20: z0 = (0.5cm,1.5cm) ; z1 = (2.5cm,2.
- Page 21 and 22: 4 0 1 3 2 "z0..z1..z2..z3..z0" Only
- Page 23 and 24: 0 1 3 2 "z0..z1..z2--z3" Watch how
- Page 25 and 26: 0 1 0 2 2 1 "(z0..z1..z2..z3) cutaf
- Page 27 and 28: 2 0 1 Using ( ) is not mandatory bu
- Page 29 and 30: 0 4 1 3 2 0 These two graphics were
- Page 31 and 32: Since we don't consider this unfill
- Page 33 and 34: First there is the concept of varia
- Page 35 and 36: 1.8 Loops Yet another programming c
- Page 37 and 38: If in the definition of doublescale
- Page 39 and 40: test (a) (b) (c) (d) ; test (a,b) (
- Page 41 and 42: If you forget about the colors, the
- Page 43 and 44: linejoin=mitered linecap=butt linej
- Page 45 and 46: 1.15 Text Most dashpatterns can be
- Page 47 and 48: Z13 Z24 Z14 Z1 Z12 Z2 Z21 Z23 Z11 Z
- Page 49 and 50: 3 Because we want to call this macr
- Page 51 and 52: dotlabel.rt ("$Z_{3}$", z3) ; dotla
- Page 53 and 54: A different approach is to use a tw
- Page 55 and 56: The graphic extends beyond the boun
- Page 57 and 58: p := (p shifted (5cm,0)) randomized
- Page 59 and 60: path p ; p := (0,0) -- (2cm,3cm) ;
- Page 61 and 62: path p ; p := (0cm,0cm) -- (4cm,1cm
8<br />
This path is constructed out of four points:<br />
Such a path has both a beginning and end and runs in a certain direction:<br />
A path can be open or closed. The previous path is an example of a closed path. An open path<br />
looks like this:<br />
When we close this path —and in a moment we will see how to do this— the path looks like:<br />
Welcome to MetaPost Paths