CGTopics (S10) Silhouette Matters. CGTopics (S10) Definition [Wiki] A silhouette is a view of an object or scene consisting of the outline and a featureless.

Slides:



Advertisements
Similar presentations
Chapter 5: Control Structures II (Repetition)
Advertisements

Optimized Stencil Shadow Volumes
Silhouettes and lens flare BY VIOLET, DAISY, AND MICAH.
Data Structures Using C++
Tirgul 7 Review of graphs Graph algorithms: –DFS –Properties of DFS –Topological sort.
Non-Photorealistic Rendering FORMS. Mesh (~170) Parametric (~16) Implicit/CSG (~9) Volumetric (~28) 3D Object Representation in NPR Point Cloud (~4)
TECH Computer Science Graphs and Graph Traversals  // From Tree to Graph  // Many programs can be cast as problems on graph Definitions and Representations.
Data Structures Using Java1 Chapter 11 Graphs. Data Structures Using Java2 Chapter Objectives Learn about graphs Become familiar with the basic terminology.
Algoritma Traversal Graph. Graph Traversal Algorithms In general, graphs do not have a vertex, like a root, that initiates unique paths to each of the.
Chapter 15 Graph Theory © 2008 Pearson Addison-Wesley. All rights reserved.
Strips: Triangle and Quad Jyun-Ming Chen Reference: 1, 212.
Tirgul 11 DFS Properties of DFS Topological sort.
Contour Tracing Seo, Jong-hoon Media System Lab. Yonsei University.
C++ Programming: Program Design Including Data Structures, Third Edition Chapter 21: Graphs.
Pedro V. Sander Xianfeng Gu Steven J. Gortler Harvard University
Graph & BFS.
1 Data Structures DFS, Topological Sort Dana Shapira.
1 Testing for Connectedness and Cycles Connectedness of Undirected Graphs Implementation of Connectedness detection Algorithm for Undirected Graphs. Implementation.
Graph COMP171 Fall Graph / Slide 2 Graphs * Extremely useful tool in modeling problems * Consist of: n Vertices n Edges D E A C F B Vertex Edge.
Graph & BFS Lecture 22 COMP171 Fall Graph & BFS / Slide 2 Graphs * Extremely useful tool in modeling problems * Consist of: n Vertices n Edges D.
Shadow Volumes on Programmable Graphics Hardware Speaker: Alvin Date: 2003/11/3 EUROGRAPHICS 2003.
Shadow Algorithms Gerald Matzka Computer Science Seminar.
Alyce Brady CS 510: Computer Algorithms Depth-First Graph Traversal Algorithm.
1 Random numbers Random  completely unpredictable. No way to determine in advance what value will be chosen from a set of equally probable elements. Impossible.
The edge buffer : A data structure for easy silhouette rendering by John W. Buchanan and Mario C. Sousa.
Testing for Connectedness and Cycles Connectedness of an Undirected Graph Implementation of Connectedness detection Algorithm. Implementation of Strong.
Graphs - according to the mathematicians An undirected graph is 2-tuple: G=(V,E) a set of vertices a set of edges Vertices = {A, B, C, D, E} Edges = {
CS 450: Computer Graphics REVIEW: OVERVIEW OF POLYGONS
1 Chapter 18 Trees Objective To learn general trees and recursion binary trees and recursion tree traversal.
CHAPTER 5: CONTROL STRUCTURES II INSTRUCTOR: MOHAMMAD MOJADDAM.
Prime numbers Jordi Cortadella Department of Computer Science.
Mesh Data Structure. Meshes Boundary edge: adjacent to 1 face Regular edge: adjacent to 2 faces Singular edge: adjacent to >2 faces Mesh: straight-line.
Chapter 6 Looping CS185/09 - Introduction to Programming Caldwell College.
Graphs. Made up of vertices and arcs Digraph (directed graph) –All arcs have arrows that give direction –You can only traverse the graph in the direction.
Graphs. Definitions A graph is two sets. A graph is two sets. –A set of nodes or vertices V –A set of edges E Edges connect nodes. Edges connect nodes.
1 Visiblity: Culling and Clipping Computer Graphics COMP 770 (236) Spring 2009 January 21 & 26: 2009.
1 Linked-list, stack and queue. 2 Outline Abstract Data Type (ADT)‏ Linked list Stack Queue.
Ramesh Raskar University of North Carolina at Chapel Hill Ramesh Raskar University of North Carolina at Chapel Hill Image Precision Silhouette Edges Michael.
AND.
Non-Photorealistic Rendering FORMS. Model dependent Threshold dependent View dependent Outline form of the object Interior form of the object Boundary.
Real Time Nonphotorealistic Rendering. How to achieve real time NPR? Economy of line: present a lot of information with very few strokes. Silhouettes.
Graph Connectivity This discussion concerns connected components of a graph. Previously, we discussed depth-first search (DFS) as a means of determining.
90-723: Data Structures and Algorithms for Information Processing Copyright © 1999, Carnegie Mellon. All Rights Reserved. 1 Lecture 7: Graphs Data Structures.
1 Trees General Trees  Nonrecursive definition: a tree consists of a set of nodes and a set of directed edges that connect pairs of nodes.
Int fact (int n) { If (n == 0) return 1; else return n * fact (n – 1); } 5 void main () { Int Sum; : Sum = fact (5); : } Factorial Program Using Recursion.
1 CSC103: Introduction to Computer and Programming Lecture No 17.
Non-Photorealistic Rendering FORMS. Model dependent Threshold dependent View dependent Outline form of the object Interior form of the object Boundary.
An Algorithm for the Consecutive Ones Property Claudio Eccher.
Data Structures and Algorithm Analysis Graph Algorithms Lecturer: Jing Liu Homepage:
Fleury's Algorithm Euler Circuit Algorithm
1 GRAPHS – Definitions A graph G = (V, E) consists of –a set of vertices, V, and –a set of edges, E, where each edge is a pair (v,w) s.t. v,w  V Vertices.
ECE 250 Algorithms and Data Structures Douglas Wilhelm Harder, M.Math. LEL Department of Electrical and Computer Engineering University of Waterloo Waterloo,
Graphs – Breadth First Search
CENG 789 – Digital Geometry Processing 04- Mesh Data Structures
MCS680: Foundations Of Computer Science
Graphs.
CMPT 201 Functions.
Prof. Neary Adapted from slides by Dr. Katherine Gibson
Data Structures and Algorithms for Information Processing
Testing for Connectedness and Cycles
Topological Ordering Algorithm: Example
Search Related Algorithms
Podcast Ch25d Title: Minimum Path Algorithm
Chapter 11 Graphs.
Depth-First Search Graph Traversals Depth-First Search DFS.
Podcast Ch25c Title: Shortest Path Algorithm
Topological Ordering Algorithm: Example
Topological Ordering Algorithm: Example
Shadows & SILHOUTTES.
Topological Ordering Algorithm: Example
Presentation transcript:

CGTopics (S10) Silhouette Matters

CGTopics (S10) Definition [Wiki] A silhouette is a view of an object or scene consisting of the outline and a featureless interior, with the silhouetted object usually being black Silhouette edges: the outline of an object with respect to a reference point (camera or point light)

CGTopics (S10) Shadow Volume – other use of silhouette Silhouette also used in object-based anti-aliasing (Wiki)

CGTopics (S10) Silhouette in NPR

CGTopics (S10) Silhouette Edge Detection Brute force algorithm Go through all edges in the model; label edges that have exactly one front- facing face and one back-facing face

CGTopics (S10) Silhouette Detection (cont) Randomized algorithm (Markosian97) Fact: silhouette edges are often closed Algorithm: start from a set of randomly selected edges, if any of them belongs to part of silhouette, trace the contour out by topological traversal

CGTopics (S10) Winged Edge Data Structure vs ve fleftfright

CGTopics (S10) Topological Traversal FindSilhouetteLoop (sedge) Set one end of sedge as svertex, the other end as evertex Check all incident edges of svertex; one of them (besides sedge) must be also silhouette; set it as the new sedge Update svertex as EdgeOtherVertex (sedge,svertex) Continue iteration until svertex is evertex Supposed this edge has been detected as silhouette Triangular mesh; all faces CCW-winded sedge svertex evertex This should be more doable in OpenMesh

CGTopics (S10) Example 1

CGTopics (S10) Example 2

CGTopics (S10) Example 3

CGTopics (S10) Example 4

CGTopics (S10) Example 5

CGTopics (S10) Example 6

Might have problems if we only trace edges CGTopics (S10) Should trace contours on a model

The following are obsolete with the use of OpenMesh CGTopics (S10)

Need these queries … Vertex* Edge::OtherVertex(Vertex *v); Edge* Vertex::NextIncidentEdge(Edge* e); Bool Edge::IsSilhouette(); Edge* Face::PreviousEdge(Edge* e); Bool Face::IsFrontFacing(cont Vec3 refpos); Void Face::anyPosition(Vec3& pos);

CGTopics (S10) Find the next Incident Edge of a Vertex If v is the start_v of e, take fleft of e Else, take fright of e The previous edge of the face is the next incident edge v e v e

CGTopics (S10) Face::IsFrontFacing(refpos) True if dot(normal, refpos – anypos) > 0 refpos

CGTopics (S10) Attributes of an Edge int randcode; // for random selection of edges int rand() returns [0, RAND_MAX] m%: say select [0, m*RAND_MAX/100] May want to use srand(time(NULL) ) to change seed. int visited; // for topological traversal If an edge has been traversed, no need to explore again Remember to reset the flag when the reference point changes