Common Lisp Package: BLACK-TIE

README:

Black Tie

status: active

A noise library in Common Lisp

<table align="center" width="100%"><tr><td>&nbsp;</td><td align="center"><img src="http://www.aerique.net/software/black-tie/wood-2.png"></td><td>&nbsp;</td></tr></table>

Introduction

This library is still in it's infancy and only supports very few types of noise yet.

It offers both heavily optimized (tested only on SBCL so far) and reference implementations if they are available.

License

This project is released under the simplified BSD license.

Features

Documentation

None. See the examples/textures.lisp.

<table align="center" border="0" width="100%"><tr><td align="center"><img src="http://www.aerique.net/software/black-tie/goo.png"></td><td align="center"><img src="http://www.aerique.net/software/black-tie/voronoi-2d-sum.png"></td><td align="center"><img src="http://www.aerique.net/software/black-tie/canvas.png"></td></tr></table>

FUNCTION

Public

PERLIN-NOISE-REF (X Y Z)

X, Y and Z should be floats for the best results.

PERLIN-NOISE-REFERENCE (X Y Z)

X, Y and Z should be floats for the best results.

PERLIN-NOISE-SF

X, Y and Z need to be SINGLE-FLOATS.

PERLIN-NOISE-SINGLE-FLOAT

X, Y and Z need to be SINGLE-FLOATS.

SIMPLEX-NOISE-1D-SF

SINGLE-FLOAT version of SIMPLEX-NOISE-1D which has less accuracy but is a lot faster and generally good enough unless you need the precision.

SIMPLEX-NOISE-1D-SINGLE-FLOAT

SINGLE-FLOAT version of SIMPLEX-NOISE-1D which has less accuracy but is a lot faster and generally good enough unless you need the precision.

SIMPLEX-NOISE-2D-SF

SINGLE-FLOAT version of SIMPLEX-NOISE-2D which has less accuracy but is a lot faster and generally good enough unless you need the precision.

SIMPLEX-NOISE-2D-SINGLE-FLOAT

SINGLE-FLOAT version of SIMPLEX-NOISE-2D which has less accuracy but is a lot faster and generally good enough unless you need the precision.

SIMPLEX-NOISE-3D-SF

SINGLE-FLOAT version of SIMPLEX-NOISE-3D which has less accuracy but is a lot faster and generally good enough unless you need the precision.

SIMPLEX-NOISE-3D-SINGLE-FLOAT

SINGLE-FLOAT version of SIMPLEX-NOISE-3D which has less accuracy but is a lot faster and generally good enough unless you need the precision.

Undocumented

BANDS3D (X Y Z &KEY (FN #'PERLIN-NOISE) (OCTAVES 8) (MULTIPLIER 2))

FBM2D (X Y &KEY (FN #'SIMPLEX-NOISE-2D) (OCTAVES 8) (MULTIPLIER 2))

FBM3D (X Y Z &KEY (FN #'PERLIN-NOISE) (OCTAVES 8) (MULTIPLIER 2))

PERLIN-NOISE

RIDGE3D (X Y Z &KEY (FN #'PERLIN-NOISE) (OCTAVES 8) (MULTIPLIER 2) (RIDGE 0.0))

SIMPLEX-NOISE-1D

SIMPLEX-NOISE-1D-REF (X)

SIMPLEX-NOISE-1D-REFERENCE (X)

SIMPLEX-NOISE-2D

SIMPLEX-NOISE-2D-REF (X Y)

SIMPLEX-NOISE-2D-REFERENCE (X Y)

SIMPLEX-NOISE-3D

SIMPLEX-NOISE-3D-REF (X Y Z)

SIMPLEX-NOISE-3D-REFERENCE (X Y Z)

TURBULENCE3D (X Y Z &KEY (FN #'PERLIN-NOISE) (OCTAVES 8) (MULTIPLIER 2))

Private

DEFALIAS (FUNCTION ALIAS)

Defines an alias for FUNCTION, meaning it can be called with ALIAS as well.

PERLIN-NOISE-CLOSURE (&OPTIONAL (PRECISION 128))

Returns a closure which can be called just like PERLIN-NOISE-SINGLE-FLOAT. PRECISION will be used to determine the size of the precalculated perlin cube. The higher the precision to more elements will be in the cube and the more precise it will be (and the more memory it will consume). The number of elements in the cube is determined as PRECISION^3. NOTE: This does not give the same results for the same inputs as PERLIN-NOISE!

PERLIN-NOISE-COMPARE (FN1 &KEY (FN2 #'PERLIN-NOISE-REFERENCE) (LINES 20) (SLEEP-TIME 0.0))

Compares the output of FN1 to the output of FN2.

VLENGTH (V)

Returns the length of vector V.

Undocumented

APPEND1 (LST OBJ)

ASDF (SYSTEM)

CURRENT-DATE-TIME-STRING

ERROR-MESSAGE (MSG)

FADE

FADE-REF (V)

FADE-SF

GRAD

GRAD-REF (HASH X Y Z)

GRAD-SF

LAST1 (LST)

LERP

LERP-REF (V A B)

LERP-SF

MKFSTR (&REST ARGS)

MKSTR (&REST ARGS)

PERLIN-NOISE-BENCHMARK (&KEY (FN #'PERLIN-NOISE-REFERENCE) (ITERATIONS 2500000))

QUIT

SIMPLEX-NOISE-COMPARE (FN1 FN2 &KEY (LINES 20) (SLEEP-TIME 0.0))

SNGRAD1D

SNGRAD1D-REF (HASH X)

SNGRAD1D-SF

SNGRAD2D

SNGRAD2D-REF (HASH X Y)

SNGRAD2D-SF

SNGRAD3D

SNGRAD3D-REF (HASH X Y Z)

SNGRAD3D-SF

SNGRAD4D (HASH X Y Z TT)

VERBOSE (MSG)

WRITE-TO-FILE (NAME OBJECT)

MACRO

Private

Undocumented

WITH-2D ((X-VAR X-MAX Y-VAR Y-MAX &KEY (X-MIN 0) (Y-MIN 0) (STEP 1)) &BODY BODY)

WITH-3D ((X-VAR X-MAX Y-VAR Y-MAX Z-VAR Z-MAX &KEY (X-MIN 0) (Y-MIN 0) (Z-MIN 0) (STEP 1)) &BODY BODY)

GENERIC-FUNCTION

Private

Undocumented

DISTANCES (V2D X Y &KEY (SORTED T))

SLOT-ACCESSOR

Private

Undocumented

1/P (OBJECT)

NUMBER-OF-POINTS (OBJECT)

POINTS (OBJECT)

PSQRT (OBJECT)

VARIABLE

Private

Undocumented

+F2+

+F3+

+G2*2+

+G2+

+G3*2+

+G3*3+

+G3+

+PNP+

CLASS

Private

Undocumented

VORONOI-2D