Free- Free-form Surface I

Document Sample
Free- Free-form Surface I Powered By Docstoc
					Free-form Surface I
Applications of Complex Surfaces
                Surface Patch
A surface patch ⎯ a curved bounded collection of
points whose coordinates are given by continuous,
two-parameter, single-valued mathematical
expression.


Function of the form:
         p (u, w ) = [x (u, w ) y (u, w ) z (u, w )]
                                                   T
                                               -
                    -                          p(u,1) w=1
                    p(0,1)
                                                                     -
                                                                     p(1,1)
              u=0             -
                              n(ui,wj)      u=ui
         -                                  w=wj
         p(0,w)
                                         -                   u=1
                                         p(ui,wj)
                                                            -
                                                            p=(1,w)


-                            -
p(0,0)                       p(u,0) w=0                     -
                                                            p(1,0)

   z                 y


                             x
                 Type of Surface

•   Planar Surface
•   Bilinear Surface
•   Ruled (Lofted) Surface
•   Bi-cubic Surface
•   Bezier Surface
•   B-spline Surface
                      Planar Surface
        - defined by three points and vectors

                 (        ) (
p ( u , w ) = p0 + u p1 − p0 + w p2 − p0      )        0 ≤ u ≤ 1; 0 ≤ w ≤ 1




                                          ^
                                          s        ^
                                                   r
                         -        ^
                                  n
                         p2                   -
                                              p1
                z         -
                          p0

                              y
                                      x
                       Planar Surface
                  (         ) (
p ( u , w ) = p0 + u p1 − p0 + w p2 − p0   )    0 ≤ u ≤ 1; 0 ≤ w ≤ 1

                            ^               ^
 p ( u , w ) = p0 + u p1 − p0 r + w p2 − p0 s   0 ≤ u ≤ 1; 0 ≤ w ≤ 1

             ^    ^   ^
            n = r× s — surface normal
            ^     p1 − p0       ^    p 2 − p0
            r=              ; s=                    Normalized
                  p1 − p0            p 2 − p0    Direction Vectors
                               Planar Surface
                                      ^                  ^
     p ( u , w ) = p0 + u p1 − p0 r + w p2 − p0 s                 0 ≤ u ≤ 1; 0 ≤ w ≤ 1

              Ax + By + Cz + D = 0
                  n = Ai + Bˆ + Ck
                  ˆ     ˆ   j    ˆ
                           ^     ^    ^                                       ^
                                                                              s
                          n = r× s                                                     ^
                                                                                       r
                                                             -        ^
                                                                      n
                                                             p2                   -
( P − P0 ) ⋅ n = 0
             ˆ                                                                    p1
                                                              -
( x − x0 ) * A + ( y − y0 ) * B + ( z − z0 ) * C = 0 z        p0
If define D = −( Ax0 + By0 + Cz0 ), then
                                                                  y
Ax + By + Cz + D = 0
                                                                          x
                      An Example
                                           Q = [x q        zq ]
                                                              T
Find the distance between a point                     yq          and a plane
p = p0 + ur + ws ( 0 ≤ u ≤ 1, 0 ≤ w ≤ 1) . That is to say, find the
          ˆ    ˆ

projection of point Q onto plane P and the distance D.
                                             -
                                             Q

                                             D

                           ^
                           n
                                            -
                  ^
                  s    ^                    Q’
                -      r
                po                 -
                                   p
                 z
                               y
                                       x
                                                                     -
                                                                     Q
                Solution
                                                                    D
                                                    ^
                                                    n
∵ p + QQ ' = Q                            ^
                                                                    -
                                          s     ^                   Q’
                ^       ^   ^           -       r
                                        po
∴ p0 + u r + w s + D n = Q
                                                            -
                                                            p
                                          z
     ^      ^       ^
                                                        y
u r + w s + D n = Q − p0                                        x



               ⎡u ⎤             ⎡ rx   sx     nx ⎤ ⎡ u ⎤ ⎡ xq ⎤ ⎡ x0 ⎤
⎡^           ⎤                  ⎢                 ⎥         ⎢ ⎥
         s n ⎥ ⎢ w ⎥ = Q − P0                 n y ⎥ ⎢ w ⎥ = ⎢ yq ⎥ − ⎢ y0 ⎥
         ^ ^

⎢r
⎣            ⎦⎢ ⎥               ⎢ ry   sy           ⎢ ⎥              ⎢ ⎥
               ⎢D⎥              ⎢ rz          s y ⎥ ⎢ D ⎥ ⎢ z q ⎥ ⎢ z0 ⎥
               ⎣ ⎦              ⎣      sz         ⎦⎣ ⎦ ⎣ ⎦ ⎣ ⎦
         Planar Surface (defined by plane
            equation and boundaries)
           ⎧
           ⎪ x = x ( u, w )
           ⎪
           ⎨ y = y ( u, w )
           ⎪                   D B            A
           ⎪ z = z ( u, w ) = − − y ( u, w ) − x ( u, w )
           ⎩                   c c            c

Ax + By + Cz + D = 0 is satisfied.

The two parametric equation x(u,w) & y(u,w) together with
the boundaries specified by (u=0, w=0,u=1,w=1) determine
the boundary of the projection of a surface p (u , w ) in the x-y
plane.
    A Bounded Region of A Plane
⎧ x=u+w                        Chose the expressions of x and y;
⎪                              z is determined by the plane equation.
⎨ y = −u + w
⎪ z = ..........
⎩                                        ⎧x = w
                                  u =0   ⎨              y=x
y                                        ⎩y = w
                                         ⎧ x = 1+ w
    1
                                  u =1   ⎨              y = x−2
         u=0         w=1                 ⎩ y = −1+ w
                           x              ⎧ x =u
               1      2           w=0     ⎨             y = −x
                                          ⎩ y = −u
    -1 w=0           u=1
                                          ⎧ x = u +1
                                  w =1    ⎨             y = −x + 2
    -2             The Region             ⎩ y = −u +1
X+Z=2 passes P1(1,0,1) P2(0,0,2) and P3(1,1,1)
                                                              p(u2)
                                                 p(u)
                                         p(u1)
Bilinear Surface
                                         u1      u              u2


  u1 − u      p (u1 ) − p (u )
∵          =
  u1 − u 2   p (u1 ) − p (u 2 )

p (u1 )(u1 − u ) − (u1 − u )( p (u1 ) − p (u 2 )) = p (u )(u1 − u 2

(u − u 2 ) p (u1 ) + (u1 − u ) p (u 2 ) = p (u )(u1 − u 2 )

               u2 − u                u − u1
∴ p (u   )   =          p (u 1   )+          p (u 2   )
               u 2 − u1             u 2 − u1
                     Bilinear Surface
                                                              p(u1,w2)
                      p(u1,w1)

          p(u2,w1)
                                     (u,w)

                                                   p(u2,w2)




                        ⎡ u2 − u ⎤ ⎡ w2 − w ⎤                 ⎡ u2 − u ⎤ ⎡ w − w1 ⎤
p (u, w ) = p (u1 , w1 )⎢                       + p (u1 , w2 )⎢         ⎥ ⎢         ⎥
                        ⎣ u2 − u1 ⎥ ⎢ w2 − w1 ⎥
                                  ⎦ ⎣         ⎦               ⎣ u2 − u1 ⎦ ⎣ w2 − w1 ⎦
              ⎡ u − u1 ⎤ ⎡ w2 − w ⎤                 ⎡ u − u1 ⎤ ⎡ w − w1 ⎤
+ p (u2 , w1 )⎢                       + p(u 2 , w2 )⎢          ⎥ ⎢         ⎥
              ⎣ u2 − u1 ⎥ ⎢ w2 − w1 ⎥
                        ⎦ ⎣         ⎦               ⎣ u 2 − u1 ⎦ ⎣ w2 − w1 ⎦
                  Ruled (or Lofted) Surfaces
 Here we specify two of the four boundary curves, p (u,0) and p (u,1) . These two
 curves can be defined by any of the methods that we discussed (cubic spline,
 Bezier, B-spline, NURBS, etc.). Points on the surface are obtained by linear
 interpolation.

                    p (u, w ) = p (u,0)(1 − w ) + p (u,1)w

           or       p (u, w ) = p (0, w )(1 − u ) + p (1, w )u

If we choose straight lines for the boundaries, the ruled surface becomes a bilinear
surface.
       An Example                  p ( u , w ) = p ( u , 0 )(1 − w ) + p ( u ,1) w

       p (u,0 ) and p (u,1) are cubic splines with clamped ends
                                                   z
or   c1 = p(u,0)           c2 = p(u,1)

      p1 = [0 0 0]         p1 = [1 0 0]
                      T                    T
                                                                             w=1

      p2 = [0 1 0]         p2 = [1 1 1]
                      T                  T
                                                                   y        p(u,1)

      p1' = [0 1 1]        p1' = [0 1 1]                     w=0           C2
                   T                     T
                                                    p(u,0)
      p2 = [0 1 1]         p2 = [0 1 − 1]          C1
       '           T        '                  T
                                                                                  x

     For each curve (C1 and C2 – cubic splines):

      P(u) = (2u3 − 3u2 +1)P + (−2u3 + 3u2 )P + (u3 − 2u2 + u)P' + (u3 − u2 )P'
                            0                1                 0              1