ergetgetagt

Page 101

Chapter 8: Base modules

96

• true, the point is added to the existing guide; • default, the point is added to a new guide; • false, the point is omitted and a new guide is begun. The points are connected using the interpolation specified by join: • operator -- (linear interpolation; the abbreviation Straight is also accepted); • operator .. (piecewise Bezier cubic spline interpolation; the abbreviation Spline is also accepted); • Hermite (standard cubic spline interpolation using boundary condition notaknot, natural, periodic, clamped(real slopea, real slopeb)), or monotonic. The abbreviation Hermite is equivalent to Hermite(notaknot) for nonperiodic data and Hermite(periodic) for periodic data). •

guide graph(picture pic=currentpicture, real x(real), real y(real), real a, real b, int n=ngraph, real T(real)=identity, interpolate join=operator --); guide[] graph(picture pic=currentpicture, real x(real), real y(real), real a, real b, int n=ngraph, real T(real)=identity, bool3 cond(real), interpolate join=operator --); Returns a graph using the scaling information for picture pic of the parametrized function (x(t),y(t)) for t in the interval [T(a),T(b)], sampling at n points evenly spaced in [a,b], optionally restricted by the bool3 function cond on [a,b], using the given interpolation type. guide graph(picture pic=currentpicture, pair z(real), real a, real b, int n=ngraph, real T(real)=identity, interpolate join=operator --); guide[] graph(picture pic=currentpicture, pair z(real), real a, real b, int n=ngraph, real T(real)=identity, bool3 cond(real), interpolate join=operator --); Returns a graph using the scaling information for picture pic of the parametrized function z(t) for t in the interval [T(a),T(b)], sampling at n points evenly spaced in [a,b], optionally restricted by the bool3 function cond on [a,b], using the given interpolation type. guide graph(picture pic=currentpicture, pair[] z, interpolate join=operator --); guide[] graph(picture pic=currentpicture, pair[] z, bool3[] cond, interpolate join=operator --); Returns a graph using the scaling information for picture pic of the elements of the array z, optionally restricted to those indices for which the elements of the boolean array cond are true, using the given interpolation type. guide graph(picture pic=currentpicture, real[] x, real[] y,


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