~ubuntu-branches/debian/sid/pyx/sid

« back to all changes in this revision

Viewing changes to examples/drawing/metapost.txt

  • Committer: Package Import Robot
  • Author(s): Stuart Prescott
  • Date: 2012-12-17 13:45:12 UTC
  • mto: (9.1.1 experimental)
  • mto: This revision was merged to the branch mainline in revision 10.
  • Revision ID: package-import@ubuntu.com-20121217134512-q85pr3q75fxii7mq
Tags: upstream-0.12.1
ImportĀ upstreamĀ versionĀ 0.12.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Creating paths with MetaPost-like parameters
 
2
 
 
3
Some simple paths are created by prescribing five points on the path. The
 
4
curves between them are automatically chosen such that the result looks smooth. ...
 
5
 
 
6
Instead of constructing paths from their path elements, where all control
 
7
points must be given explicitly, we here specify only five points which must
 
8
lie on the path. The remaining control points are then internally determined by
 
9
the constraint that the curve should look smooth.
 
10
 
 
11
In the first curve, the geometrical constraints are the following. The three
 
12
interior points have a continuous tangent and a continuous curvature. The two
 
13
end points demand a curvature not too different from that at their neighbor
 
14
(second/fourth point).
 
15
 
 
16
For the closed curve, all points are of the continuous type.
 
17
 
 
18
! The algorithm for calculating the curves comes from MetaPost. In the syntax
 
19
of MetaPost, the above example corresponds to the commands
 
20
 
 
21
  draw((0,0)..(2,1.33)..(1.3,3)..(0.33,2.33)..(1,1.67));
 
22
  draw((0,0)..(2,1.33)..(1.3,3)..(0.33,2.33)..(1,1.67)..cycle);
 
23