PreviousUpNext

15.3.606  src/lib/x-kit/draw/spline.api

## spline.api

# Compiled by:
#     src/lib/x-kit/draw/xkit-draw.sublib



###                "Before I had chance in another war,
###                 the desire to kill people to whom I had
###                 not been introduced had passed away."
###
###                      -- Autobiography of Mark Twain


# This api is implemented in:
#
#     src/lib/x-kit/draw/spline.pkg
#
api Spline {
    #
    package g:  Xgeometry;              # Xgeometry     is from   src/lib/std/2d/xgeometry.api

    curve:  (g::Point, g::Point, g::Point, g::Point)  ->  List(g::Point);
        #
        # Given four points (p0, p1, p2, p3), return a list of points corresponding to 
        # to a Bezier cubic section, starting at p0, ending at p3, with p1, p2 as
        # control points.


    simple_bspline:  List(g::Point) -> List(g::Point);
        #
        # Compute a simple B-spline with the given control points.


    b_spline:  List(g::Point) -> List(g::Point);
        #
        #   bSpline ([p1]@l@[pn]) === simpleBSpline ([p1, p1, p1]@l@[pn, pn, pn])
        # The replication of p1 and pn constrains the resultant spline 
        # to connect p1 and pn.


    closed_bspline:  List(g::Point) -> List(g::Point);
        #
        # Compute a closed B-spline.
        #   closedBSpline (l as a . b . c . _) = simpleBSpline (l@[a, b, c])
        # Note that the first and last points of the result are the same.
};



## COPYRIGHT (c) 1991 by AT&T Bell Laboratories  See SMLNJ-COPYRIGHT file for details.
## Subsequent changes by Jeff Prothero Copyright (c) 2010-2013,
## released per terms of SMLNJ-COPYRIGHT.


Comments and suggestions to: bugs@mythryl.org

PreviousUpNext