ergetgetagt

Page 28

Chapter 5: Bezier curves

23

greater than or equal to 0.75 (cf. John D. Hobby, Discrete and Computational Geometry 1, 1986): draw((100,0)..tension 2 ..(100,100)..(0,100)); draw((100,0)..tension 2 and 1 ..(100,100)..(0,100)); draw((100,0)..tension atleast 1 ..(100,100)..(0,100)); The curl parameter specifies the curvature at the endpoints of a path (0 means straight; the default value of 1 means approximately circular): draw((100,0){curl 0}..(100,100)..{curl 0}(0,100)); The MetaPost ... path connector, which requests, when possible, an inflection-free curve confined to a triangle defined by the endpoints and directions, is implemented in Asymptote as the convenient abbreviation :: for ..tension atleast 1 .. (the ellipsis ... is used in Asymptote to indicate a variable number of arguments; see Section 6.11.3 [Rest arguments], page 65). For example, compare draw((0,0){up}..(100,25){right}..(200,0){down});

with draw((0,0){up}::(100,25){right}::(200,0){down});

The --- connector is an abbreviation for ..tension atleast infinity.. and the & connector concatenates two paths, after first stripping off the last node of the first path (which normally should coincide with the first node of the second path).


Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.