(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.
(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.
(curve-length curve)
Returns the total length of a curve
Returns the total length of a curve
(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.
(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.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close