






Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
An introduction to swept surfaces, or surfaces of revolution, and linear interpolation in the context of parametric functions. Swept surfaces are created by rotating a 2d mathematical function around an axis to generate a 3d shape. Linear interpolation is a method for finding the point midway between two other points. Examples of 2d rotation matrices, parametric functions, and linear interpolation in animation.
Typology: Slides
1 / 12
This page cannot be seen from the preview
Don't miss anything!







-^ Swept Surfaces
, or^ Surfaces of Revolution
, are
a standard type of parametric surface. • A swept surface is like a lump of clay on apotter’s wheel: it’s a 2D mathematicalfunction that’s been spun around and arounduntil it sweeps out a three-dimensional shape. • Remember the rotation matrix for rotation intwo dimensions:^ [ cos(
θ)^
sin( θ) ]
[^ - sin(
θ)^ cos(
θ) ]
-^ The 2D rotation matrix:^ [ cos(
θ)^ sin(
θ)^
[ -sin(
θ)^ cos(
θ) ]
-^ If^ θ=0, the matrix is identity:^ [x^
y]^ *
[x
y]
-^ If^ θ=90°, the matrix rotates ninety degrees:^ [x^
y]^ *
[-y^
x]
-^ And then we tilt our heads into 3D:X=u
(^2) Y=u
-^ And then we slowly start to spin it around theY axis, by multiplying the X and Z coordinatesby the rotationmatrix:X=R
(^2) (u)x Y=u^2 Z= R(u)z where R isrotation by v°
-^ A common question in graphics is, “How do Islowly and gradually slide from one point toanother?” In other words, how do you findthe spot midway between two other spots? •^ The simplest approach is a method called^ linear interpolation
P1 = (x1,y1)P2 = (x2,y2)Let t go from 0.0 to 1.0; then P(t)=(
- t)P1 +*
tP*
-^ Linear interpolation in action:
P(t)=(1-t)P1 + tP2** – t = 0: •^ P(0)^ = (1-0)P1 + 0P
= P
-^ t = 0.5:^ •^ P(0.5)
= (1-0.5)P1 + 0.5P2 = (P1+P1)/
-^ t = 1:^ •^ P(1)
= (1-1)P1 + 1P
= P
0;
-^ float time =
0;
-^ void onIdle(void) -^ { •^ time = time +
π/100.0;
-^ t^ = (sin(time) + 1)/2; t • }
time
-^ The great thing about a parametric function intwo dimensions is that it defines a nice grid.And that grid is the same grid no matter whatthe 3D output is. •^ That means that you can have two completelydifferent parametric functions, both in thesame two-dimensional range of u, v; and youknow that for any (u,v) in one function there’sa matching (u,v) in the other. •^ If that’s the case… then you can linearly^ interpolate
between the two parametric