Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
624 lines (430 sloc) 20.8 KB
2012-07-06 Rudy Neeser <>
* spline-interpolation.lisp (spline-interpolation): Added some
error checking for unwanted lists.
* rotations.lisp (rotation-z): Renamed ROLL-MATRIX.
(roll-matrix): A synonym for ROTATION-Z
(rotation-y): Renamed YAW-MATRIX
(yaw-matrix): A synonym for ROTATION-Y
(rotation-x): Renamed PITCH-MATRIX
(pitch-matrix): A synonym for ROTATION-X
(*rotation-naming-conventions*): Provides various mappings between
the roll/pitch/yaw functions, and rotations.
(set-rotation-naming-convention): Rebinds the roll/pitch/yaw
functions to the different axes.
2012-06-11 Rudy Neeser <>
* README: Renamed to
* all: Converted repository to git.
2011-09-20 Rudy Neeser <>
* transform.lisp (summation-transformer): Returns a function
that will its arguments together.
2011-09-17 Rudy Neeser <>
* transform.lisp: Added a file for code handling transformations
of other objects.
(transform): A generic method for transforming objects. Have added
a version to handle lists, functions as transformers, vectors and
2011-09-16 Rudy Neeser <>
* package.lisp (#:l-math): Export B-SPLINE-POINTS symbol.
2011-08-30 Rudy Neeser <>
* spline.lisp (print-object): Better print out splines.
2011-08-02 Rudy Neeser <>
* spline-interpolation.lisp (spline-interpolation): Now allows for
closing curves.
* spline.lisp (initialize-instance): Added some better error
2011-08-01 Rudy Neeser <>
* spline-interpolation.lisp (spline-interpolation): Took out a
constant of proportionality which Farin says to use but makes the
interpolation not converge.
* spline.lisp (initialize-instance): Added a centripetal
parameterisation option to the b-spline initialiser.
* basis.lisp (ratio-parameterisation): Have abstracted away
chord-length parameterisation into a general function that can
take an arbitrary distance metric.
(centripetal-parameterisation): Have provided a new
parametrisation method based on the square root of distance
2011-07-30 Rudy Neeser <>
* spline.lisp (initialize-instance): Added chord length
parameterisation, a non-uniform parameterisation.
* basis.lisp: Moved the b-spline basis code into basis.lisp from
* spline-interpolation.lisp (spline-interpolation): Added a method
that will take a series of points and return a b-spline that
interpolates all of the points.
* l-math.asd (:l-math): bumped the version number in preparation
for a release.
2011-07-29 Rudy Neeser <>
* utility.lisp (b-spline-knots): The knot data structure now
has a boolean to indicate whether there are multiplicities or not.
(get-ith-knot): Has an easy speedup for when there are no
* spline.lisp (b-spline): Added a B-SPLINE class, which represents
non-uniform b-splines, although it has much code to speed up the
uniform cubic and quadratic cases.
2011-07-05 Rudy Neeser <>
* spline.lisp (cubic-bezier-curve): Renamed BEZIER-CURVE to
(bezier-curve): Created a new BEZIER-CURVE class which uses
bernstein polynomials directly to calculate the curve. It is also
much faster than the matrix form, CUBIC-BEZIER-CURVE.
* utility.lisp (evaluate-bernstein-polygnomial): A way to evaluate
the bernstein polynomials.
(create-bernstein-polynomial): A function for creating an instance
of a bernstein polynomial.
* generics.lisp (zerop): Added an instance for numbers.
2011-07-04 Rudy Neeser <>
* utility.lisp (#:l-math): Added a file for utility functions.
(factorial): Added a factorial function.
(binomial-coefficient): Calculates binomial-coefficients using
the slower factorial definition.
2011-06-20 Rudy Neeser <>
* spline.lisp (evaluate): Some better error reporting.
2011-06-11 Rudy Neeser <>
* interpolate.lisp (linear-interpolation): Modified this to use a
more standard linear interpolation form between points.
2011-06-09 Rudy Neeser <>
* spline.lisp (coefficient-matrix): Made an easy way to find the
polynomial coefficients that control the shape of the splines /
2011-06-08 Rudy Neeser <>
* spline.lisp (evaluate): Performs some error checking to ensure
that evaluate is not called on a spline with no geometry.
2011-06-07 Rudy Neeser <>
* spline.lisp (matrix-spline): Added a class for splines
represented using a basis matrix.
(evaluate): Added a generic method for evaluating splines.
(spline-geometry): Added a generic method for accessing the
geometry making up a spline.
(set-spline-geometry): Sets the geometry making up a spline
(last-shared-spline): A class that represents splines for which
each segment shares the last geometry of the previous segment.
(three-shared-spline): A class that represents splines for which
each segment shares the last three bits of geometry from the
previous segment.
(hermite-curve): A hermite curve class.
(bezier-curve): A Bézier curve class.
(unrbs-spline): a uniform, non-rational b-spline class.
(catmull-rom-spline): A catmull-rom class.
(maximum-parameter): A method that will return the maximum value
that a parameter may take.
* vector.lisp (length): Allowed LENGTH to work on simple arrays.
* conditions.lisp (spline-geometry-error): Added an error
condition for spline geometry data.
2011-06-06 Rudy Neeser <>
* spline.lisp (spline): Added a class for managing parametric
* basis.lisp: Added a file and some functions for producing
standard basis matrices for various parametric curves and splines.
* *.lisp: Updated copyright date.
2010-11-04 Rudy Neeser <>
* vector.lisp (vector=): Changing the user of lm:- to cl:- speeds
up code.
2010-11-02 Rudy Neeser <>
* operations.lisp (c+): Added a method so that scalar values can
be added to a matrix (it is added to each element).
(c-): Added a method so that scalar values can be subtracted from
a matrix, and a method to allow a matrix to be "subtracted" from a
scalar value.
(c*): Added a method to allow a matrix to be multiplied by a
scalar value.
(c/): Added a method to allow a matrix to be divided by a scalar,
and vice versa.
* tests.lisp (test-dimensions): Added the missing
&allow-other-keys argument.
* operations.lisp (c*): Ensure that dimensions are tested properly
when using non-square matrices.
2010-10-29 Rudy Neeser <>
* matrix.lisp (make-matrix): Ensure that the initial-elements are
converted to double-floats as needed.
2010-10-20 Rudy Neeser <>
* random.lisp (make-random-vector): Ensure that the type placed
into the created vector is a double-float.
2010-10-16 Rudy Neeser <>
* vector.lisp (print-object): Have vectors print their identity in
2010-09-16 Rudy Neeser <>
* rotations.lisp (roll-by, yaw-by, pitch-by): Added functions to
easily rotate vectors without explicitly creating rotation
* operations.lisp (c-): Added the ability to subtract a constant
to a vector, or to "subtract" a vector from a constant.
2010-09-15 Rudy Neeser <>
* operations.lisp (c+): Added the ability to add a constant to a
2010-09-14 Rudy Neeser <>
* interpolate.lisp (bilinear-interpolation): Added a method to
perform bilinear-interpolation.
2010-05-20 Rudy Neeser <>
* l-math.asd (:l-math): Version bump.
* vector.lisp (x,y,z,w): Ensure that the setf-expanders for these
forms coerce the new value to a double.
* matrix.lisp (matrix-elt): Ensured that new elements are coerced
to double in the setf-expander.
* vector.lisp (elt): Coerces the new value to a double in the
(initialise-data): Ensure that the vector's elements are
initialised and set to double.
(make-vector): Ensure the the initial-elements are coerced to a
* matrix.lisp (initialise-data): Ensure that the matrix elements
are initialised, and that the matrix is an appropriate type.
* generics.lisp (equivalent): Added an IGNORE statement to fix a
warning in CLISP
2010-05-11 Rudy Neeser <>
* vector.lisp (to-homogenous): Added an implementation to
transform vectors represented as lists into homogenous
(to-homogenous): ditto for VECTOR objects
* generics.lisp (to-homogenous): Added a method for lifting
something into homogenous space.
* vector.lisp (to-list): Added an implementation that will
transform vectors into lists.
* generics.lisp: Created a generic method that will transform
objects into lists.
* translation.lisp: Added a file for managing translation
* scale.lisp (create-scale-matrix): Created a method to create
non-uniform scales.
(create-uniform-scale-matrix): Returns a matrix that performs
uniform scaling.
* matrix.lisp (make-diagonal): A function that returns diagonal
* scale.lisp: Added a new file to manage scale matrices.
2010-04-13 Rudy Neeser <>
* operations.lisp (create-vector-operation-method): Updated so
that vector operations are performed using loops.
2010-04-12 Rudy Neeser <>
* matrix.lisp (zerop): Returns T iff all members of the matrix are
* vector.lisp (vector=): Performed some optimisations to make
vector comparision quicker.
(zerop): Added a method to test VECTORs and LISTs to see if all
their components are zero.
2010-04-06 Rudy Neeser <>
* random.lisp (uniform): Added a method to create uniformly
distributed values.
2010-03-06 Rudy Neeser <>
* random.lisp (noise3): Fixed a bug: added absolute values to the
interpolation sub-function. Also, changed the use of TRUNCATE to
FLOOR to properly allow for negative values.
2010-03-05 Rudy Neeser <>
* vector-operations.lisp (centre-of-mass): Added a generic
function to calculate the average of a group of points.
2010-02-27 Rudy Neeser <>
* random.lisp (noise3): Updated to test the given argument to
ensure that it is a 3-vector.
* tests.lisp (etest-needed-vector-dimension): A helper macro for
testing required dimension sizes.
(test-dimensions): Added two methods that will test a lm:vector
and list to ensure that they have the required dimension.
* random.lisp (noise3): A 3D perlin noise implementation.
(initialize-noise3): Added a method to initialise the data used by
(*perlin-gradients*, *perlin-permutations*): These store the data
needed for the perlin noise generator.
(draw-noise3-output): A functio that allows the user to output an
image of the perlin noise function.
* conditions.lisp (required-dimension-error): Added a new subclass
of dimension-error. Allows operations requiring specific
dimensions to report errors.
2010-02-23 Rudy Neeser <>
* interpolate.lisp (between): Modifed to take numbers as
(linear-interpolation): Fixed a bug in the method accepting
numbers as arguments.
2010-02-22 Rudy Neeser <>
* random.lisp (normal): Added a function to create normally
distributed values.
(make-random-vector): Added a function to create a vector filled
with random values.
(make-random-matrix): Added a function to create a matrix filled
with random data.
2010-02-19 Rudy Neeser <>
* README (If): Updated the README file to discuss the changes to
* interpolate.lisp (linear-interpolation): Added a method so that
this function can operate on numbers.
2010-01-30 Rudy Neeser <>
* LICENSE: Updated to ensure that the license is "GPL, version 3,
and later versions". This was originally intended, and is is the
text in each individual source file.
* README: Some minor updates relating to how the LICENSE is
2010-01-27 Rudy Neeser <>
* matrix.lisp (matrix=): Added a function to compare matrix
(dimension): Added an implementation for MATRIX objects.
* generics.lisp (copy): Added an implementation that copies lists.
(equivalent): Added a generic function to test for equivalence
between two objects.
* vector.lisp (dimension): Renamed LENGTH to DIMENSION.
(length): Created a new LENGTH function that is an alias to
(negate!): Added this for lists.
2010-01-26 Rudy Neeser <>
* COPYING: Added a copy of the GPLv3.
* LICENSE: Added the beginnings of a file discussing licensing.
* README: Added the beginnings of a README file.
* vector-operations.lisp (dot-product): Dot product can now
operate on lists.
(euclidean-distance): Updated to work with lists.
2010-01-22 Rudy Neeser <>
* vector.lisp (normalise): Provided a version that operates on
(normalise!): Provided a version that operates on lists.
2009-12-18 Rudy Neeser <>
* package.lisp (#:l-math): Exported *equivalence-tolerance*.
* tests.lisp (test-nonzero): Updated to
use *equivalence-tolerance*.
* vector.lisp (vector=): Updated to use *equivalence-tolerance*.
* generics.lisp (*equivalence-tolerance*): Added a variable that
defines how similar objects should be before they are considered
2009-12-16 Rudy Neeser <>
* vector.lisp (vector=): Modifed to allow lists.
* matrix.lisp (matrix): Changed precision to double-float.
* vector.lisp (vector): Changed precision to double-float.
* vector-operations.lisp (angle-between): Increased precision in
this function to use double-floats. Now the angle between 90
degree vectors is reported as exactly 90 degrees.
2009-12-15 Rudy Neeser <>
* vector.lisp (norm): Added a version of NORM to operate on lists.
* tests.lisp (test-nonzero): A test for methods to easily signal a
condition when its argument has a zero norm.
* conditions.lisp (zero-norm-error): Added a condition for
singaling when a vector argument is zero.
* vector-operations.lisp (angle-between): Added a function to
return the angle between two vectors.
2009-11-04 Rudy Neeser <>
* vector.lisp (to-vector): Speed up TO-VECTOR by falling through
if the asked for dimension is the same as that of the given
* matrix.lisp (matrix): Updated the matrix to not store row and
column information separately. Added separate MATRIX-ROWS and
MATRIX-COLS methods to return these values.
* vector.lisp (vector): Added an :initarg and :type for the vector
DATA slot.
* matrix.lisp (make-load-form): Created a method for serialising
matrix object.
* vector.lisp (vector): Added a documentation string.
(make-load-form): Created a method for serialising vector objects.
2009-09-11 Rudy Neeser <>
* vector.lisp (elt): Returns the element of a list, as though it
were an array.
2009-09-10 Rudy Neeser <>
* interpolate.lisp (between): Added a method to calculate the
point between two vectors.
(linear-interpolation): Modified so that it accepts lists as
arguments as well.
* vector.lisp (to-vector): Added a key to specify the dimension of
the vector to transform the data to.
2009-09-07 Rudy Neeser <>
* operations.lisp: Added type information when signalling
conditions of type OPERATION-NOT-SUPPORTED to give more
information to callers of c+, c-, c* and c/
* conditions.lisp (operation-not-supported): Updated the condition
to be able to supply extra information as to why the operation
2009-09-02 Rudy Neeser <>
* vector.lisp (negate): Added a method to return the additive
inverse of a list.
* operations.lisp: Added addition, subtraction, multiplication and
division operations on lists, treating them as vectors. Also
includes a mechanic to cast lists up to vectors when required.
* operations.lisp (create-list-operation-method): Added a macro to
define vector operations, such as addition and subtraction, on
* tests.lisp (test-dimensions): Added a test to test the
dimensions of lists in various operations.
* conditions.lisp (operation-not-supported): Fixed a bug that
stopped this condition from being reported.
2009-05-20 Rudy Neeser <>
* package.lisp (#:create-rotation-from-view-to-view): Exported the
* rotations.lisp (create-rotation-from-view-to-view): Creates a
rotation matrix that will rotate one vector on to another.
* package.lisp (#:create-rotation-from-view): Exported
* rotations.lisp (fill-row): A non-exported macro that allows for
filling in rows of a matrix while constructing one.
(create-rotation-from-view): A new function that creates rotation
matrices given a view direction and a global up vector.
* package.lisp (#:matrix-elt): Added MATRIX-ELT to the list of
exported package symbols.
* vector.lisp (print-object): Updated to print vectors using only
3 places after the decimal point.
* matrix.lisp (print-object): updated to print matrices using only
3 places after the decimal point.
2009-04-20 Rudy Neeser <>
* vector.lisp (to-vector): Created a generic function to convert
objects of various types to vectors.
(to-vector): Created a method that converts vectors into vectors.
(to-vector): Created a method to convert lists into vectors.
2009-04-06 Rudy Neeser <>
* vector.lisp (normalise!): Put in a test to ensure that we don't
attempt to normalise vectors of length 0.
(normalise): As above: put in a test to ensure that we don't
attempt to normalise vectors of length 0.
2009-03-05 Rudy Neeser <>
* vector.lisp (length): Added a way to tell the length of a vector
represented as a list.
2009-03-04 Rudy Neeser <>
* vector.lisp (x): Added a method that will act on lists, as FIRST
(setf x): An appropriate setf to work with lists.
(y): Added a method to act on lists, as x above.
(setf y): To set the y of a list.
(z): Added a method to act on lists, as x above.
(setf z): To set the z of a list.
2009-02-26 Rudy Neeser <>
* vector-operations.lisp: New file where various vector operations
will be moved to and implemented.
(dot-product): Moved here from vector.lisp. A test to ensure that
the vectors are the correct dimensions has been added.
(cross-product): Moved here from vector.lisp. Tests for
dimensionality have been added.
(euclidean-distance): Calculates the euclidean distance between
two vectors.
(euclidean-distance): Provide a function to calculate the
euclidean distance between two numbers.
2009-02-16 Rudy Neeser <>
* vector.lisp (cross-product): Added a function to calculate the
vector cross-product for 3-vectors.
2009-02-10 Rudy Neeser <>
* matrix.lisp (transpose): Created a new generic function which
returns the transpose of a matric.
2008-11-25 Rudy Neeser <>
* operations.lisp (-): Fixed a bug allowing unary lm:- to operate
as expected on VECTOR and MATRIX objects. In other words, it now
correctly negates these objects, rather than raising a condition.
* vector.lisp (copy): Provide an implementation for VECTORs.
* matrix.lisp (negate): Provide an implementation for MATRIX
(copy): Provide a method to copy MATRIX objects.
* generics.lisp (copy): Created a generic function that returns a
copy of the objects that it is given.
* matrix.lisp (negate!): Added an implementation of NEGATE! for
* vector.lisp (negate!): Added an implementation of the NEGATE!
generic function for VECTORs.
* generics.lisp (negate!): Added a destructive generic method
which returns the additive inverse of an item.
* vector.lisp (negate): Added an implementation of NEGATE for the
VECTOR class.
* generics.lisp (negate): Created a generic method which is meant
to return the additive inverse of an item. Provided an
implementation for all CL NUMBERs.
* rotations.lisp (create-rotation-matrix): Added a function which
can be given a rotation frame and will supply the necessary
rotation matrix to rotate into that frame.
2008-08-10 Rudy Neeser <>
* interpolate.lisp: Add the file. Should contain all the various
interpolation methods that I will require.
(linear-interpolation): Interpolates between two points, using a
parameteric line equation.
2008-08-08 Rudy Neeser <>
* vector.lisp (dot-product): Added a function to calculate the dot
product between two vectors.
(dot-product): Added tests to ensure that the vectors are of the
same length.