2d computer graphics
play

2D Computer Graphics Diego Nehab Summer 2020 IMPA 1 Differential - PowerPoint PPT Presentation

2D Computer Graphics Diego Nehab Summer 2020 IMPA 1 Differential geometry A.k.a. characteristic function p 1 p Alternatively, using the Iverson bracket , p 1 p , where true 1 and false 0 Inside-outside test Ideal model is implicit Given


  1. 2D Computer Graphics Diego Nehab Summer 2020 IMPA 1

  2. Differential geometry

  3. A.k.a. characteristic function p 1 p Alternatively, using the Iverson bracket , p 1 p , where true 1 and false 0 Inside-outside test Ideal model is implicit Given a region Ω ⊂ R 2 , defjne the indicator function 1 Ω : R 2 → { 0 , 1 }  1 , p ∈ Ω  1 Ω ( p ) = 0 , p �∈ Ω  2

  4. Alternatively, using the Iverson bracket , p 1 p , where true 1 and false 0 Inside-outside test Ideal model is implicit Given a region Ω ⊂ R 2 , defjne the indicator function 1 Ω : R 2 → { 0 , 1 }  1 , p ∈ Ω  1 Ω ( p ) = 0 , p �∈ Ω  A.k.a. characteristic function χ Ω ( p ) = 1 Ω ( p ) 2

  5. Inside-outside test Ideal model is implicit Given a region Ω ⊂ R 2 , defjne the indicator function 1 Ω : R 2 → { 0 , 1 }  1 , p ∈ Ω  1 Ω ( p ) = 0 , p �∈ Ω  A.k.a. characteristic function χ Ω ( p ) = 1 Ω ( p ) Alternatively, using the Iverson bracket , [ p ∈ Ω] = 1 Ω ( p ) , where [ true ] = 1 and [ false ] = 0 2

  6. f x y 0 f R x y R 2 p c r p c R 2 p s p 1 t p 2 1 s t p 3 0 s t 1 s t R p i Complex shapes can be defjned by logical expressions p r 0 p c r Basis of CSG (constructive solid geometry) Inside-outside test Simple shapes can be defjned as primitives p , r ∈ RP 2 � p , r � < 0 � � , 3

  7. R 2 p c r p c R 2 p s p 1 t p 2 1 s t p 3 0 s t 1 s t R p i Complex shapes can be defjned by logical expressions p r 0 p c r Basis of CSG (constructive solid geometry) Inside-outside test Simple shapes can be defjned as primitives p , r ∈ RP 2 � p , r � < 0 � � , f ( x , y ) < 0 f ∈ R [ x , y ] � � , 3

  8. R 2 p s p 1 t p 2 1 s t p 3 0 s t 1 s t R p i Complex shapes can be defjned by logical expressions p r 0 p c r Basis of CSG (constructive solid geometry) Inside-outside test Simple shapes can be defjned as primitives p , r ∈ RP 2 � p , r � < 0 � � , f ( x , y ) < 0 f ∈ R [ x , y ] � � , p , c ∈ R 2 | p − c | < r � � , 3

  9. Complex shapes can be defjned by logical expressions p r 0 p c r Basis of CSG (constructive solid geometry) Inside-outside test Simple shapes can be defjned as primitives p , r ∈ RP 2 � p , r � < 0 � � , f ( x , y ) < 0 f ∈ R [ x , y ] � � , p , c ∈ R 2 | p − c | < r � � , s , t ∈ R , p i ∈ R 2 � p = s p 1 + t p 2 + ( 1 − s − t ) p 3 ∧ 0 ≤ s , t ≤ 1 � , 3

  10. Basis of CSG (constructive solid geometry) Inside-outside test Simple shapes can be defjned as primitives p , r ∈ RP 2 � p , r � < 0 � � , f ( x , y ) < 0 f ∈ R [ x , y ] � � , p , c ∈ R 2 | p − c | < r � � , s , t ∈ R , p i ∈ R 2 � p = s p 1 + t p 2 + ( 1 − s − t ) p 3 ∧ 0 ≤ s , t ≤ 1 � , Complex shapes can be defjned by logical expressions � p , r � < 0 | p − c | < r � � � � ∧ ¬ 3

  11. Inside-outside test Simple shapes can be defjned as primitives p , r ∈ RP 2 � p , r � < 0 � � , f ( x , y ) < 0 f ∈ R [ x , y ] � � , p , c ∈ R 2 | p − c | < r � � , s , t ∈ R , p i ∈ R 2 � p = s p 1 + t p 2 + ( 1 − s − t ) p 3 ∧ 0 ≤ s , t ≤ 1 � , Complex shapes can be defjned by logical expressions � p , r � < 0 | p − c | < r � � � � ∧ ¬ Basis of CSG (constructive solid geometry) 3

  12. Let denote the boundary of region Let w p count the number of signed intersections with boundary when we move from p to infjnity in any direction w p is the winding number of the boundary around point p Defjne interior by odd or non-zero winding numbers w p 1 2 or w p 0 In a sense, the defjnition is still implicit But the “function” involves a complicated decision procedure How do we defjne the boundary? Inside-outside test More common to defjne interior by boundary (Jordan curve theorem) 4

  13. Let w p count the number of signed intersections with boundary when we move from p to infjnity in any direction w p is the winding number of the boundary around point p Defjne interior by odd or non-zero winding numbers w p 1 2 or w p 0 In a sense, the defjnition is still implicit But the “function” involves a complicated decision procedure How do we defjne the boundary? Inside-outside test More common to defjne interior by boundary (Jordan curve theorem) Let ∂ Ω denote the boundary of region Ω 4

  14. w p is the winding number of the boundary around point p Defjne interior by odd or non-zero winding numbers w p 1 2 or w p 0 In a sense, the defjnition is still implicit But the “function” involves a complicated decision procedure How do we defjne the boundary? Inside-outside test More common to defjne interior by boundary (Jordan curve theorem) Let ∂ Ω denote the boundary of region Ω Let w ( ∂ Ω , p ) count the number of signed intersections with boundary ∂ Ω when we move from p to infjnity in any direction 4

  15. Defjne interior by odd or non-zero winding numbers w p 1 2 or w p 0 In a sense, the defjnition is still implicit But the “function” involves a complicated decision procedure How do we defjne the boundary? Inside-outside test More common to defjne interior by boundary (Jordan curve theorem) Let ∂ Ω denote the boundary of region Ω Let w ( ∂ Ω , p ) count the number of signed intersections with boundary ∂ Ω when we move from p to infjnity in any direction w ( ∂ Ω , p ) is the winding number of the boundary ∂ Ω around point p 4

  16. In a sense, the defjnition is still implicit But the “function” involves a complicated decision procedure How do we defjne the boundary? Inside-outside test More common to defjne interior by boundary (Jordan curve theorem) Let ∂ Ω denote the boundary of region Ω Let w ( ∂ Ω , p ) count the number of signed intersections with boundary ∂ Ω when we move from p to infjnity in any direction w ( ∂ Ω , p ) is the winding number of the boundary ∂ Ω around point p Defjne interior by odd or non-zero winding numbers � w ( ∂ Ω , p ) = 1 (mod 2 ) � or � w ( ∂ Ω , p ) � = 0 ] 4

  17. But the “function” involves a complicated decision procedure How do we defjne the boundary? Inside-outside test More common to defjne interior by boundary (Jordan curve theorem) Let ∂ Ω denote the boundary of region Ω Let w ( ∂ Ω , p ) count the number of signed intersections with boundary ∂ Ω when we move from p to infjnity in any direction w ( ∂ Ω , p ) is the winding number of the boundary ∂ Ω around point p Defjne interior by odd or non-zero winding numbers � w ( ∂ Ω , p ) = 1 (mod 2 ) � or � w ( ∂ Ω , p ) � = 0 ] In a sense, the defjnition is still implicit 4

  18. How do we defjne the boundary? Inside-outside test More common to defjne interior by boundary (Jordan curve theorem) Let ∂ Ω denote the boundary of region Ω Let w ( ∂ Ω , p ) count the number of signed intersections with boundary ∂ Ω when we move from p to infjnity in any direction w ( ∂ Ω , p ) is the winding number of the boundary ∂ Ω around point p Defjne interior by odd or non-zero winding numbers � w ( ∂ Ω , p ) = 1 (mod 2 ) � or � w ( ∂ Ω , p ) � = 0 ] In a sense, the defjnition is still implicit But the “function” involves a complicated decision procedure 4

  19. Inside-outside test More common to defjne interior by boundary (Jordan curve theorem) Let ∂ Ω denote the boundary of region Ω Let w ( ∂ Ω , p ) count the number of signed intersections with boundary ∂ Ω when we move from p to infjnity in any direction w ( ∂ Ω , p ) is the winding number of the boundary ∂ Ω around point p Defjne interior by odd or non-zero winding numbers � w ( ∂ Ω , p ) = 1 (mod 2 ) � or � w ( ∂ Ω , p ) � = 0 ] In a sense, the defjnition is still implicit But the “function” involves a complicated decision procedure How do we defjne the boundary? 4

  20. x y are the coordinate functions of When I a b , we say the curve is closed if a b R 2 0 2 t r t r t The trace I is image of I through . It is the trace that we care about R 2 is parametrized by A subset S if there is I R such that I S R 2 can be parametrized in many different ways A subset S 2 R 2 a b t r t r t b a Planar parametric curve Piecewise differentiable function α : I ⊂ R → R 2 from an interval I to R 2 t �→ α ( t ) = x ( t ) , y ( t ) � � 5

  21. When I a b , we say the curve is closed if a b R 2 0 2 t r t r t The trace I is image of I through . It is the trace that we care about R 2 is parametrized by A subset S if there is I R such that I S R 2 can be parametrized in many different ways A subset S 2 R 2 a b t r t r t b a Planar parametric curve Piecewise differentiable function α : I ⊂ R → R 2 from an interval I to R 2 t �→ α ( t ) = x ( t ) , y ( t ) � � x , y are the coordinate functions of α 5

Recommend


More recommend