Wiki
Download
Manual
Eggs
API
Tests
Bugs
show
edit
history
You can edit this page using
wiki syntax
for markup.
Article contents:
== Outdated egg! This is an egg for CHICKEN 4, the unsupported old release. You're almost certainly looking for [[/eggref/5/parametric-curve|the CHICKEN 5 version of this egg]], if it exists. If it does not exist, there may be equivalent functionality provided by another egg; have a look at the [[https://wiki.call-cc.org/chicken-projects/egg-index-5.html|egg index]]. Otherwise, please consider porting this egg to the current version of CHICKEN. [[tags:egg]] == Parametric curve The {{parametric-curve}} library provides an implementation of parametric curves. Parametric curves are n-dimensional curves described by parametric equations, one per each dimension. For example: x = a cos (t) y = a sin (t) z = bt In this example, {{t}} is the parameter, and {{a}} and {{b}} are constants. [[toc:]] == Usage (require-extension parametric-curve) == Documentation === Procedures <procedure>parametric-curve? :: OBJECT -> BOOL</procedure> Returns {{#t}} if the given object is a parametric curve, {{#f}} otherwise. <procedure> simple-curve :: N * K * FS * TMIN * TMAX -> PCURVE </procedure> Basic parametric curve constructor. ; {{N}} : number of interpolation points (N >= 3) ; {{K}} : continuity class of the interpolating spline for this curve (1 or 2, for first or second derivative) ; {{FS}} : a list of one-argument procedures that are evaluated to obtain points on the curve. The length of {{FS}} determines the dimensionality of the curve ; {{TMIN}} : minimum value for the curve parameter ; {{TMIN}} : maximum value for the curve parameter <procedure> sample-curve :: PCURVE -> (T -> POINT) </procedure> Constructs a procedure to sample the curve at the given parameter value. <procedure> sample-curve* :: PCURVE -> (T LIST -> POINT LIST) </procedure> Constructs a procedure to sample the curve at the given parameter values. <procedure> linear-curve :: N * COEFFS * TMIN * TMAX -> PCURVE </procedure> Constructor for a linear curve of the form {{c1 * x + c2}}. ; {{N}} : number of interpolation points (N >= 3) ; {{COEFFS}} : supplies c1 and c2 for the different dimensions ; {{TMIN}} : minimum value for the curve parameter ; {{TMAX}} : maximum value for the curve parameter <procedure> line-segment:: N * COEFFS -> PCURVE </procedure> Creates a line segment whose starting point is zero, and its end points is defined by {{COEFFS}}. {{N}} is the number of interpolating points. <procedure> map-curve :: FS * PCURVE -> PCURVE </procedure> Maps the given functions to the parametric curve. <procedure> iterate-curve :: PCURVE * N -> POINT LIST </procedure> Samples a parametric curve at {{N}} regular intervals in the range {{xmin..xmax}} inclusive. <procedure> range-curve :: PCURVE * N * (X1,XN) LIST -> POINT LIST </procedure> Samples a parametric curve at regular intervals in the given ranges. <procedure> arc-length :: PCURVE * DX -> NUMBER </procedure> Computers the arc length of the curve given step DX. == Examples == About this egg === Author [[/users/ivan-raikov|Ivan Raikov]]. === Version history ; 1.13 : Added matchable as a test dependency [reported by mario] ; 1.7 : Added arc-length ; 1.4 : Added line-segment ; 1.0 : Initial release === License Copyright 2012-2015 Ivan Raikov This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. A full copy of the GPL license can be found at <http://www.gnu.org/licenses/>.
Description of your changes:
I would like to authenticate
Authentication
Username:
Password:
Spam control
What do you get when you subtract 6 from 19?