1 Curva Parametrica
M a r c o T a r i n i ‧ C o m p u t e r G r a p h i c s ‧ 2 0 1 4 / 1 5 ‧ U n i v e r s i t à d e l l ’ I n s u b r i a
= z y x t f ( )
3
:
R R
⊆
⊆
→
B A
B A f
A B
A f
t ∈
B t f ( ) ∈
1D 3D
t
z
x y
Superficie Parametrica
M a r c o T a r i n i ‧ C o m p u t e r G r a p h i c s ‧ 2 0 1 4 / 1 5 ‧ U n i v e r s i t à d e l l ’ I n s u b r i a
=
z y x v f u
3 2
:
R R
⊆
⊆
→
B A
B A f
A
f
A
p ∈ f ( p ) ∈ B
2D 3D
u
v z
x y
Superficie Parametrica
M a r c o T a r i n i ‧ C o m p u t e r G r a p h i c s ‧ 2 0 1 4 / 1 5 ‧ U n i v e r s i t à d e l l ’ I n s u b r i a
=
z y x v f u
3 2
:
R B
R A
B A f
⊆
⊆
→
dominio di f immagine di f
“ x,y,z sono calcolate come formule di u,v ” Superficie Parametrica:
immagine di una funzione da un pezzo di R
2a R
3per definirne una, scegliere una funzione (e il suo dominio A) (il “dominio parametrico”) ( f surgettiva)
ESEMPIO: una sup implicita per
l’area laterale cilindro (altezza h raggio r)
M a r c o T a r i n i ‧ C o m p u t e r G r a p h i c s ‧ 2 0 1 4 / 1 5 ‧ U n i v e r s i t à d e l l ’ I n s u b r i a
⋅
⋅
⋅
=
) sin(
) cos(
u r
v h
u r
v f u
] 1 , 0 [ ] 2 , 0 [ :
×
=
→ A π
B A f
A f
2D 3D
u v
y
x z
2 π 1
B
2 Curva Parametrica
M a r c o T a r i n i ‧ C o m p u t e r G r a p h i c s ‧ 2 0 1 4 / 1 5 ‧ U n i v e r s i t à d e l l ’ I n s u b r i a
= z y x t f ( )
3
:
R R
⊆
⊆
→
B A
B A f
A B
A f
t ∈
B t f ( ) ∈
1D 3D
t
z
x y
Parametric curve: come definire f
• Defined by:
,
,
(t is the “parameter”)
• Usually defined implicitly using
“Control Points”
– Interpolative, curve passes through points
– Approximative, curve guided by the control points
• Typical formulation:
0 1
• Pi control points, Bi blending functions
One example: Bézier curves
• Defined by:
, 0 1
, is a Bernstein polynomial
, 1 − 0 . .
• Important properties:
– The set of Bernstein polynomials of degree n, denoted as , form a basis of the vector space of polynomials – is a linear combination of
– Their sum is identically 1, i.e. ∑ , 1
Bézier curves
Bernstein Polynomials of degree 1, 2 and 3
3 Cubic Bézier curve
Sequence of segments defined by 4 control points:
1 − + 3 1 − "
+ 3 " 1 − "
+
Starts at and ends at . The curve in is tangent at and in is tangent at "
Examples of Bezier cubic curves
"
Concatenating Bezier curves: Bezier path
M a r c o T a r i n i ‧ C o m p u t e r G r a p h i c s ‧ 2 0 1 4 / 1 5 ‧ U n i v e r s i t à d e l l ’ I n s u b r i a
"
"
=
se end points coincidono:
curva continua =
se inoltre " allineati:
curva continua con (direzione di) derivata continua (curva “smooth”)
Bézier patches
• Bézier patches extend Bézier curves as follows:
# $, % ,& , $ &,' %
'
&
where ,& are control points and , $ and
&,' % are Bernstein polynomial of degree n and m respectively.
Most common version is bi-cubic Bézier patches where n=m=3 and the control net is formed of 4X4 control points
141
4
Bézier patches Bézier patches
The Utah Teapot, by Martin Newell (1975)
M a r c o T a r i n i ‧ C o m p u t e r G r a p h i c s ‧ 2 0 1 4 / 1 5 ‧ U n i v e r s i t à d e l l ’ I n s u b r i a