210 likes | 376 Views
CS32310 - Lecture 03. Reyer Zwiggelaar rrz@aber.ac.uk. In This Lecture. Three-dimensional objects B-spline curves and patches. B-splines. B-splines pre-date Bezier curves B-splines based on French curves Thin metal strip Positioned by lead weights (ducks) Ducks are like control points.
E N D
CS32310 - Lecture 03 Reyer Zwiggelaar rrz@aber.ac.uk
In This Lecture • Three-dimensional objects • B-spline curves and patches
B-splines • B-splines pre-date Bezier curves • B-splines based on French curves • Thin metal strip • Positioned by lead weights (ducks) • Ducks are like control points
Bezier Versus B-splines • B-splines are more local • Control points only have local influence • Degree of B-splines • Less related to number of control points • One B-spline can approximate n points • B-splines typically use four control points • Influence of control point covers four segments • C0, C1 and C2 continuous
Three-Segment B-splines • 6 Control Points: P0 .. P5 • 3 Line Segments: Q3, Q4, Q5 • Q3 is defined by P0 .. P3 • Scaled by B0 .. B3 • Q4 is defined by P1 .. P4 • Scaled by B1 .. B4 • Q5 is defined by P2 .. P5 • Scaled by B2 .. B5
Basis Functions Uniform B-splines • Identical for each segment • Knots (join points in u) at equal distance
Three-Segment B-splines • Knot values: u=3,4,5,6 • Knot vector: [0,1,2,3,4,5,6,7] B0 B1 B2 B3 B4 B5
Uniform B-splines • Start and end points • Not determined by single control point • Tangent vectors at start and end points • More complicated than Bezier curves
Non-Uniform B-splines • Basis functions not identical for segments • Intervals between knots reduced to zero • Control points becomes part of curve • Computational more expensive • Knot vector: [0,0,0,0,1,2,3,3,3,3] • First and last control point on curve • Basis functions can be determined recursively
Rational Curves • Non-uniform rational B-splines (NURBS) • 4D instead of 3D control points • 4D curves projected onto 3D space • CAD applications • Interaction with control points • Interaction with knots • Interaction with weights
Surface Fitting • Interpolating curves • Modelling: fitting a surface through points • Interpolation of animation path • Key positions are known • C2 (second order derivative) continuous
Surface Fitting • Interpolating curves • Data points are knot values • System of equations giving control points • Interpolating surfaces • Data points • B-spline curves (x,y knot vector can be equal) • Bezier patches • Only for uniform B-splines, else knot insertion
B-splines to Bezier Conversion Bezier matrix B-spline matrix Bezier control points B-spline control points
Basis Functions Fundamentals d equals degree of curves k equals the position in the knot vector
Which Approach is Best? • Bezier • Single curves/patches • User controls points • B-spline • Large continuous curves/surfaces • NURBS • General approach • Specific modelling: cones
In This Lecture • Three-dimensional objects • B-spline curves and patches
In The Next Lecture • Workshop on some maths aspects