# Tag Info

15

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 is that it's not impossible and it's not conceptually difficult if you don't mind getting your hands dirty with some algebraic geometry and complex numbers. ...

14

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 centers in image 1. More than this do exist. Image 1: Some of the possible centers of a single span Bézier curve In practice nearly all graphics applications ...

9

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 with this surface, you have to find the roots of a polynomial of degree 18. There is no formula for these roots -- you have to find them by numerical methods. In ...

7

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 circles along the borders of the red and blue boxes is the same. If the outer radius of the red box, for example, is $50px$, and the distance between the outer ...

6

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 minimum of this function. If the curves intersect, the minimum will be zero; otherwise the minimum will be some positive distance. To be explicit, given a pair ...

5

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 we choose w, the weight for P1, to be sin(a), where a is the half angle at control point P1, the resulting rational Bézier curve is a circle. The second ...

5

[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 approach to a practical solution to the question. Let's assume our curves are A(s) and B(t) with control points {A0, A1..An} and {B0,..Bm} respectively. It seems ...

5

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 k is the row index and n is the column index of control point. l is the elevation factor and is equal to {-1, -1/3, 1/3, 1}. p(k) is the center of the k'th row. Rationale: From the new images, red ...

5

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 Newton-Rhapson but, again IIRC, I think it rarely required more than one or two steps to get to a good solution. Though I haven't looked at it (well, apart ...

4

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 spline is almost the same as Bezier spline but with different $B$ matrix, so if you already understand Bezier, then understanding Hermite is a trivial step. So ...

4

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 triangles. The triangilation is called tesselation or meshing depending on what literature you read. There are lots of applications that do this allready. Most ...

3

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 a popular research topic in production graphics a few years ago, but the industry has moved onto polygon mesh subdivision. Subdivision gives much more ...

3

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 equal d0. That gives you C0 continuity or positional continuity. The next step is to make sure that the tangents where the 2 curves meet are the same. That will ...

3

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 (Maya, 3DSMax), Blend (Creo, Catia...) and so on. Image 1: Blend between 3 curves, not closed but same principle applies. Open curves are easier as they ...

2

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 surfaces and curves: http://web.engr.oregonstate.edu/~mjb/cs519/Handouts/tessellation.1pp.pdf This offloads the Bezier evaluation from the CPU to the GPU and ...

2

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}$. Then the silhouette curve is the intersection of the quadric and the so-called polar plane of $\mathbf{Y}$, which is $\mathbf{Y}^T \mathbf{M} \mathbf{X} = 0$...

2

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 segmented for example. One way to approach this is to find all the points that match your curvature requirements. Then find the point x units away from point ...

2

In line 15 use the half-open interval, i.e., if u>=t[i] and u<t[i+1]: Otherwise, at knot values, you evaluate two basis functions at the k=1 basis when you only want one. This causes the wrong evaluation of the basis function at the knot values and therefore the spikes.

2

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 cylinder. Let's walk it back a bit though. If you have a single Bezier curve and extrude it you create a Bezier surface. You can quickly get your head around a ...

1

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$ is longer.) The way you have drawn it, they have the same length but slightly different directions—they don't quite look parallel. The standard definition of ...

1

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 parametrization you can also evaluate the polynomials with e.g. negative numbers. So i guess b) is right (i did not do the math, but the other two answers cannot be ...

1

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 will do the job. (If you need, they can be trivially mapped into cubic Beziers)

1

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 you could do this is take steps down the ray and test if the point is inside or outside of this bezier tube. You would iterate down the ray until you either ...

1

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 Casteljau algorithm for Bezier curves. In fact, the de Casteljau algorithm is a special case of de Boor's algorithm. A link Another one And another

1

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", which typically means curvature that's either monotonely increasing or has a single peak value. So, you can't solve this problem unless you make some assumptions ...

1

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 side is easily identified as the cross product of the tangent in direction of point order crossed by the paper plane. Image 1: Offset side in 2D. The higher ...

1

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 $\mathbf{P}_0$, $\mathbf{P}_1$, $\mathbf{P}_2$, $\mathbf{P}_3$ are the control points of the curve.

1

https://www.shadertoy.com/view/MldczM Is ANALYTIC intersection of a ray with a triangular b-spline, 3 quadratic bezier splines, 3 CVs for each spline, 3 corner CVs are shared by 2 splines. All cv heights are orthogonal to the triangle plane. It solves for <=2 roots in barycentric coordinates. There's never 3 intersections, so this is a surprisingly simple ...

1

https://www.shadertoy.com/results?query=bezier sort by age, in case of compatibility issues: ,...shows many solutions of many spline-subsets, either returning the distance to a 2d spline, or tracing a 3d patch. Splines and patches come in many forms. heavensine beind simplest, bezier being simple, nurbs being overly complex. The more constrains yo add to ...

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