)abbrev domain PARPCURV ParametricPlaneCurve
++ Author: Clifton J. Williamson
++ Date Created: 24 May 1990
++ Basic Operations: curve, coordinate
++ Related Constructors:
++ Also See:
++ AMS Classifications:
++ Keywords: parametric curve, graphics
++ References:
++ Description: ParametricPlaneCurve is used for plotting parametric plane
++ curves in the affine plane.

ParametricPlaneCurve(ComponentFunction) : Exports == Implementation where
  ComponentFunction : Type
  NNI             ==> NonNegativeInteger

  Exports ==> with
    curve : (ComponentFunction, ComponentFunction) -> %
      ++ curve(c1, c2) creates a plane curve from 2 component functions \spad{c1}
      ++ and \spad{c2}.
    coordinate : (%, NNI) -> ComponentFunction
      ++ coordinate(c, i) returns a coordinate function for c using 1-based
      ++ indexing according to i. This indicates what the function for the
      ++ coordinate component i of the plane curve is.

  Implementation ==> add

    Rep := Record(xCoord : ComponentFunction, yCoord : ComponentFunction)

    curve(x, y) == [x, y]
    coordinate(c, n) ==
      n = 1 => c.xCoord
      n = 2 => c.yCoord
      error "coordinate: index out of bounds"

)abbrev package PARPC2 ParametricPlaneCurveFunctions2
++ Description:
++ This package \undocumented
ParametricPlaneCurveFunctions2(CF1 : Type, CF2 : Type) : with
  map : (CF1 -> CF2, ParametricPlaneCurve(CF1)) -> ParametricPlaneCurve(CF2)
        ++ map(f, x) \undocumented
 == add
  map(f, c) == curve(f coordinate(c, 1), f coordinate(c, 2))

)abbrev domain PARSCURV ParametricSpaceCurve
++ Author: Clifton J. Williamson
++ Date Created: 24 May 1990
++ Basic Operations: curve, coordinate
++ Related Constructors:
++ Also See:
++ AMS Classifications:
++ Keywords: parametric curve, graphics
++ References:
++ Description: ParametricSpaceCurve is used for plotting parametric space
++ curves in affine 3-space.

ParametricSpaceCurve(ComponentFunction) : Exports == Implementation where
  ComponentFunction : Type
  NNI             ==> NonNegativeInteger

  Exports ==> with
    curve : (ComponentFunction, ComponentFunction, ComponentFunction) -> %
      ++ curve(c1, c2, c3) creates a space curve from 3 component functions
      ++ \spad{c1}, \spad{c2}, and \spad{c3}.
    coordinate : (%, NNI) -> ComponentFunction
      ++ coordinate(c, i) returns a coordinate function of c using 1-based
      ++ indexing according to i. This indicates what the function for the
      ++ coordinate component, i, of the space curve is.

  Implementation ==> add

    Rep := Record(xCoord : ComponentFunction, _
                  yCoord : ComponentFunction, _
                  zCoord : ComponentFunction)

    curve(x, y, z) == [x, y, z]
    coordinate(c, n) ==
      n = 1 => c.xCoord
      n = 2 => c.yCoord
      n = 3 => c.zCoord
      error "coordinate: index out of bounds"

)abbrev package PARSC2 ParametricSpaceCurveFunctions2
++ Description:
++ This package \undocumented
ParametricSpaceCurveFunctions2(CF1 : Type, CF2 : Type) : with
  map : (CF1 -> CF2, ParametricSpaceCurve(CF1)) -> ParametricSpaceCurve(CF2)
        ++ map(f, x) \undocumented
 == add
  map(f, c) == curve(f coordinate(c, 1), f coordinate(c, 2), f coordinate(c, 3))

)abbrev domain PARSURF ParametricSurface
++ Author: Clifton J. Williamson
++ Date Created: 24 May 1990
++ Basic Operations: surface, coordinate
++ Related Constructors:
++ Also See:
++ AMS Classifications:
++ Keywords: parametric surface, graphics
++ References:
++ Description: ParametricSurface is used for plotting parametric surfaces in
++ affine 3-space.

ParametricSurface(ComponentFunction) : Exports == Implementation where
  ComponentFunction : Type
  NNI             ==> NonNegativeInteger

  Exports ==> with
    surface : (ComponentFunction, ComponentFunction, ComponentFunction) -> %
      ++ surface(c1, c2, c3) creates a surface from 3 parametric component
      ++ functions \spad{c1}, \spad{c2}, and \spad{c3}.
    coordinate : (%, NNI) -> ComponentFunction
      ++ coordinate(s, i) returns a coordinate function of s using 1-based
      ++ indexing according to i.  This indicates what the function for the
      ++ coordinate component, i, of the surface is.

  Implementation ==> add

    Rep := Record(xCoord : ComponentFunction, _
                  yCoord : ComponentFunction, _
                  zCoord : ComponentFunction)

    surface(x, y, z) == [x, y, z]
    coordinate(c, n) ==
      n = 1 => c.xCoord
      n = 2 => c.yCoord
      n = 3 => c.zCoord
      error "coordinate: index out of bounds"

)abbrev package PARSU2 ParametricSurfaceFunctions2
++ Description:
++ This package \undocumented
ParametricSurfaceFunctions2(CF1 : Type, CF2 : Type) : with
  map : (CF1 -> CF2, ParametricSurface(CF1)) -> ParametricSurface(CF2)
        ++ map(f, x) \undocumented
 == add
  map(f, c) == surface(f coordinate(c, 1), f coordinate(c, 2), f coordinate(c, 3))

--Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
--All rights reserved.
--
--Redistribution and use in source and binary forms, with or without
--modification, are permitted provided that the following conditions are
--met:
--
--    - Redistributions of source code must retain the above copyright
--      notice, this list of conditions and the following disclaimer.
--
--    - Redistributions in binary form must reproduce the above copyright
--      notice, this list of conditions and the following disclaimer in
--      the documentation and/or other materials provided with the
--      distribution.
--
--    - Neither the name of The Numerical ALgorithms Group Ltd. nor the
--      names of its contributors may be used to endorse or promote products
--      derived from this software without specific prior written permission.
--
--THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
--IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
--TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
--PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
--OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
--EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
--PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
--PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
--LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
--NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
--SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
