15 votes
Accepted

How to raytrace Bezier surfaces?

First off, here's the Kajiya method I think you're thinking of: Kajiya, Ray Tracing Parametric Patches, SIGGRAPH 82. The tech report version might be more informative. What I hope you get from that ...
user avatar
  • 751
14 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 ...
user avatar
  • 8,159
10 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 ...
user avatar
  • 330
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 ...
user avatar
  • 1,200
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 ...
user avatar
  • 811
6 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 ...
user avatar
  • 23.7k
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 ...
user avatar
  • 3,941
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 <...
user avatar
5 votes

How to raytrace Bezier surfaces?

Another option, which I used a couple of decades ago (yikes!), is to use Toth's scheme from 1985 that employed interval arithmetic to narrow down the search space. IIRC, eventually it will resort to ...
user avatar
  • 3,941
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 ...
user avatar
  • 3,541
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 ...
user avatar
  • 8,159
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 ...
user avatar
  • 6,440
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 ...
user avatar
  • 3,321
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 (...
user avatar
  • 8,159
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 ...
user avatar
  • 121
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}...
user avatar
  • 330
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 ...
user avatar
  • 8,159
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 ...
user avatar
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 ...
user avatar
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 ...
user avatar
  • 36
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 ...
user avatar
  • 2,119
1 vote

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$ ...
user avatar
  • 23.7k
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 ...
user avatar
  • 126
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 ...
user avatar
  • 3,941
1 vote
Accepted

LoopBlinn Cubic Curve Rendering - Serpentine arteffect

found the problem, it was the shader. I am using following shader, that works fine ...
user avatar
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 ...
user avatar
  • 7,331
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 ...
user avatar
  • 330
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", ...
user avatar
  • 330
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 ...
user avatar
  • 8,159
1 vote

Algorithm to find the center of a Bezier curve

Since we're not told what defintion of "center" to use, we may as well use the easiest. This would be $$ \text{Center} = \frac14( \mathbf{P}_0 + \mathbf{P}_1 + \mathbf{P}_2 + \mathbf{P}_3) $$ where $\...
user avatar
  • 330

Only top scored, non community-wiki answers of a minimum length are eligible