CS 148: Summer 2016 Introduction of Graphics and Imaging Zahid Hossain
Geometric Processing
https://en.wikipedia.org/wiki/Ray_tracing_%28graphics%29
Geometric Processing CS 148: Summer 2016 Introduction of Graphics - - PowerPoint PPT Presentation
Geometric Processing CS 148: Summer 2016 Introduction of Graphics and Imaging Zahid Hossain https://en.wikipedia.org/wiki/Ray_tracing_%28graphics%29 Final Project Milestone 1: Get to the crux of the project by this milestone 5%
CS 148: Summer 2016 Introduction of Graphics and Imaging Zahid Hossain
https://en.wikipedia.org/wiki/Ray_tracing_%28graphics%29
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 2
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 3
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 4
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 5
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 6
A B C D E F G H I J K
G = graph = <V, E> V = vertices = {A, B, C, …, K} E = edges = {(AB), (AE), (CD), …} F = faces = {(ABE), (DHJG), …}
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 7
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 8
Planar Graph Plane Graph Straight Line Plane Graph Planar Graph = Graph whose vertices and edges can be embedded in R2 such that its edges do not intersect
A B C D A B C D
A B C D
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 9
Triangulation: Straight line plane graph where every face is a triangle.
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 10
Embedding: G is embedded in Rd, if each vertex is assigned a position in Rd
Embedded in R2 Embedded in R3
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 11
Vertex degree or valence = number of incident edges deg(A) = 4 deg(E) = 5 Regular mesh = all vertex degrees are equal
A B C D E F G H I J K
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 12
A B C D E I F L K J H G M
Mesh: straight-line graph embedded in R3 Boundary edge: adjacent to exactly one face Regular edge: adjacent to exactly two faces Singular edge: adjacent to more than two faces Closed mesh: mesh with no boundary edges
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 13
The study of geometric properties that remain invariant under certain transformations
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 14
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 15
Geometry: This vertex is at (x,y,z) Topology: These vertices are connected
Genus: Half the maximal number of closed paths that do not disconnect the mesh (= the number of holes)
Genus 1 Genus 2 Genus 0
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 16
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain
17
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 18
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 19
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 20
Special Case: Connected Planar Graph
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 21
Count the outer ”face” too
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 22
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 23
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 24
Show that the average Degree/Valence of a large mesh is ~6 !
A 2D manifold is a surface that when cut with a small sphere, always yields a disk
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 25
Disc-like neighborhood
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 26
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 27
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 28
Looks like a line Looks like a plane
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 29
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 30
Triangles (Vertex Indices) 2 1 … … … Vertex Coord List (10,5,20) (20,0,20) (18,10,20) …
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 31
Triangles (Vertex Indices) 2 1 … … … Vertex Coord List (10,5,20) (20,0,20) (18,10,20) …
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 32
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 33
There are many data structures
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 34
http://www.openmesh.org/Documentation/OpenMesh-Doc-Latest/a00016.html
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 35
http://www.openmesh.org/Documentation/OpenMesh-Doc-Latest/a00016.html
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 36
http://www.openmesh.org/Documentation/OpenMesh-Doc-Latest/a00016.html
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 37
http://www.openmesh.org/media/Documentations/OpenMesh-2.0-Documentation/mesh_navigation.html
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 38
(𝑤#) in 𝐵(𝑗, 𝑗) ) for spectral analysis
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 39
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 40
Mainly for mesh smoothing
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 41
Approximation Curve: Depends on the rule
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 42
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 43
http://www.idav.ucdavis.edu/education/CAGDNotes/Chaikins-Algorithm.pdf
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 44
1 2 3 n
http://www.idav.ucdavis.edu/education/CAGDNotes/Chaikins-Algorithm.pdf
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 45
Triangle s Quads
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 46
Triangles Quads Loop Subdivision Catmull-Clark Subdivision
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 47
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 48
Split one triangle into 4
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 49
Split further: one triangle into 4
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 50
Old Vertices New Vertices
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 51
Weights sums to 1
New vertex position: weighted average of the neighbors
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 52
Updated position of old vertex weighted average of the neighboring “old” vertices
For valence: 6
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 53
Weights sums to 1
Updated position of old vertex weighted average of the neighboring “old” vertices
For valence: 6
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 54
Do we always have valence = 6 ?
Extraordinary Point
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 55
Do we always have valence = 6 ?
Extraordinary Point
For sphere topology show valence is not 6 for all vertices Recall: Euler-Poincaré formula
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 56
Warren Weights
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 57
New Vertex Boundary
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 58
New Vertex Old Vertex Boundary
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 59
Provable smoothness and regularities
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 60
An easier problem: How to smooth a curve?
pi = (xi , yi) pi-1 pi+1 pi-1 pi+1 pi = (xi , yi)
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 61
An easier problem: How to smooth a curve?
pi = (xi , yi) pi-1 pi+1 pi-1 pi+1 pi = (xi , yi)
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 62
Update Rule: pi = (xi , yi) pi-1 pi+1
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 63
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 64
Recall: Adjacency Matrix for Mesh
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 65
Update Rule: Matrix Form of Update Rule
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 66
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 67
pk pl pm pn pi = (xi, yi, zi) pi = (xi , yi) pi-1 pi+1
1D Curve 2D Surface
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 68
pk pl pm pn pi = (xi, yi, zi) pi = (xi , yi) pi-1 pi+1
1D Curve 2D Surface
Note: Matrix formulation for 3D needs extra care: degree of vertices are not same everywere
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 69
0 Iterations 5 Iterations 20 Iterations
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 70
3 steps 6 steps 18 steps
Mesh shrinks !
CS 148: Introduction to Computer Graphics and Imaging (Summer 2016) – Zahid Hossain 71
3 steps 6 steps 18 steps
Mesh shrinks !
CS 148: Summer 2016 Introduction of Graphics and Imaging Zahid Hossain
https://en.wikipedia.org/wiki/Ray_tracing_%28graphics%29