Questions tagged [catmull-rom-curve]
38 questions
45
votes
5 answers
Catmull-rom curve with no cusps and no self-intersections
I have the following code to calculate points between four control points to generate a catmull-rom curve:
CGPoint interpolatedPosition(CGPoint p0, CGPoint p1, CGPoint p2, CGPoint p3, float t)
{
float t3 = t * t * t;
float t2 = t * t;
…

Øyvind
- 839
- 2
- 15
- 22
15
votes
3 answers
Catmull-Rom interpolation on SVG Paths
I am experimenting with creating high-performance, good-looking pencil tools using SVG paths.
I am logging the mouse coordinates to draw a path. To get a high-fidelity path (accurate to the user's movements) I need to log a point for every pixel…

nicholaswmin
- 21,686
- 15
- 91
- 167
13
votes
3 answers
Calculate a 2D spline curve in R
I'm trying to calculate a Bezier-like spline curve that passes through a sequence of x-y coordinates. An example would be like the following output from the cscvn function in Matlab (example link):
I believe the (no longer maintained) grid package…

Marc in the box
- 11,769
- 4
- 47
- 97
11
votes
4 answers
Acceleration in Unity
I am trying to emulate acceleration and deceleration in Unity.
I have written to code to generate a track in Unity and place an object at a specific location on the track based on time. The result looks a little like this.
The issue I currently…

Dan
- 7,286
- 6
- 49
- 114
5
votes
2 answers
smooth svg path connection
I have a random set of points and want to create a smooth svg shape with raphaeljs.
To connect the points I am using a catmull-rom-spline. The problem is that the point where the path is closed is not smooth.
This is an example path out of my…

McFarlane
- 1,777
- 2
- 22
- 39
5
votes
1 answer
How do Catmull-Rom and Hermite splines relate?
I'm a little confused as to how they relate. From my class, my professor asked how to fit C1 continuous piecewise Hermite curves to x amount of points with automatically computed tangents. Can someone explain how this works?

minionhacking
- 145
- 3
- 10
4
votes
1 answer
How do I find the control points for a Bezier curve?
I need to implement connections in the form of curved lines in C# (Unity). I would like to get the result as similar as possible to the implementation in Miro.com (see screenshot).
After attaching the curve, I calculate the path of the cubic Bezier…

g0dzZz1lla
- 59
- 1
- 4
4
votes
1 answer
Compute a point on a spline surface
I am working on a control algorithm to be run on an embedded system. My programming language is C and the system will be pretty tightly constrained in terms of memory and processing power.
I have a few (in the order of about 10) reference points in…

calamity
- 41
- 3
4
votes
1 answer
How to update Unity GameObject to move along Spline Curve?
Good afternoon,
I am attempting to implement a GameObject in Unity that moves along a Cubic CatMull-Rom Spline given 8 constrained random values. I have implemented a function, ComputePointOnCatmullRomCurve, that returns a point on a cubic…

Marcus Koz
- 255
- 5
- 21
4
votes
1 answer
CatmullRomSplines and other smooth paths
I've been looking into getting an object on a two dimensional plane to follow a smooth curve defined by several control points.From what I've found, I'm looking for a Catmull-Rom-Spline.
I've been using LibGDX for my project, and it has its own…

Ooo
- 195
- 2
- 9
3
votes
1 answer
Spline Catmull-Rom for image zooming using C++ and opencv
I'm trying to implement spline Catmull-Rom for image zooming using C++ and OpenCV.
I performed two tests, the first is image zooming (X2), and the second image reconstruction (zooming image decimated).
My problem is that in the image interpolated…

Salim Elheni
- 31
- 4
3
votes
2 answers
cubic interpolation with not equidistant points
I'm trying to create an interpolation of a list of points.
I've some point of coordinates (ti, xi), where ti are timestamp and xi are associated values. I want to create a function that passes through these points and allows me to find the x value…

jepessen
- 31
- 1
- 2
3
votes
1 answer
How performing fast Catmull-Rom texture tiltering by linear interpolations?
I've read some articles which introduce fast third-order interpolation using GL_LINEAR.
[1] http://http.developer.nvidia.com/GPUGems2/gpugems2_chapter20.html
[2]…

slyx
- 2,063
- 1
- 19
- 28
2
votes
1 answer
Problems when using same coordinate twice in a Catmull-Rom Spline
I'm currently messing around with Catmull-Rom splines, and have found a problem that I'm not sure how to solve. So when I use a method to do the Catmull stuff, I have to give an ArrayList of 4 points. But in some instances, I do not always have…

PartyPlanet
- 53
- 5
2
votes
0 answers
catmull-rom splines for Android
I'm trying to find a way to implement catmull-rom splines on the android platform for the purpose of smoothly drawing a line through n points. Ideally I would be able to adapt cubic beziers via the Path and its cubicTo method as alluded to in this…

Nick
- 8,181
- 4
- 38
- 63