Liking cljdoc? Tell your friends :D

genartlib.curves


chaikin-curveclj

(chaikin-curve points)
(chaikin-curve points depth)
(chaikin-curve points depth tightness)

Forms a Chaikin curve from a seq of points, returning a new seq of points.

The tightness parameter controls how sharp the corners will be, and should be a value between 0.0 and 0.5. A value of 0.0 retains full sharpness, and 0.25 creates maximum smoothness.

The depth parameter controls how many recursive steps will occur. The more steps, the smoother the curve is (assuming tightness is greater than zero). Suggested values are between 1 and 8, with a good default being 4.

When points form a closed polygon, it's recommended that the start point be repeated at the end of points to avoid a gap.

Forms a Chaikin curve from a seq of points, returning a new
seq of points.

The tightness parameter controls how sharp the corners will be,
and should be a value between 0.0 and 0.5.  A value of 0.0 retains
full sharpness, and 0.25 creates maximum smoothness.

The depth parameter controls how many recursive steps will occur.
The more steps, the smoother the curve is (assuming tightness is
greater than zero). Suggested values are between 1 and 8, with a
good default being 4.

When points form a closed polygon, it's recommended that the start
point be repeated at the end of points to avoid a gap.
sourceraw docstring

chaikin-curve-retain-endsclj

(chaikin-curve-retain-ends points)
(chaikin-curve-retain-ends points depth)
(chaikin-curve-retain-ends points depth tightness)

Like chaikin-curve, but retains the first and last point in the original points seq.

Like chaikin-curve, but retains the first and last point in the
original `points` seq.
sourceraw docstring

curve-lengthclj

(curve-length curve)

Returns the total length of a curve

Returns the total length of a curve
sourceraw docstring

interpolate-curveclj

(interpolate-curve curve t & [curve-len])

Find a point along a curve, where t is between 0.0 and 1.0. For optimization purposes, the curve-len can be passed in as the third param.

Find a point along a curve, where t is between 0.0 and 1.0. For optimization
purposes, the curve-len can be passed in as the third param.
sourceraw docstring

line-simplificationclj

(line-simplification points min-tolerated-dist)

An implementation of the Ramer-Douglas-Peucker line simplification algorithm. A good value for min-tolerated-dist is probably between 0.0001 and 0.01 times the image width, depending on your use case.

An implementation of the Ramer-Douglas-Peucker line simplification algorithm.
A good value for `min-tolerated-dist` is probably between 0.0001 and 0.01 times
the image width, depending on your use case.
sourceraw docstring

split-curve-into-partsclj

(split-curve-into-parts curve num-parts)
source

split-curve-with-stepclj

(split-curve-with-step curve-to-split step-size)
source

trim-curve-endclj

(trim-curve-end points trim-length)

Removes the specified length from the end of a curve. If the specified length is longer than the entire curve length, an empty vector is returned.

Removes the specified length from the end of a curve. If the specified length
is longer than the entire curve length, an empty vector is returned.
sourceraw docstring

trim-curve-startclj

(trim-curve-start points trim-length)

Removes the specified length from the start of a curve. If the specified length is longer than the entire curve length, an empty vector is returned.

Removes the specified length from the start of a curve. If the specified length
is longer than the entire curve length, an empty vector is returned.
sourceraw docstring

trim-curve-to-boundsclj

(trim-curve-to-bounds points)

Returns a seq of sub-curves that are entirely within the bounds of the image

Returns a seq of sub-curves that are entirely within the bounds of the image
sourceraw docstring

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

× close