Questions tagged [curve]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
11 votes
3 answers
3k views

Ordering a set of unorganized points along a curve

I have a set of 3D points (which I recover from a library that performs the tessellation of a solid body) that belong to a curve (i.e., an edge of the solid). That means that the curve surely passes ...
andrea.al's user avatar
  • 111
10 votes
1 answer
628 views

How do I accurately compute coverage of overlapping analytical curves?

Antialiasing of 2D shapes boils down to computing the fraction of a pixel that is covered by the shape. For simple non-overlapping shapes, this is not too difficult: clip the shape against the pixel ...
John Calsbeek's user avatar
8 votes
2 answers
2k views

Is there some kind of Bresenham algorithm or equivalent for scanline rendering a rotated ellipse?

Back in the day when you often had to write your own low level rendering algorithms we all used to learn the Bresenham algorithms for lines and circles. It was almost trivially easy to extend the ...
hippietrail's user avatar
7 votes
1 answer
931 views

How to calculate matching roundness of two offset rectangles?

I have two rectangles — one with a fill (blue) and one with a stroke (red). The red rectangle is being offset (depending on the stroke width) so that it appears snug and outside the edge of the blue ...
Greg Gunn's user avatar
7 votes
1 answer
475 views

Algorithms for scan converting b-spline and nurbs

In all computer graphics books there are algorithms for scan converting simple primitives like lines, circles, ellipse,... I can't find algorithms for more advanced curves like bezier curves, b-...
Valerio's user avatar
  • 433
6 votes
1 answer
281 views

Converting raster shape/blob into displacement map

I am a beginner in digital image processing and computer graphics. I would like to program a similar behavior than the Shadermap 3 normal editor (displacement layer more specifically). As shown in ...
Gentle Moose's user avatar
4 votes
2 answers
179 views

Move position in smooth gradient

I am decrementing/incrementing position x until it reaches y. However, this creates a rectangular-like path. I want position x to smoothly curve towards y (diagonally) on a 2D plane. What kind of ...
user avatar
4 votes
1 answer
591 views

Conversion from cubic catmull-rom spline to cubic b-spline

I have a bunch of points that are the control vertices of a cubic catmull-rom spline. I would like to convert these to the control vertices of a cubic bspline. I believe I can do this using this ...
sriravic's user avatar
  • 126
4 votes
1 answer
301 views

Polygons versus curve primitives in software rendering

Most 3D video games since the nineties have used hardware rendering based on polygons. Why polygons? They work well for some things, but not so well for others, e.g. a human figure rendered in ...
rwallace's user avatar
  • 143
3 votes
1 answer
197 views

How do people come up with subdivision schemes?

Be it chaikin subdivision, loop subdivision, catmull-clark subdivision... How do people come up with the coefficients for an arbitrary subdivision scheme?
Makogan's user avatar
  • 1,696
3 votes
1 answer
419 views

Determining Rational Quadratic Bezier Curve Weights for Circle

I am trying to create a spherical interpolation with 3 points. I'm currently using Quadratic Bezier Interpolation but have been told I should use Rational Quadratic Bezier Curve in order to get a ...
Dr. Pontchartrain's user avatar
3 votes
1 answer
480 views

How to use Monotone cubic interpolation in 3D?

I wanted to use Monotone cubic interpolation, but the site only provide explanation for 2D case. How can I extend it to 3D?
Bla...'s user avatar
  • 481
3 votes
3 answers
106 views

Does the blending matrix change between calculating various curve segments in a uniform cubic B-splines approximation?

I would like to ask about uniform (periodic) cubic B-splines (approximation, no interpolation). $$B=1/6\begin{bmatrix}-1&3&-3&1\\3&-6&3&0\\-3&0&3&0\\1&4&1&...
Nick's user avatar
  • 321
3 votes
2 answers
487 views

Fake cubic Hermite spline interpolation with smoothstep

When scaling an image with Bicubic Interpolation, the Cubic Hermite spline interpolation is used. smoothstep is one of the four basis/blend functions of this kind ...
legends2k's user avatar
  • 131
3 votes
1 answer
3k views

How to deform some mesh so that it fits along a spline curve? [closed]

Given a set of vertices, transforming them to fit onto some spline curve. For example 3D modelling software has extrude along curve and Unreal Engine has a spline mesh component that takes some mesh ...
Arch's user avatar
  • 33
3 votes
1 answer
298 views

Non least squares formulation to fit catmull rom spline

I have a set of unordered points that I'm getting from an image attached. I'd like to simply fit a parametrized curve such as a catmull-rom curve to with n control points (n = 4 to 10, and can be ...
dev_nut's user avatar
  • 143
2 votes
2 answers
121 views

Why cubic curves provide the minimum curvature interpolants?

As described by Shirley in his computer graphics book, Cubic curves provide the minimum-curvature interpolants to a set of points. That is, if you have a set of n + 3 points and define the “...
8cold8hot's user avatar
  • 123
2 votes
1 answer
252 views

If you can use subdivision surfaces for 2D curves

I've seen how subdivision surfaces are good for 3D curves/modeling, but haven't seen anything on if it's good, or even usable, in 2D. My question is just that, if (a) you can even use subdivision ...
Lance's user avatar
  • 123
2 votes
2 answers
697 views

Continuity of parametric and geometric continuity

We know that in parametric continuity, $C^1$ continuity is two successive curve section $C_1$ and $C_2$ has first parametric derivative is same. That means tangent vector $t_1$ is same for both $C_1$ ...
user avatar
2 votes
1 answer
642 views

Rendering splines on GPU

We have an application which needs to render spline curves (cubic, bezier, b-spline etc.). We currently have working algorithms in C to stroke the control points of these curves into line strips. The ...
Gary Allen's user avatar
1 vote
1 answer
1k views

How to take the derivative of a Bézier curve?

I want to know how to take the derivative of a Bézier curve. I visited this website https://pages.mtu.edu/~shene/COURSES/cs3621/NOTES/spline/Bezier/bezier-der.html, but I am unable to figure out how ...
anuj goyal's user avatar
1 vote
1 answer
2k views

B spline curve generation in Python

I am using the de boors algorithm to generate B splines in python. However I am getting spikes in the final figure. I do not understand why this happens. I am posting my code here for reference <...
Jose Kurian's user avatar
1 vote
1 answer
164 views

How does the Lane Riesenfeld algorithm work?

I understand de Casteljau's algorithm and I am familiar although not fully experienced with B-Splines. I am trying to understand the geometric interpretation of B-splines through the algorithm (just ...
Makogan's user avatar
  • 1,696
1 vote
0 answers
292 views

How should I generate Kochanek-Bartels spline endpoints?

I'm working on a program which uses Kochanek-Bartels ("TCB") splines. My question is: How do I deal with the first/last points of the spline? This type of spline needs a 'previous' and 'next' point ...
Chifti Saidi's user avatar
1 vote
0 answers
40 views

Program to visualize geodesics and linear projection of an ellipsoid simultaneously

I am trying to solve a problem in computer graphics but to do it I need to be able to see a comparison of geodesic lines and straigth line projections on the ellipsoid. I have not been able to ...
Makogan's user avatar
  • 1,696
1 vote
0 answers
267 views

Curves fairness

Curves fairness is a strange problem in Computer Aided Geometric Design and every author gives his personal definition. One of the simplest is the following: A curve is said to be fair if (1) it is ...
Valerio's user avatar
  • 433
0 votes
1 answer
799 views

Spline interpolation library in cpp

Have been searching a lot for a good spline interpolation library in cpp, came across one, which is the famous Eigen library , having the unsupported counterpart for spline fitting.<Here>. I ...
Argha Chakraborty's user avatar
0 votes
1 answer
143 views

How do you compute the winding number of a closed poly curve?

Pretty much the title, given a closed curve in 2D, defined by a set of points, and a point. What's the algorithm to calculate the winding number of that curve, point pair?
Makogan's user avatar
  • 1,696
0 votes
1 answer
243 views

How to get coordinates of mouse after left mouse button is released after drag in OpenGL?

I want to get the coordinates of my mouse after the left mouse button is released after being dragged in OpenGL? I am new to this and wanted to know how I can implement it.
Arjan Singh's user avatar
  • 2,491
0 votes
0 answers
160 views

Projecting one Quadratic Bezier Curve Onto Another

I'm working on improving an open source rasterization library called Gudni that I started a few years ago. It's source repository and the branch I'm currently working on are here: https://github.com/...
Ian Bloom's user avatar
0 votes
1 answer
235 views

Midpoint Algorithm Fast Direction

I've been exploring the Midpoint algorithm for drawing lines and curves, and I have a quick question: How should you determine the fast direction for a curve? I've seen that if the shape is simple, ...
Daniel Kareh's user avatar