View more

View more

View more

### Image of the Day Submit

IOTD | Top Screenshots

### The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.

# Recursive Catmull Rom algorithm

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

2 replies to this topic

### #1Catmull Dog  Members

Posted 06 August 2012 - 09:32 AM

In Siggraph '88 (24 years ago this week) there was a great article by Phillip J. Barry and Ronald N. Goldman titled "A Recursive Evaluation Algorithm for a Class of Catmull-Rom Splines".

In the article they detail a recursive approach to evaluate a CR spline. Representing it this way allows for curve parameters to be added (thus making it Non-Uniform), altering the trajectory of the curve (similar to the Tension parameter in a Cardinal or Kochanek Bartels spline).

I'm in the process of translating the formula but it's usually harder than it looks.

Has anyone implemented this? How much faster is it? Is the algorithm available in C++ form?

CRD

### #2Álvaro  Members

Posted 06 August 2012 - 11:05 AM

If the paper is from 1988, whatever supposed performance advantages this was supposed to have are probably irrelevant. We are talking about a period where many platforms may not have had hardware multipliers, so evaluating a cubic polynomial could be expensive. These days it's dirt cheap, so you don't need to be fancy. Being fancy may actually hurt.

Implement your splines in the most straight-forward way possible, and optimize only if a profiler tells you you should.

### #3Catmull Dog  Members

Posted 06 August 2012 - 02:56 PM

Performance was not the main reason, though I'm curious how much faster it will be.

In order to achieve Centripetal Parameterization (from a 2010 paper "Parameterization and Applications of Catmull-Rom Curves"), we need a recursive approach to the Catmull Rom algorithm. That allows for arbitrary t (or s) values, which allows shape parameters.

We need a Catmull Rom spline where the control points represent the points of highest curvature (please see attached image).

I think many make the assumption that is the default when it's not.

#### Attached Thumbnails

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.