Liking cljdoc? Tell your friends :D

clisk.functions

Functions for clisk image synthesis. Images should be generated by composing these functions.

Functions for clisk image synthesis. Images should be generated by composing these functions.
raw docstring

affine-transformclj

(affine-transform matrix-rows)
(affine-transform matrix-rows src)

Performs an affine transformation (implicitly appends a 1 as final row of the input vector)

Performs an affine transformation (implicitly appends a 1 as final row of the input vector)
raw docstring

alphaclj

(alpha v)

Extracts the alpha component of a colour vector. Assumes 1.0 if not present.

Extracts the alpha component of a colour vector. Assumes 1.0 if not present.
raw docstring

apply-to-componentsclj

(apply-to-components f v)

Applies a function f to all components of a vector

Applies a function f to all components of a vector
raw docstring

averageclj

(average & vs)

cclj

A special node that evaluates to the c vector. Used as initial fractal position

A special node that evaluates to the c vector. Used as initial fractal position
raw docstring

C-SYMBOLSclj

A vector of position symbols.

A vector of position symbols.
raw docstring

check-dimsclj

(check-dims & vectors)

clampclj

(clamp v low high)

colour-mapclj

(colour-map mapping)
(colour-map mapping x)

Creates a colour map function using a set of value-colour mappings

Creates a colour map function using a set of value-colour mappings
raw docstring

componentclj


componentsclj


composeclj

(compose f g)
(compose f g & more)

Composes two or more vector functions

Composes two or more vector functions
raw docstring

cross3clj

(cross3 a b)

Returns the cross product of 2 3D vectors

Returns the cross product of 2 3D vectors
raw docstring

diffuse-lightclj

(diffuse-light light-colour light-direction normal-direction)

Calculate the diffuse light on a surface normal vector. This function performs its own normalisation, so neither the light vector nor the normal vector need to be normalised.

Calculate the diffuse light on a surface normal vector.
This function performs its own normalisation, so neither the light vector nor the normal vector need to be normalised.
raw docstring

dimensionsclj


dotclj

(dot a b)

Returns the dot product of two vectors

Returns the dot product of two vectors
raw docstring

ensure-scalarclj

(ensure-scalar x)

evaluateclj


fracclj

(frac x)

Retuns the fractional part of a number. Equivalent to Math/floor.

Retuns the fractional part of a number. Equivalent to Math/floor.
raw docstring

fractalclj

(fractal &
         {:keys [init while update result bailout-result max-iterations]
          :or {init pos}})

gradientclj

(gradient f)

Computes the gradient of a scalar function f with respect to [x y z t]

Computes the gradient of a scalar function f with respect to [x y z t]
raw docstring

heightclj

(height f)

Calculates the height value (z) of a source function

Calculates the height value (z) of a source function
raw docstring

height-normalclj

(height-normal heightmap)
(height-normal scale heightmap)

Calculates a vector normal to the surface defined by the z-value of a source vector or a scalar height value. The result is not normalised.

Calculates a vector normal to the surface defined by the z-value of a source vector or a scalar height value. The result is *not* normalised.
raw docstring

image-filterclj

(image-filter filter source & {:keys [size width height]})

Applies a BufferedImageOp filter to a source image or function.

If size, width of height is specified, renders function at the specified resolution.

Applies a BufferedImageOp filter to a source image or function. 

If size, width of height is specified, renders function at the specified resolution.
raw docstring

lengthclj

(length a)

Calculates the length of a vector

Calculates the length of a vector
raw docstring

lerpclj

Performs clamped linear interpolation between two vectors, according to the proportion given in the 3rd parameter.

Performs clamped linear interpolation between two vectors, according to the proportion given in the 3rd parameter.
raw docstring

let-vectorcljmacro

(let-vector bindings form)

let a vector value into each component of a function

let a vector value into each component of a function
raw docstring

light-valueclj

(light-value light-direction normal-direction)

Calculates diffuse light intensity given a light direction and a surface normal vector. This function performs its own normalisation, so neither the light vector nor the normal vector need to be normalised.

Calculates diffuse light intensity given a light direction and a surface normal vector. 
This function performs its own normalisation, so neither the light vector nor the normal vector need to be normalised.
raw docstring

limited-loopcljmacro

(limited-loop limit [& bindings] form)

limited-recurcljmacro

(limited-recur bailout-result & values)

matrixclj

(matrix rows)

Creates a matrix multiplication function

Creates a matrix multiplication function
raw docstring

matrix-transformclj

(matrix-transform matrix-rows)
(matrix-transform matrix-rows src)

Performs a matrix transformation on the given source

Performs a matrix transformation on the given source
raw docstring

max-componentclj

(max-component v)

Returns the max component of a vector

Returns the max component of a vector
raw docstring

min-componentclj

(min-component v)

Returns the min component of a vector

Returns the min component of a vector
raw docstring

normalizeclj

(normalize a)

Normalizes a vector

Normalizes a vector
raw docstring

offsetclj

(offset offset f)

Offsets a function by a specified amount

Offsets a function by a specified amount
raw docstring

phashclj

(phash x)
(phash x y)
(phash x y z)
(phash x y z t)

Returns a hashed double value in the range [0..1)

Returns a hashed double value in the range [0..1)
raw docstring

PIclj


polarclj

(polar v)

Returns the polar co-ordinates of a vector

Returns the polar co-ordinates of a vector
raw docstring

posclj

A special node that evaluates to the current position in space as a 4D vector.

A special node that evaluates to the current position in space as a 4D vector.
raw docstring

POSITION-SYMBOLSclj

A vector of position symbols.

A vector of position symbols.
raw docstring

radiusclj

(radius v)

Returns the raidus of a vector in polar co-ordinates

Returns the raidus of a vector in polar co-ordinates
raw docstring

render-litclj

(render-lit height)
(render-lit colour height)

Renders example lighting on a couloured surface with a given heightmap function

Renders example lighting on a couloured surface with a given heightmap function
raw docstring

rgbclj

(rgb java-colour)
(rgb r g b)
(rgb r g b a)

Creates an RGB colour vector

Creates an RGB colour vector
raw docstring

rgbaclj

(rgba java-colour)
(rgba r g b)
(rgba r g b a)

Creates an RGBA colour vector

Creates an RGBA colour vector
raw docstring

rotateclj

(rotate angle function)

Rotates a function in the (x,y plane)

Rotates a function in the (x,y plane)
raw docstring

scalar-hash-functionclj

Hash function producing a scalar value in the range [0..1) for every unique point in space

Hash function producing a scalar value in the range [0..1) for every 
unique point in space
raw docstring

scalar-lerpclj

(scalar-lerp proportion a b)

Performs clamped linear interpolation between two values, according to the proportion given in the 3rd parameter.

Performs clamped linear interpolation between two values, according to the proportion given in the 3rd parameter.
raw docstring

scaleclj

(scale factor f)

Scales a function by a given factor.

Scales a function by a given factor.
raw docstring

seamlessclj

(seamless v4)
(seamless scale v4)

Creates a seamless 2D tileable version of a 4D texture in the [0 0] to [1 1] region. The scale argument detrmines the amount of the source texture to be used per repeat.

Creates a seamless 2D tileable version of a 4D texture in the [0 0] to [1 1] region. The scale argument detrmines the amount of the source texture to be used per repeat.
raw docstring

sigmoidclj

Sigmoid function on a scalar or vector in range [0..1]

Sigmoid function on a scalar or vector in range [0..1]
raw docstring

squareclj


square-functionclj

(square-function x)

Retuns the square of a number.

Retuns the square of a number.
raw docstring

stepclj

A step function that works on both vectors and scalars

A step function that works on both vectors and scalars
raw docstring

tclj

(t v)

Extracts the t component of a position vector

Extracts the t component of a position vector
raw docstring

take-componentsclj


TAUclj


texture-mapclj


thetaclj

(theta v)

Returns the angle of a vector in polar co-ordinates

Returns the angle of a vector in polar co-ordinates
raw docstring

triangle-waveclj

Triangular wave function in range [0..1]

Triangular wave function in range [0..1]
raw docstring

v*clj

Multiplies two or more vectors

Multiplies two or more vectors
raw docstring

v+clj

Adds two or more vectors

Adds two or more vectors
raw docstring

v-clj

Subtracts two or more vectors

Subtracts two or more vectors
raw docstring

vabsclj


vconcatclj

(vconcat & vectors)

Concatenate a set of vectors into a longer vector. Treats scalars as 1D vectors.

Concatenate a set of vectors into a longer vector. Treats scalars as 1D vectors.
raw docstring

vcosclj


vdivideclj

Divides two or more vectors

Divides two or more vectors
raw docstring

vector-hashclj

Hash function producing a vector value in the range [0..1)^4 for every unique point in space

Hash function producing a vector value 
in the range [0..1)^4 for every 
unique point in space
raw docstring

vector-offsetsclj

(vector-offsets func)

vectorizeclj


vectorize-opclj

(vectorize-op f & {:keys [zero identity unary-identity]})

Make an arbitrary function work on clisk vectors in a component-wise manner

Make an arbitrary function work on clisk vectors in a component-wise manner
raw docstring

vfloorclj


vforclj

(vfor init
      while
      update
      &
      {:keys [max-iterations result bailout-result] :or {max-iterations 10}})

vfracclj


viewportclj

(viewport a b function)

Rescales the texture as if viwed from [ax, ay] to [bx ,by]

Rescales the texture as if viwed from [ax, ay] to [bx ,by]
raw docstring

vifclj

(vif condition a b)

vletcljmacro

(vlet bindings form)

let one or more values within a vector function

let one or more values within a vector function
raw docstring

vloopclj

(vloop init rest & {:keys [max-iterations] :or {max-iterations 10}})

vmaxclj

Computes the maximum of two vectors

Computes the maximum of two vectors
raw docstring

vminclj

Computes the maximum of two vectors

Computes the maximum of two vectors
raw docstring

vmodclj

Returns the modulus of a vector by component.

Returns the modulus of a vector by component.
raw docstring

vpowclj

Raises a vector to an exponent

Raises a vector to an exponent
raw docstring

vroundclj


vsinclj


vsqrtclj

Takes the square root of a value

Takes the square root of a value
raw docstring

warpclj


xclj

(x v)

Extracts the x component of a position vector

Extracts the x component of a position vector
raw docstring

yclj

(y v)

Extracts the y component of a position vector

Extracts the y component of a position vector
raw docstring

zclj

(z v)

Extracts the z component of a position vector

Extracts the z component of a position vector
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close