clojure2d.extra.utils

Set of various utilities which can be used to display various objects.

color->image

(color->image col)

Render color and display L from LAB color space.

Input: color

Examples

Rendered color

gradient->image

(gradient->image gradient)(gradient->image gradient luma?)

Create image with rendered gradient.

Input: gradient function (see gradient).

Examples

Rendered gradient

palette->image

(palette->image palette)(palette->image palette luma?)

Create image with rendered palette.

Input: list of colors.

Examples

Rendered palette

show-color

(show-color col)

Display color and display L from LAB color space.

Input: color

Examples

Usage

(show-color :yellow)

show-gradient

(show-gradient gradient)(show-gradient gradient luma?)

Display gradient.

Input: gradient function (see gradient).

Examples

Usage

(show-gradient (c/gradient [:yellow :darkblue]))

show-image

(show-image img)(show-image img args)

Show image

show-palette

(show-palette palette)(show-palette palette luma?)

Display palette.

Input: list of colors.

Examples

Usage

(show-palette [:red :green :blue])

show-scalar-field

(show-scalar-field f norm-in norm-out)

Show scalar field R^2->R

show-vector-field

(show-vector-field f)(show-vector-field f norm-in-scale norm-out-scale)

Show scalar field R^2->R^2