Liking cljdoc? Tell your friends :D
Clojure only.

clisk.live

Namespace with all includes ready for live coding.

Namespace with all includes ready for live coding.
raw docstring

*anti-alias*clj


add-glowclj

(add-glow image-with-alpha
          &
          {:keys [glow-radius glow-colour glow-background blur-image-size]
           :or {glow-radius 0.2
                glow-colour yellow
                glow-background [0.0 0.0 0.0 0.0]
                blur-image-size 256}})

Adds a glow effect to any image with an alpha channel

Adds a glow effect to any image with an alpha channel
raw docstring

adjust-hslclj

(adjust-hsl shift source)

adjust-hueclj

(adjust-hue shift source)

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

agateclj

A monochrome agate-style rock texture

A monochrome agate-style rock texture
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

alpha-from-argbclj

(alpha-from-argb argb)

Gets the alpha component value from an ARGB integer

Gets the alpha component value from an ARGB integer
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)

blackclj


blotchesclj

A blothchy monochome pattern

A blothchy monochome pattern
raw docstring

blueclj


blue-from-argbclj

(blue-from-argb argb)

Gets the blue component value from an ARGB integer

Gets the blue component value from an ARGB integer
raw docstring

blue-from-hslclj

(blue-from-hsl colour-vector)

bright-colourful-mapclj


brownclj


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

cannonclj


check-dimsclj

(check-dims & vectors)

checkerclj

(checker a b)

Checker pattern in (x,y) space, with 2*2 grid in [0..1,0..1] range

Checker pattern in (x,y) space, with 2*2 grid in [0..1,0..1] range
raw docstring

checker-3Dclj

(checker-3D a b)

Checker pattern in (x,y,z) space, with 222 grid in [0..1,0..1,0..1] range

Checker pattern in (x,y,z) space, with 2*2*2 grid in [0..1,0..1,0..1] range
raw docstring

clampclj

(clamp v low high)

clojureclj


cloudsclj

A cloudlike texture

A cloudlike texture
raw docstring

code-nodeclj

(code-node form & {:keys [objects] :or {objects nil}})

Creates a node from a given code form (may be a vector). Does not preserve objects - must be copied over manually.

Creates a node from a given code form (may be a vector). Does not preserve objects - must be copied over manually.
raw docstring

colour-bandsclj


colour-cubesclj

4 dimensional randomly coloured unit hypercubes filling space

4 dimensional randomly coloured unit hypercubes filling space
raw docstring

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

colourful-mapclj


compile-fnclj

(compile-fn node)

compile-render-fnclj

(compile-render-fn node)

compile-scalar-nodeclj

(compile-scalar-node n)

componentclj


COMPONENT_TO_DOUBLEclj


componentsclj


composeclj

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

Composes two or more vector functions

Composes two or more vector functions
raw docstring

constant-nodeclj

(constant-node v)

Create a node that returns a constant value, can be either a constant vector or scalar value

Create a node that returns a constant value, can be either a constant vector or scalar value
raw docstring

constant-node?clj

(constant-node? x)

context-class-loaderclj

(context-class-loader)

cross3clj

(cross3 a b)

Returns the cross product of 2 3D vectors

Returns the cross product of 2 3D vectors
raw docstring

cyanclj


darkGrayclj


DEFAULT-IMAGE-SIZEclj


DEFAULT-VORONOI-POINTSclj


desert-mapclj


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)

errorcljmacro

(error & vals)

Throws a clisk error with the provided message(s)

Throws a clisk error with the provided message(s)
raw docstring

evaluateclj


expression-infoclj

(expression-info expr)

Uses the Clojure compiler to analyze the given s-expr. Returns a map with keys :class and :primitive? indicating what the compiler concluded about the return value of the expression. Returns nil if no type info can be determined at compile-time.

Example: (expression-info '(+ (int 5) (float 10))) Returns: {:class float, :primitive? true}

Uses the Clojure compiler to analyze the given s-expr.  Returns
a map with keys :class and :primitive? indicating what the compiler
concluded about the return value of the expression.  Returns nil if
no type info can be determined at compile-time.

Example: (expression-info '(+ (int 5) (float 10)))
Returns: {:class float, :primitive? true}
raw docstring

expression-info-internalclj

(expression-info-internal expr)

flecksclj

Stranges wispy flecks

Stranges wispy flecks
raw docstring

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}})

function-nodeclj

(function-node f & scalars)

Creates a node which is a scalar function of scalar nodes. Function should be provided as a symbol.

Creates a node which is a scalar function of scalar nodes. Function should be provided as a symbol.
raw docstring

generate-colour-mapclj

(generate-colour-map
  &
  {:keys [hue-variation lightness-variation saturation-variation frequency
          hue-frequency lightness-frequency saturation-frequency base-colour]})

generate-scalar-codeclj

(generate-scalar-code n)

globeclj

(globe)
(globe function)
(globe function background)

Creates a globe, returning the value of the function called on the surface of a unit sphere.

(globe) alone produces z values that Can be used as a hight map

Creates a globe, returning the value of the function called 
on the surface of a unit sphere. 

(globe) alone produces z values that Can be used as a hight map
raw docstring

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

grainclj

Pattern returning a unique vector in [0..1)^4 range value for every point in 4D space

Pattern returning a unique vector in [0..1)^4 range value for every point in 4D space
raw docstring

grayclj


greenclj


green-from-argbclj

(green-from-argb argb)

Gets the green component value from an ARGB integer

Gets the green component value from an ARGB integer
raw docstring

green-from-hslclj

(green-from-hsl colour-vector)

gridlinesclj

(gridlines &
           {:keys [colour background width scale]
            :or {colour [1 1 1 1] background [0 0 0 0] width 0.0625 scale 1.0}})

hash-cubesclj

4 dimensional randomly coloured unit hypercubes filling space

4 dimensional randomly coloured unit hypercubes filling space
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

hsl-from-rgbclj

(hsl-from-rgb rgb)

hue-from-rgbclj

(hue-from-rgb colour-vector)

hue-functionclj

(hue-function r g b)

imageclj

(image vector-function
       &
       {:keys [width height size anti-alias] :or {size DEFAULT-IMAGE-SIZE}})

Creates a bufferedimage from the given clisk data

Creates a bufferedimage from the given clisk data
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

imgclj

(img node)
(img node w h)
(img node w h dx dy)

Creates a BufferedImage from the given node.

Creates a BufferedImage from the given node.
raw docstring

is-constantclj

(is-constant value)

JAVA-COLOURSclj


landscape-mapclj


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

lightGrayclj


lightness-from-rgbclj

(lightness-from-rgb colour-vector)

lightness-functionclj

(lightness-function r g b)

limited-loopcljmacro

(limited-loop limit [& bindings] form)

limited-recurcljmacro

(limited-recur bailout-result & values)

load-imageclj

(load-image resource-name)

magentaclj


make-multi-fractalclj

(make-multi-fractal function
                    &
                    {:keys [octaves lacunarity gain scale]
                     :or {octaves 8 lacunarity 2.0 gain 0.5 scale 0.5}})

Creates a multi-fractal function from a given source function with additional parameters

Creates a multi-fractal function from a given source function with additional parameters
raw docstring

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

monochromeclj

(monochrome src)

Converts to monochrome

Converts to monochrome
raw docstring

new-imageclj

(new-image w h)

new-nodeclj

(new-node props)

Create a new AST node with the given properties

Create a new AST node with the given properties
raw docstring

nodeclj

(node a)

node-infoclj

(node-info node)

node?clj

(node? x)

noiseclj


normalizeclj

(normalize a)

Normalizes a vector

Normalizes a vector
raw docstring

object-nodeclj

(object-node v)

Creates a node with an embedded Java object

Creates a node with an embedded Java object
raw docstring

offsetclj

(offset offset f)

Offsets a function by a specified amount

Offsets a function by a specified amount
raw docstring

orangeclj


perlin-noiseclj

Standard 4-dimensional scalar perlin noise in range [0..1]

Standard 4-dimensional scalar perlin noise in range [0..1]
raw docstring

perlin-snoiseclj

4-dimensional scalar perlin noise standardised with mean zero, range [-1..1]

4-dimensional scalar perlin noise standardised with mean zero, range [-1..1]
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


pinkclj


pixelizeclj

(pixelize size src)

Pixelizes an image with pixels of given size

Pixelizes an image with pixels of given size
raw docstring

plasmaclj

4 dimensional plasma, in range [0..1]

4 dimensional plasma, in range [0..1]
raw docstring

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-symbol-vectorclj


POSITION-SYMBOLSclj

A vector of position symbols.

A vector of position symbols.
raw docstring

posterizeclj

(posterize src & {:keys [bands] :or {bands 4}})

Posterization effect with discrete colour bands.

Posterization effect with discrete colour bands.
raw docstring

primitive?cljmacro

(primitive? expression)

psychedelicclj

(psychedelic src
             &
             {:keys [noise-scale noise-bands]
              :or {noise-scale 0.2 noise-bands 2.0}})

Psychedelic colour effect

Psychedelic colour effect
raw docstring

purpleclj


radialclj

(radial src & {:keys [repeat] :or {repeat 1.0}})

Wraps an image around an origin in a radial fashion in the x-y plane

Wraps an image around an origin in a radial fashion in the x-y plane
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

redclj


red-from-argbclj

(red-from-argb argb)

Gets the red component value from an ARGB integer

Gets the red component value from an ARGB integer
raw docstring

red-from-hslclj

(red-from-hsl colour-vector)

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

rgb-from-hslclj

(rgb-from-hsl hsl)

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

sampleclj

(sample node)
(sample node pos)

Samples the value of a node at a given position

Samples the value of a node at a given position
raw docstring

samplerclj

(sampler node)

Creates a sampler function for a given node, which is a fn from position to sample value

Creates a sampler function for a given node, which is a fn from position to sample value
raw docstring

saturation-from-rgbclj

(saturation-from-rgb colour-vector)

saturation-functionclj

(saturation-function r g b)

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

scalar-node?clj

(scalar-node? x)

scaleclj

(scale factor f)

Scales a function by a given factor.

Scales a function by a given factor.
raw docstring

scale-imageclj

(scale-image img w h)

Scales an image to a given width and height

Scales an image to a given width and height
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

seed-perlin-noise!clj

(seed-perlin-noise!)
(seed-perlin-noise! s)

Modify the perlin noise seed.

Modify the perlin noise seed.
raw docstring

seed-simplex-noise!clj

(seed-simplex-noise!)
(seed-simplex-noise! s)

Modify the simplex noise seed.

Modify the simplex noise seed.
raw docstring

shatterclj

(shatter src & args)

Breaks an image up into sharp irregular fragments defined by a Voronoi map

Breaks an image up into sharp irregular fragments defined by a Voronoi map
raw docstring

showclj

(show
  image-or-function
  &
  {:keys [width height size anti-alias] :or {size DEFAULT-IMAGE-SIZE} :as ks})

Creates and shows an image from the given image vector function

Creates and shows an image from the given image vector function
raw docstring

show-compclj

(show-comp com & {:keys [title] :as options :or {title nil}})

Shows a component in a new frame

Shows a component in a new frame
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

simplex-noiseclj

Standard 4-dimensional scalar perlin noise in range [0..1]

Standard 4-dimensional scalar perlin noise in range [0..1]
raw docstring

simplex-snoiseclj

4-dimensional scalar simplex noise standardised with mean zero, range [-1..1]

4-dimensional scalar simplex noise standardised with mean zero, range [-1..1]
raw docstring

snoiseclj


splasmaclj

4 dimensional plasma, in range [-1..1]

4 dimensional plasma, in range [-1..1]
raw docstring

spotsclj

A spotted monochome pattern

A spotted monochome pattern
raw docstring

squareclj


square-functionclj

(square-function x)

Retuns the square of a number.

Retuns the square of a number.
raw docstring

static-castcljmacro

(static-cast class-sym expression)

Performs a static type cast

Performs a static type cast
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

sunset-mapclj


swirlclj

(swirl src)
(swirl rate src)

Swirls a function around the origin with a given rate

Swirls a function around the origin with a given rate
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-boundcljmacro

(texture-bound v offset width max)

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

tileclj

(tile pattern)

Tiles a pattern in the range [0..1,0..1]

Tiles a pattern in the range [0..1,0..1]
raw docstring

transform-componentsclj

(transform-components f & nodes)

Calls transform-node separately on each component of a set of nodes. Returns a scalar iff all input nodes are scalar.

Calls transform-node separately on each component of a set of nodes. Returns a scalar iff all input nodes are scalar.
raw docstring

transform-nodeclj

(transform-node f & nodes)

Creates a node containing code based on transforming the other nodes into a new form

Creates a node containing code based on transforming the other nodes into a new form
raw docstring

triangle-waveclj

Triangular wave function in range [0..1]

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

tstclj

(tst)

turbulateclj

(turbulate factor func)

Adds random turbulence to a pattern according to a perlin noise offset

Adds random turbulence to a pattern according to a perlin noise offset
raw docstring

turbulenceclj

Classic Perlin turbulence in one dimension

Classic Perlin turbulence in one dimension
raw docstring

typeofcljmacro

(typeof expression)

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


validateclj

(validate nd)

Validates the structure and behaviour of any node. Throws an error if any problem is deteted, returns the node otherwise.

Validates the structure and behaviour of any node. Throws an error if any problem is deteted, returns the node otherwise.
raw docstring

value-nodeclj

(value-node v)

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

vec-nodeclj

(vec-node xs)

Creates a node from a sequence of scalar nodes

Creates a node from a sequence of scalar nodes
raw docstring

vector-functionclj

(vector-function a & {:keys [input-dimensions]})

Defines a vector function, operating on vectorz vectors

Defines a vector function, operating on vectorz vectors
raw docstring

vector-function-nodeclj

(vector-function-node vf)

Creates a vector node from a VectorFunction

Creates a vector node from a VectorFunction
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-nodeclj

(vector-node & xs)

vector-node?clj

(vector-node? x)

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

velvetclj

A nice velvetly pattern.

A nice velvetly pattern.
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

vnoiseclj

4 dimensional vector perlin noise in range [0..1]^4

4 dimensional vector perlin noise in range [0..1]^4
raw docstring

voronoiclj

(voronoi & {:keys [points] :or {points DEFAULT-VORONOI-POINTS}})

voronoi-blocksclj

(voronoi-blocks & args)

A patterns of angular blocks created from a voronoi map, in range [0..1]

A patterns of angular blocks created from a voronoi map, in range [0..1]
raw docstring

voronoi-functionclj

(voronoi-function function
                  &
                  {:keys [points voronoi] :or {points DEFAULT-VORONOI-POINTS}})

voronoi-pointsclj

(voronoi-points & {:keys [points voronoi] :or {points DEFAULT-VORONOI-POINTS}})

vplasmaclj

4 dimensional vector plasma in range [0..1]^4

4 dimensional vector plasma in range [0..1]^4
raw docstring

vpowclj

Raises a vector to an exponent

Raises a vector to an exponent
raw docstring

vroundclj


vsinclj


vsnoiseclj

4 dimensional vector standardised perlin noise in range [-1..1]^4

4 dimensional vector standardised perlin noise in range [-1..1]^4
raw docstring

vsplasmaclj

4 dimensional vector plasma in range [-1..1]^4

4 dimensional vector plasma in range [-1..1]^4
raw docstring

vsqrtclj

Takes the square root of a value

Takes the square root of a value
raw docstring

vturbulenceclj

Classic Perlin turbulence in 4 dimensions

Classic Perlin turbulence in 4 dimensions
raw docstring

warpclj


whiteclj


woodclj

Spherical wood-like texture centred at origin

Spherical wood-like texture centred at origin
raw docstring

xclj

(x v)

Extracts the x component of a position vector

Extracts the x component of a position vector
raw docstring

xorcljmacro

(xor)
(xor a)
(xor a & more)

Returns logical xor of values

Returns logical xor of values
raw docstring

yclj

(y v)

Extracts the y component of a position vector

Extracts the y component of a position vector
raw docstring

yellowclj


zclj

(z v)

Extracts the z component of a position vector

Extracts the z component of a position vector
raw docstring

ZERO-NODEclj

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

× close