Everipedia Logo
Everipedia is now IQ.wiki - Join the IQ Brainlist and our Discord for early access to editing on the new platform and to participate in the beta testing.
Centripetal Catmull–Rom spline

Centripetal Catmull–Rom spline

Incomputer graphics, centripetal Catmull–Rom spline is a variant form ofCatmull-Rom spline, originally formulated byEdwin CatmullandRaphael Rom[1], which can be evaluated using a recursive algorithm proposed by Barry and Goldman.[2] It is a type of interpolating spline (a curve that goes through its control points) defined by four control points, with the curve drawn only fromto.

Definition

Letdenote a point. For a curve segmentdefined by pointsand knot sequence, the centripetal Catmull-Rom spline can be produced by:

where

and

in whichranges from 0 to 1 for knot parameterization, andwith. For centripetal Catmull-Rom spline, the value ofis. When, the resulting curve is the standard uniform Catmull-Rom spline; when, the product is a chordal Catmull-Rom spline.
Plugginginto the spline equationsandshows that the value of the spline curve atis. Similarly, substitutinginto the spline equations shows thatat. This is true independent of the value ofsince the equation foris not needed to calculate the value ofat pointsand.

Advantages

Centripetal Catmull–Rom spline has several desirable mathematical properties compared to the original and the other types of Catmull-Rom formulation.[3] First, it will not form loop or self-intersection within a curve segment. Second, cusp will never occur within a curve segment. Third, it follows the control points more tightly.

Other uses

In computer vision, centripetal Catmull-Rom spline has been used to formulate an active model for segmentation. The method is termed active spline model.[4] The model is devised on the basis of active shape model, but uses centripetal Catmull-Rom spline to join two successive points (active shape model uses simple straight line), so that the total number of points necessary to depict a shape is less. The use of centripetal Catmull-Rom spline makes the training of a shape model much simpler, and it enables a better way to edit a contour after segmentation.

Code example in Python

The following is an implementation of the Catmull–Rom spline in Python.

Code example in Unity C#

For an implementation in 3D space, after converting Vector2 to Vector3 points, the float could be extended a in function GetT to this : Mathf.Pow((p1.x-p0.x), 2.0f) + Mathf.Pow((p1.y-p0.y), 2.0f) + Mathf.Pow((p1.z-p0.z), 2.0f).

See also

  • Cubic Hermite splines

References

[1]
Citation Link//doi.org/10.1016%2FB978-0-12-079050-0.50020-5Catmull, Edwin; Rom, Raphael (1974). "A class of local interpolating splines". In Barnhill, Robert E.; Riesenfeld, Richard F. (eds.). Computer Aided Geometric Design. pp. 317–326. doi:10.1016/B978-0-12-079050-0.50020-5. ISBN 978-0-12-079050-0.
Sep 26, 2019, 4:34 PM
[2]
Citation Link//doi.org/10.1145%2F378456.378511Barry, Phillip J.; Goldman, Ronald N. (August 1988). A recursive evaluation algorithm for a class of Catmull–Rom splines (PDF). Proceedings of the 15st Annual Conference on Computer Graphics and Interactive Techniques, SIGGRAPH 1988. 22. Association for Computing Machinery. pp. 199–204. doi:10.1145/378456.378511.
Sep 26, 2019, 4:34 PM
[3]
Citation Link//doi.org/10.1016%2Fj.cad.2010.08.008Yuksel, Cem; Schaefer, Scott; Keyser, John (July 2011). "Parameterization and applications of Catmull-Rom curves". Computer-Aided Design. 43 (7): 747–755. CiteSeerX 10.1.1.359.9148. doi:10.1016/j.cad.2010.08.008.
Sep 26, 2019, 4:34 PM
[4]
Citation Link//doi.org/10.1016%2Fj.dsp.2014.09.002Jen Hong, Tan; Acharya, U. Rajendra (2014). "Active spline model: A shape based model-interactive segmentation" (PDF). Digital Signal Processing. 35: 64–74. arXiv:1402.6387. doi:10.1016/j.dsp.2014.09.002.
Sep 26, 2019, 4:34 PM
[5]
Citation Linkstackoverflow.comImplementation in Java
Sep 26, 2019, 4:34 PM
[6]
Citation Linkstackoverflow.comSimplified implementation in C++
Sep 26, 2019, 4:34 PM
[7]
Citation Linknbviewer.jupyter.orgInteractive generation via Python, in a Jupyter Notebook
Sep 26, 2019, 4:34 PM
[8]
Citation Linkdoi.org10.1016/B978-0-12-079050-0.50020-5
Sep 26, 2019, 4:34 PM
[9]
Citation Linkwww.researchgate.netA recursive evaluation algorithm for a class of Catmull–Rom splines
Sep 26, 2019, 4:34 PM
[10]
Citation Linkdoi.org10.1145/378456.378511
Sep 26, 2019, 4:34 PM
[11]
Citation Linkwww.cemyuksel.com"Parameterization and applications of Catmull-Rom curves"
Sep 26, 2019, 4:34 PM
[12]
Citation Linkciteseerx.ist.psu.edu10.1.1.359.9148
Sep 26, 2019, 4:34 PM
[13]
Citation Linkdoi.org10.1016/j.cad.2010.08.008
Sep 26, 2019, 4:34 PM
[14]
Citation Linkdoppiomovimento.files.wordpress.com"Active spline model: A shape based model-interactive segmentation"
Sep 26, 2019, 4:34 PM
[15]
Citation Linkarxiv.org1402.6387
Sep 26, 2019, 4:34 PM
[16]
Citation Linkdoi.org10.1016/j.dsp.2014.09.002
Sep 26, 2019, 4:34 PM
[17]
Citation Linkstackoverflow.comImplementation in Java
Sep 26, 2019, 4:34 PM
[18]
Citation Linkstackoverflow.comSimplified implementation in C++
Sep 26, 2019, 4:34 PM
[19]
Citation Linknbviewer.jupyter.orgInteractive generation via Python, in a Jupyter Notebook
Sep 26, 2019, 4:34 PM
[20]
Citation Linken.wikipedia.orgThe original version of this page is from Wikipedia, you can edit the page right here on Everipedia.Text is available under the Creative Commons Attribution-ShareAlike License.Additional terms may apply.See everipedia.org/everipedia-termsfor further details.Images/media credited individually (click the icon for details).
Sep 26, 2019, 4:34 PM