Another advantage of NURBS is that they can reproduce any of the

advertisement
Another advantage of NURBS is that they can reproduce any
of the conic sections exactly.
Another advantage of NURBS is that they can reproduce any
of the conic sections exactly. Hermite and Bézier curves lack
this ability, as demonstrated in the following example...
Another advantage of NURBS is that they can reproduce any
of the conic sections exactly. Hermite and Bézier curves lack
this ability, as demonstrated in the following example...
Example: Arc of a circle
Another advantage of NURBS is that they can reproduce any
of the conic sections exactly. Hermite and Bézier curves lack
this ability, as demonstrated in the following example...
Example: Arc of a circle
Consider the unit circle,
Another advantage of NURBS is that they can reproduce any
of the conic sections exactly. Hermite and Bézier curves lack
this ability, as demonstrated in the following example...
Example: Arc of a circle
Consider the unit circle,
x2 + y 2 = 1
Another advantage of NURBS is that they can reproduce any
of the conic sections exactly. Hermite and Bézier curves lack
this ability, as demonstrated in the following example...
Example: Arc of a circle
Consider the unit circle,
x2 + y 2 = 1
It is not possible to fit a single Hermite or Bézier curve to the
whole circle (why?).
Another advantage of NURBS is that they can reproduce any
of the conic sections exactly. Hermite and Bézier curves lack
this ability, as demonstrated in the following example...
Example: Arc of a circle
Consider the unit circle,
x2 + y 2 = 1
It is not possible to fit a single Hermite or Bézier curve to the
whole circle (why?).
So, we will attempt to fit a Hermite curve to the arc of the unit
circle that lies within the first quadrant (0◦ ≤ θ ≤ 90◦).
Another advantage of NURBS is that they can reproduce any
of the conic sections exactly. Hermite and Bézier curves lack
this ability, as demonstrated in the following example...
Example: Arc of a circle
Consider the unit circle,
x2 + y 2 = 1
It is not possible to fit a single Hermite or Bézier curve to the
whole circle (why?).
So, we will attempt to fit a Hermite curve to the arc of the unit
circle that lies within the first quadrant (0◦ ≤ θ ≤ 90◦).
First consider the true parametric form for the unit circle,
Another advantage of NURBS is that they can reproduce any
of the conic sections exactly. Hermite and Bézier curves lack
this ability, as demonstrated in the following example...
Example: Arc of a circle
Consider the unit circle,
x2 + y 2 = 1
It is not possible to fit a single Hermite or Bézier curve to the
whole circle (why?).
So, we will attempt to fit a Hermite curve to the arc of the unit
circle that lies within the first quadrant (0◦ ≤ θ ≤ 90◦).
First consider the true parametric form for the unit circle,
x = cos(2πt)
y = sin(2πt)
Another advantage of NURBS is that they can reproduce any
of the conic sections exactly. Hermite and Bézier curves lack
this ability, as demonstrated in the following example...
Example: Arc of a circle
Consider the unit circle,
x2 + y 2 = 1
It is not possible to fit a single Hermite or Bézier curve to the
whole circle (why?).
So, we will attempt to fit a Hermite curve to the arc of the unit
circle that lies within the first quadrant (0◦ ≤ θ ≤ 90◦).
First consider the true parametric form for the unit circle,
x = cos(2πt)
y = sin(2πt)
The form for the first quadrant of the unit circle is,
Another advantage of NURBS is that they can reproduce any
of the conic sections exactly. Hermite and Bézier curves lack
this ability, as demonstrated in the following example...
Example: Arc of a circle
Consider the unit circle,
x2 + y 2 = 1
It is not possible to fit a single Hermite or Bézier curve to the
whole circle (why?).
So, we will attempt to fit a Hermite curve to the arc of the unit
circle that lies within the first quadrant (0◦ ≤ θ ≤ 90◦).
First consider the true parametric form for the unit circle,
x = cos(2πt)
y = sin(2πt)
The form for the first quadrant of the unit circle is,
π !
x = cos t
2
π !
y = sin t
2
Another advantage of NURBS is that they can reproduce any
of the conic sections exactly. Hermite and Bézier curves lack
this ability, as demonstrated in the following example...
Example: Arc of a circle
Consider the unit circle,
x2 + y 2 = 1
It is not possible to fit a single Hermite or Bézier curve to the
whole circle (why?).
So, we will attempt to fit a Hermite curve to the arc of the unit
circle that lies within the first quadrant (0◦ ≤ θ ≤ 90◦).
First consider the true parametric form for the unit circle,
x = cos(2πt)
y = sin(2πt)
The form for the first quadrant of the unit circle is,
π !
x = cos t
2
π !
y = sin t
2
where 0 ≤ t ≤ 1.
Another advantage of NURBS is that they can reproduce any
of the conic sections exactly. Hermite and Bézier curves lack
this ability, as demonstrated in the following example...
Example: Arc of a circle
Consider the unit circle,
x2 + y 2 = 1
It is not possible to fit a single Hermite or Bézier curve to the
whole circle (why?).
So, we will attempt to fit a Hermite curve to the arc of the unit
circle that lies within the first quadrant (0◦ ≤ θ ≤ 90◦).
First consider the true parametric form for the unit circle,
x = cos(2πt)
y = sin(2πt)
The form for the first quadrant of the unit circle is,
π !
x = cos t
2
π !
y = sin t
2
where 0 ≤ t ≤ 1. At this point we can observe that the
cos and sin functions cannot be reproduced exactly with cubic
polynomials.
Another advantage of NURBS is that they can reproduce any
of the conic sections exactly. Hermite and Bézier curves lack
this ability, as demonstrated in the following example...
Example: Arc of a circle
Consider the unit circle,
x2 + y 2 = 1
It is not possible to fit a single Hermite or Bézier curve to the
whole circle (why?).
So, we will attempt to fit a Hermite curve to the arc of the unit
circle that lies within the first quadrant (0◦ ≤ θ ≤ 90◦).
First consider the true parametric form for the unit circle,
x = cos(2πt)
y = sin(2πt)
The form for the first quadrant of the unit circle is,
π !
x = cos t
2
π !
y = sin t
2
where 0 ≤ t ≤ 1. At this point we can observe that the
cos and sin functions cannot be reproduced exactly with cubic
polynomials. Nevertheless, we continue...
Another advantage of NURBS is that they can reproduce any
of the conic sections exactly. Hermite and Bézier curves lack
this ability, as demonstrated in the following example...
Example: Arc of a circle
Consider the unit circle,
x2 + y 2 = 1
It is not possible to fit a single Hermite or Bézier curve to the
whole circle (why?).
So, we will attempt to fit a Hermite curve to the arc of the unit
circle that lies within the first quadrant (0◦ ≤ θ ≤ 90◦).
First consider the true parametric form for the unit circle,
x = cos(2πt)
y = sin(2πt)
The form for the first quadrant of the unit circle is,
π !
x = cos t
2
π !
y = sin t
2
where 0 ≤ t ≤ 1. At this point we can observe that the
cos and sin functions cannot be reproduced exactly with cubic
polynomials. Nevertheless, we continue...
1
The derivatives with respect to t are,
The derivatives with respect to t are,
dx
π !
π
= − sin t
dt
2
2
dy
π !
π
= cos t
dt
2
2
The derivatives with respect to t are,
dx
π !
π
= − sin t
dt
2
2
dy
π !
π
= cos t
dt
2
2
The equation for a 2D hermite curve is as follows:
The derivatives with respect to t are,
dx
π !
π
= − sin t
dt
2
2
dy
π !
π
= cos t
dt
2
2
The equation for a 2D hermite curve is as follows:
[x(t) y(t)] = (2t3 − 3t2 + 1)P1 + (−2t3 + 3t2)P4 +
(t3 − 2t2 + t)R1 + (t3 − t2)R4
The derivatives with respect to t are,
dx
π !
π
= − sin t
dt
2
2
dy
π !
π
= cos t
dt
2
2
The equation for a 2D hermite curve is as follows:
[x(t) y(t)] = (2t3 − 3t2 + 1)P1 + (−2t3 + 3t2)P4 +
(t3 − 2t2 + t)R1 + (t3 − t2)R4
Consider the x−components of the curve beginning at (1, 0)
and ending at (0, 1).
The derivatives with respect to t are,
dx
π !
π
= − sin t
dt
2
2
dy
π !
π
= cos t
dt
2
2
The equation for a 2D hermite curve is as follows:
[x(t) y(t)] = (2t3 − 3t2 + 1)P1 + (−2t3 + 3t2)P4 +
(t3 − 2t2 + t)R1 + (t3 − t2)R4
Consider the x−components of the curve beginning at (1, 0)
and ending at (0, 1).
P1x = 1
The derivatives with respect to t are,
dx
π !
π
= − sin t
dt
2
2
dy
π !
π
= cos t
dt
2
2
The equation for a 2D hermite curve is as follows:
[x(t) y(t)] = (2t3 − 3t2 + 1)P1 + (−2t3 + 3t2)P4 +
(t3 − 2t2 + t)R1 + (t3 − t2)R4
Consider the x−components of the curve beginning at (1, 0)
and ending at (0, 1).
P1x = 1
P4x = 0
The derivatives with respect to t are,
dx
π !
π
= − sin t
dt
2
2
dy
π !
π
= cos t
dt
2
2
The equation for a 2D hermite curve is as follows:
[x(t) y(t)] = (2t3 − 3t2 + 1)P1 + (−2t3 + 3t2)P4 +
(t3 − 2t2 + t)R1 + (t3 − t2)R4
Consider the x−components of the curve beginning at (1, 0)
and ending at (0, 1).
P1x = 1
P4x = 0
R1x
π !
π
= − sin 0 = 0
2
2
The derivatives with respect to t are,
dx
π !
π
= − sin t
dt
2
2
dy
π !
π
= cos t
dt
2
2
The equation for a 2D hermite curve is as follows:
[x(t) y(t)] = (2t3 − 3t2 + 1)P1 + (−2t3 + 3t2)P4 +
(t3 − 2t2 + t)R1 + (t3 − t2)R4
Consider the x−components of the curve beginning at (1, 0)
and ending at (0, 1).
P1x = 1
P4x = 0
R1x
R4x
π
= − sin
2
π
= − sin
2
π !
0 =0
2 !
π
π
1 =−
2
2
The derivatives with respect to t are,
dx
π !
π
= − sin t
dt
2
2
dy
π !
π
= cos t
dt
2
2
The equation for a 2D hermite curve is as follows:
[x(t) y(t)] = (2t3 − 3t2 + 1)P1 + (−2t3 + 3t2)P4 +
(t3 − 2t2 + t)R1 + (t3 − t2)R4
Consider the x−components of the curve beginning at (1, 0)
and ending at (0, 1).
P1x = 1
P4x = 0
R1x
R4x
This gives,
π
= − sin
2
π
= − sin
2
π !
0 =0
2 !
π
π
1 =−
2
2
The derivatives with respect to t are,
dx
π !
π
= − sin t
dt
2
2
dy
π !
π
= cos t
dt
2
2
The equation for a 2D hermite curve is as follows:
[x(t) y(t)] = (2t3 − 3t2 + 1)P1 + (−2t3 + 3t2)P4 +
(t3 − 2t2 + t)R1 + (t3 − t2)R4
Consider the x−components of the curve beginning at (1, 0)
and ending at (0, 1).
P1x = 1
P4x = 0
R1x
R4x
π
= − sin
2
π
= − sin
2
π !
0 =0
2 !
π
π
1 =−
2
2
This gives,
π
x(t) = (2t3 − 3t2 + 1) − (t3 − t2)
2
The derivatives with respect to t are,
dx
π !
π
= − sin t
dt
2
2
dy
π !
π
= cos t
dt
2
2
The equation for a 2D hermite curve is as follows:
[x(t) y(t)] = (2t3 − 3t2 + 1)P1 + (−2t3 + 3t2)P4 +
(t3 − 2t2 + t)R1 + (t3 − t2)R4
Consider the x−components of the curve beginning at (1, 0)
and ending at (0, 1).
P1x = 1
P4x = 0
R1x
R4x
π
= − sin
2
π
= − sin
2
π !
0 =0
2 !
π
π
1 =−
2
2
This gives,
π
x(t) = (2t3 − 3t2 + 1) − (t3 − t2)
2
Now the y− components,
The derivatives with respect to t are,
dx
π !
π
= − sin t
dt
2
2
dy
π !
π
= cos t
dt
2
2
The equation for a 2D hermite curve is as follows:
[x(t) y(t)] = (2t3 − 3t2 + 1)P1 + (−2t3 + 3t2)P4 +
(t3 − 2t2 + t)R1 + (t3 − t2)R4
Consider the x−components of the curve beginning at (1, 0)
and ending at (0, 1).
P1x = 1
P4x = 0
R1x
R4x
π
= − sin
2
π
= − sin
2
π !
0 =0
2 !
π
π
1 =−
2
2
This gives,
π
x(t) = (2t3 − 3t2 + 1) − (t3 − t2)
2
Now the y− components,
P1y = 0
The derivatives with respect to t are,
dx
π !
π
= − sin t
dt
2
2
dy
π !
π
= cos t
dt
2
2
The equation for a 2D hermite curve is as follows:
[x(t) y(t)] = (2t3 − 3t2 + 1)P1 + (−2t3 + 3t2)P4 +
(t3 − 2t2 + t)R1 + (t3 − t2)R4
Consider the x−components of the curve beginning at (1, 0)
and ending at (0, 1).
P1x = 1
P4x = 0
R1x
R4x
π
= − sin
2
π
= − sin
2
π !
0 =0
2 !
π
π
1 =−
2
2
This gives,
π
x(t) = (2t3 − 3t2 + 1) − (t3 − t2)
2
Now the y− components,
P1y = 0
P4y = 1
The derivatives with respect to t are,
dx
π !
π
= − sin t
dt
2
2
dy
π !
π
= cos t
dt
2
2
The equation for a 2D hermite curve is as follows:
[x(t) y(t)] = (2t3 − 3t2 + 1)P1 + (−2t3 + 3t2)P4 +
(t3 − 2t2 + t)R1 + (t3 − t2)R4
Consider the x−components of the curve beginning at (1, 0)
and ending at (0, 1).
P1x = 1
P4x = 0
R1x
R4x
π
= − sin
2
π
= − sin
2
π !
0 =0
2 !
π
π
1 =−
2
2
This gives,
π
x(t) = (2t3 − 3t2 + 1) − (t3 − t2)
2
Now the y− components,
P1y = 0
P4y = 1
π
π ! π
R1y = cos 0 =
2
2
2
The derivatives with respect to t are,
dx
π !
π
= − sin t
dt
2
2
dy
π !
π
= cos t
dt
2
2
The equation for a 2D hermite curve is as follows:
[x(t) y(t)] = (2t3 − 3t2 + 1)P1 + (−2t3 + 3t2)P4 +
(t3 − 2t2 + t)R1 + (t3 − t2)R4
Consider the x−components of the curve beginning at (1, 0)
and ending at (0, 1).
P1x = 1
P4x = 0
R1x
R4x
π
= − sin
2
π
= − sin
2
π !
0 =0
2 !
π
π
1 =−
2
2
This gives,
π
x(t) = (2t3 − 3t2 + 1) − (t3 − t2)
2
Now the y− components,
P1y = 0
P4y = 1
π
R1y = cos
2
π
R4y = cos
2
2
π ! π
0 =
2 ! 2
π
1 =0
2
This gives,
This gives,
π
y(t) = (−2t3 + 3t2) + (t3 − 2t2 + t)
2
This gives,
π
y(t) = (−2t3 + 3t2) + (t3 − 2t2 + t)
2
We can plot this curve against the true arc of the circle.
This gives,
π
y(t) = (−2t3 + 3t2) + (t3 − 2t2 + t)
2
We can plot this curve against the true arc of the circle.
This gives,
π
y(t) = (−2t3 + 3t2) + (t3 − 2t2 + t)
2
We can plot this curve against the true arc of the circle.
The error is evident, but is rather small.
This gives,
π
y(t) = (−2t3 + 3t2) + (t3 − 2t2 + t)
2
We can plot this curve against the true arc of the circle.
The error is evident, but is rather small. Here is a plot of the
error in x (the plot for error in y is identical).
This gives,
π
y(t) = (−2t3 + 3t2) + (t3 − 2t2 + t)
2
We can plot this curve against the true arc of the circle.
The error is evident, but is rather small. Here is a plot of the
error in x (the plot for error in y is identical).
3
4
Download