chap3 Flashcards
3D graphics 4 steps
- definition of geometry as digital data
- processing and transformation of data
- transformation of data to 2D
- display of the results on a screen
Rendering pipeline
- Transformation - processing and transformation of data, ex. modify the viewing, resolution etc.
- Projection - transformation of data to 2D
- Output - display of the results on a screen, reduce the amount of data –> image can be optimally displayed on the output device
(3D graphics without the first step)
Drawback of mathematical descriptions of geometries
Types of describing a curve mathematically
- there are no relationships amongst the individual parts of the surface
- edges are not an independent obj but belongs to the description of the surface
- individual surfaces are not correlated with an obj or the creation of the correlation is difficult
Explicit description - one output y is associated with the var x. rarely used in VR
- problem: for closed curves ex. circle and it is not invariant to rotations
Implicit description - f(x,y), also rarely used in VR
Parametric description - Q(t) = (x(t),y(t)),
-Good bc: no equivocations could occur and invariant to rotations
(Bézier)
- “smooth curvature instead”
- Uses control points + base function (guarantee that the req for continuity in the control points is kept by interpolation or approximation.)
- a type of APPROX curve (with exception of the start and end point), approx a line along start and end point
- fig 3.29
- easily => 3D
interpolation vs approximation
interpolation - calculated curve has to meet the control points exactly
approx - a curve that approx. given by the control points
Parametric continuity - C curve
C^0 - not smoothed but has an edge
C^1 - smoothed, all tangent vectors in point P1 have same direction and same slope
C^2 - also smoothed
B-spline = basic splines
- approximate spline
- use multiple curves with a lower degree and combine them smoothly. (for each pair of control points)
- same as Bézier: Uses control points + base function (different ones for each)
- drawback: shape changes if one control points is removed
- similar calculation as in Bézier (different base function)
Box function - simplest base function –> convolution… (box, linear, quadratic, cubic)
- cubic convolution B_4(t) is the most used.
- too high –> miss information, too smoothed (less curvy)
- missing control points: when defining it as (0,0) –> missshape
- doesn’t start/stop at the end points as desired –> CLAMPING (“wodo”) to reach it, the idea is PHANTOM points (mirroring the second first/last point on the point). see fig3.46 –> new gaussian curves B-1
- CALCULATION: Q(t) segment curve - four segments of four points = pi+Bi (and time shifting)
Interpolating Spline
Hermite spline, Cardinal spline and Catmull Rom Spline
Hermit Spline
- Needs four different control points: start and endpoint, tangent, T of start and endpoint (which give the slope)
- slope define how the curve leaves/enters the start/endpoint, also how long the curve shall follow the vector T
- cubic spline = [x, y] = [t^3 t^2 t 1][a;b;c;d], calc a-d by Gaussian Jordan algorithm (backslash) [x1, y1, x2, y2 x1’, y1’, x2’, y2’] =[p1, p2, T1, T2]
Cardinal Spline
Sub-group of Hermit
- tangent sloppe are not required.
- requires P0-P3 to calculate the segment btw P1-P2
- P0P2 is parallellt to the tangent of P1, P1P3 is parallell to the tangent of P2.
- TENSION - the factor a that defines the length of the tangent vector. Playing with the factor a gives the movement of the cartoon…
Higher a –> higher T –> travel much longer in direction of T.
a = 0, P1-P2 is a straight line.
- Catmull belongs to Cardinal Splines