15
votes
Algorithm to find the center of a Bezier curve
Bézier curves are mathematical entities and have no clearly defined center. One can in fact define many different things as the center of the Bézier curve. I have tried to depict some of the possible ...
9
votes
How to raytrace Bezier surfaces?
is it a total pipe dream to hope to solve the Ray/Bezier-surface intersection algebraically
Yes, it's a pipe dream. A bicubic Bezier patch is an algebraic surface of degree 18. To intersect a ray ...
7
votes
Accepted
How to calculate matching roundness of two offset rectangles?
What you (probably) want to achieve is something like this:
When having a closer look at one of the corners and add a few lines, we see this:
The black lines indicate that the center points of the ...
6
votes
Accepted
Determining Rational Quadratic Bezier Curve Weights for Circle
Check out the section on Circular Arcs and Circles, from Ching-Kuang Shene's excellent computational geometry course notes:
[G]iven three control points P0, P1 and P2 such that P0P1 = P1P2 holds, if ...
5
votes
Reliable test for intersection of two Bezier curves
An alternative way to formulate the problem is to define a function that gives the distance between points on the two curves, as a function of the curves' parameters. Then attempt to find the global ...
5
votes
Reliable test for intersection of two Bezier curves
[Disclaimer: I think the following should work but have not actually coded it myself]
I couldn't think of a "trivial" method of producing a yes/no answer but the following would be a reasonable ...
5
votes
Accepted
Apply distortion to Bézier surface
Edit: changed the answer according to new images and clarification.
for every control point p(k, n)
p'(k, n) = ( p(k, n) - p(k) ) * d * l(k) + p(k, n)
where <...
4
votes
Accepted
Bezier Curve Tool Controlled by Mouse
Instead of using cubic Bezier spline, you should use cubic Hermite spline. For cubic Hermite curve you specify the segment end points and tangents, which is what you then control in the tool. Hermite ...
4
votes
Does this 3D rendering method exist? How is it called? Is there any C++ algorithm for it?
Yes, such rendering exists. It is called a parametric surface and there are several methods you can render such entities. In this case you are talking of bezier patches.
Turn the object into enough ...
3
votes
Does this 3D rendering method exist? How is it called? Is there any C++ algorithm for it?
The 1994 game Ecstatica and its 1997 sequel rendered ellipsoid segments instead of triangles, but I don't think anyone else has ever used this exact technique. Direct raytracing of Bézier patches was ...
3
votes
Join two bezier curves so that the result is two-times continuously differentiable
For 2 bezier curves to connect and be continuous at all, the last control point of the first curve (C in your case) must be the same as the first control point of the next curve (D). So c3 has to ...
3
votes
Bicubic bezier surface from 4 bezier curves
Yes, its pretty standard stuff. Most 3D applications our there can do this. Since the nomenclature of 3d applications is not standardized, the tool has different names in different applications: Loft (...
2
votes
Silhouette curve for isometric surface of revolution
The silhouette curve of a quadric surface is a conic (ellipse, parabola, hyperbola, etc.). Suppose you have the quadric $\mathbf{X}^T \mathbf{M} \mathbf{X} = 0$ and your eye is at the point $\mathbf{Y}...
2
votes
Accepted
First steps towards CAD standard curve fitting
Since you have a limited set of tools you are not actually doing a classical fitting. What you have is a discrete problem. And since you are looking for a somewhat easily drawn fit, no more than twice ...
2
votes
Hardware-accelerated drawing of curved shapes
You can use OpenGl 4.x tessellation shaders to convert Bezier control points into polygons.
A google search for "tessellation shader bezier" found this outline describing the tessellation of Bezier ...
2
votes
Accepted
B spline curve generation in Python
In line 15 use the half-open interval, i.e.,
if u>=t[0][i] and u<t[0][i+1]:
Otherwise, at knot values, you evaluate two basis functions at the k=1 basis ...
2
votes
Accepted
How do I extrude a 2D Bezier curve representation into a 3D solid using Python?
You can't create a solid by extruding a single curve or set of curves. Even if they are closed. Think about a circle on on the XY plane. If you extrude the circle along the Z axis you have an uncapped ...
2
votes
Continuity of parametric and geometric continuity
I would rather draw the $G_1$ example something like this:
This makes it clear that $t_2$ and $t_3$ are parallel, but have different lengths in general. (They both start at the same point, but $t_3$ ...
2
votes
Accepted
How to get coordinates of opposite direction from mouse release point relative to a point?
Assuming you're doing spline curves: Let p be the point at the end of your curve (the one marked with a solid square above). Let h be your handle point (the one denoted as such). The vector from p to ...
2
votes
Accepted
How to decide granularity for sampling a bezier curve for rendetion
IIRC, Watt and Watt's "Advanced Animation and Rendering Techniques" (Chapter 3) has an interesting discussion on this (which I think is summarising the work of Clark https://dl.acm.org/doi/...
2
votes
Algorithm to add a path point, preserving path shape?
I realized this would be better phrased as "how to split a bezier curve", answered well here (De Casteljau's Algorithm).
And I had somehow missed that it's implemented in paper.js as Path....
1
vote
Accepted
Is drawing Bezier curve with scanline algorithm possible with Vulkan?
The typical solution is to compute a bounding structure using triangles that would be transformed by the vertex shader. The bounding structure is computed to be large enough to fit the entire curve ...
1
vote
Continuity of parametric and geometric continuity
Yes, your understanding of $C1$ and $G1$, as shown in your drawings, is roughly correct: $C1$ means equal derivative vectors, and $G1$ means parallel derivative vectors.
I say “roughly” because there ...
1
vote
Accepted
Cubic Bezier Curve - General Questions
Regarding the first question: a bezier curve is defined as linear combinations of control points and basis function (Bernstein polynomials). Although usually one considers a unit interval as ...
1
vote
Spline interpolation library in cpp
So you have a series of points and, at each point, a supplied derivative?
Is a piecewise cubic sufficient or does it need higher derivative continuity? If the former is ok, then Cubic Hermite Splines ...
1
vote
Accepted
LoopBlinn Cubic Curve Rendering - Serpentine arteffect
found the problem, it was the shader. I am using following shader, that works fine
...
1
vote
Simple Intersection Algorithm for Ray and 3D Bézier Curves of Varying Thickness
You say that you don't need the fastest possible algorithm, so instead of solving it analytically, you might try considering the numeric alternatives, which in this case could mean ray marching.
How ...
1
vote
Accepted
How does the Lane Riesenfeld algorithm work?
What you're looking for is called de Boor's algorithm. It lets you compute a point on a b-spline curve by doing a series of linear interpolation (LERP) calculations. So, it works very much like the de ...
1
vote
First steps towards CAD standard curve fitting
As far as I know, there are no standard shapes for (physical) French curves. The folks who manufacture them are free to choose any shapes they like. Of course, they choose shapes that look "nice", ...
1
vote
Checking the correct offset direction for Bezier curve offset
For a two dimensional spline it is possible to define a left and a right side, or let us call the directions counterclockwise and clockwise side (or maybe port and starboard would be appropriate). The ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
bezier-curve × 42opengl × 7
curve × 7
vector-graphics × 6
algorithm × 3
mathematics × 3
computational-geometry × 3
2d × 3
line-drawing × 3
nurbs × 3
drawing × 3
spline × 3
raytracing × 2
3d × 2
shader × 2
c++ × 2
geometry × 2
matrix × 2
interpolation × 2
cad × 2
scanline × 2
parametrization × 2
glut × 2
line × 2
glsl × 1