1 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac Lecture 17a: ACTIVE ZONES of CSG primitives Jarek Rossignac CS1050:

Slides:



Advertisements
Similar presentations
1 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac Project P3: CSG Lecture 08, File P3.ppt Due Feb 14 Individual.
Advertisements

1 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac Programming Project 2 SORTING Lecture 05, file P2 Due January.
1 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac Programming Project 1 Truth Table Lecture 03, file P1 Due January.
Closure Properties of CFL's
Greedy Algorithms Amihood Amir Bar-Ilan University.
Sets Lecture 11: Oct 24 AB C. This Lecture We will first introduce some basic set theory before we do counting. Basic Definitions Operations on Sets Set.
Basic Structures: Sets, Functions, Sequences, Sums, and Matrices
Basic Structures: Sets, Functions, Sequences, Sums, and Matrices
1 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac CSG rendering  Booleans  Space partitions  CSG & BSP  CSG.
Huffman Encoding Dr. Bernard Chen Ph.D. University of Central Arkansas.
Nearest Neighbor. Predicting Bankruptcy Nearest Neighbor Remember all your data When someone asks a question –Find the nearest old data point –Return.
1 Huffman Codes. 2 Introduction Huffman codes are a very effective technique for compressing data; savings of 20% to 90% are typical, depending on the.
1 Section 1.7 Set Operations. 2 Union The union of 2 sets A and B is the set containing elements found either in A, or in B, or in both The denotation.
Fall 2004COMP 3351 Single Final State for NFA. Fall 2004COMP 3352 Any NFA can be converted to an equivalent NFA with a single final state.
Data Structures – LECTURE 10 Huffman coding
Chapter 12 Trees. Copyright © 2005 Pearson Addison-Wesley. All rights reserved Chapter Objectives Define trees as data structures Define the terms.
Introduction to Boolean Operations on Free-form Solids CS284, Fall 2004 Seung Wook Kim.
BSP Trees, Quadtrees & Octrees Glenn G. Chappell U. of Alaska Fairbanks CS 481/681 Lecture Notes Wednesday, January 28, 2004.
Lecture 21: Languages and Grammars. Natural Language vs. Formal Language.
1 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac Lecture 06: COMPLEXITY Sections 2.2 and 2.3 Jarek Rossignac CS1050:
CSE 3813 Introduction to Formal Languages and Automata Chapter 8 Properties of Context-free Languages These class notes are based on material from our.
1 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac Lecture 03: PROOFS Section 1.5 Jarek Rossignac CS1050: Understanding.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Sets.
4.8 Huffman Codes These lecture slides are supplied by Mathijs de Weerd.
Created on 29/10/2008yahaya.wordpress.com1 Trees Another common nonlinear data structure is the tree. We have already seen an example of a tree when we.
1 Regular Expressions. 2 Regular expressions describe regular languages Example: describes the language.
HomeWork 2 Solution Chen Zhanqing.
The Hexadecimal Number System and Memory Addressing ISAT 121.
CS621: Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 28– Interpretation; Herbrand Interpertation 30 th Sept, 2010.
Discrete Structures Lecture 12: Trees Ji Yanyan United International College Thanks to Professor Michael Hvidsten.
Data Structures and Algorithm Analysis Trees Lecturer: Jing Liu Homepage:
1 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac Lecture 02b: Tutorial for Programming in Processing Jarek Rossignac.
CompSci 102 Discrete Math for Computer Science
EE2174: Digital Logic and Lab Professor Shiyan Hu Department of Electrical and Computer Engineering Michigan Technological University CHAPTER 8 Arithmetic.
1 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac Lecture 09: SEQUENCES Section 3.2 Jarek Rossignac CS1050: Understanding.
Fall 2008/2009 I. Arwa Linjawi & I. Asma’a Ashenkity 11 Basic Structure : Sets, Functions, Sequences, and Sums Sets Operations.
CSE 311 Foundations of Computing I Lecture 9 Proofs and Set Theory Autumn 2012 CSE
1 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac Project P9 Graphs Jarek Rossignac CS1050: Understanding and Constructing.
CS 376b Introduction to Computer Vision 02 / 11 / 2008 Instructor: Michael Eckmann.
CS621: Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 3 - Search.
1 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac Lecture 02: QUANTIFIERS Sections 1.3 and 1.4 Jarek Rossignac CS1050:
Top-down Parsing lecture slides from C OMP 412 Rice University Houston, Texas, Fall 2001.
Chapter 8 Properties of Context-free Languages These class notes are based on material from our textbook, An Introduction to Formal Languages and Automata,
Lecture # 15. Mealy machine A Mealy machine consists of the following 1. A finite set of states q 0, q 1, q 2, … where q 0 is the initial state. 2. An.
1 SIC / CoC / Georgia Tech MAGIC Lab Rossignac Processing  Install Processing  Learn how to edit, run, save, export,
1 The tree data structure Outline In this topic, we will cover: –Definition of a tree data structure and its components –Concepts of: Root, internal, and.
1 Set Theory Second Part. 2 Disjoint Set let A and B be a set. the two sets are called disjoint if their intersection is an empty set. Intersection of.
1 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac Lecture 05: SORTING Section 2.1 Jarek Rossignac CS1050: Understanding.
1 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac Lecture 04: SETS AND FUNCTIONS 1.6, 1.7, 1.8 Jarek Rossignac CS1050:
1 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac Lecture 09a: PROOF STRATEGIES Section 3.1 Jarek Rossignac CS1050:
1 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac.
1 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac Lecture 01: Boolean Logic Sections 1.1 and 1.2 Jarek Rossignac.
Solid Modeling Dr. Scott Schaefer.
Chapter 2 1. Chapter Summary Sets (This Slide) The Language of Sets - Sec 2.1 – Lecture 8 Set Operations and Set Identities - Sec 2.2 – Lecture 9 Functions.
©2010 Cengage Learning SLIDES FOR CHAPTER 3 BOOLEAN ALGEBRA (continued) Click the mouse to move to the next page. Use the ESC key to exit this chapter.
CPCS 222 Discrete Structures I
Lecture 6 Set Theory.
Constructive Solid Geometry CSG (Geometri Padat Konstruktif)
Lecture 23 Red Black Tree Chapter 10 of textbook
Set Operations CS 202, Spring 2008 Epp, chapter 5.
PROPERTIES OF REGULAR LANGUAGES
CHAPTER 4 Trees.
Taibah University College of Computer Science & Engineering Course Title: Discrete Mathematics Code: CS 103 Chapter 2 Sets Slides are adopted from “Discrete.
Binary Tree and General Tree
Set Operations Section 2.2.
Binary Trees Based on slides by Alyssa Harding & Marty Stepp
Final practice CS1050: Understanding and Constructing Proofs
The aim of education is to teach students how to think rather than what to think. Sets The set is the fundamental discrete structure on which all other.
B-Trees.
Presentation transcript:

1 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac Lecture 17a: ACTIVE ZONES of CSG primitives Jarek Rossignac CS1050: Understanding and Constructing Proofs Spring 2006

2 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac Lecture Objectives Learn how to Compute the positive form of a CSG tree Define the active zone Z of a primitive Compute a CSG expression of Z Use the CSG expression for classifying surfels

3 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac What is a CSG tree Consider a CSG expression: S=(A–B)+(C–D)–(EF) It may be parsed into a binary tree –Leaves correspond to primitive shapes –Nodes represent Boolean operations –Root represents solid defined by S     AB C D E F root primitives

4 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac A 2D example

5 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac A shape has many CSG reps

6 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac When is a primitive redundant A primitive A is redundant in S if S can be expressed using the other primitves, without A.

7 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac Is A redundant if  A adds nothing to  S?

8 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac How to convert a CSG to its positive form? Apply de Morgan laws and push the complement down to the primitives Primitives complemented an odd number of times are negative (and hence unbounded)

9 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac What is the positive form of S? S=(A+B)–(C–D)–(EF)      A B C D E F  A B CC D  E FF     S = (A+B) (  C–D) (  E+  F)

10 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac Now assume CSG is in positive form Rename the negative primitives with new names so that they become positive (although infinite) primitives A CSG tree in positive form has only union and intersection operators Hence, in what follows we need not discuss what to do with difference operators We assume that the CSG tree has been converted into its positive form and that all primitives are positive (even though some may be unbounded)

11 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac What is the path of a primitive A? The parent and ancestors of A in the CSG tree. root Nodes in the path of A primitives   AB C D E F   

12 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac How to compute the path? Path will be represented as a string of L or R symbols p=emptyString; path(root,p); path(n,p) { if (n.isPrimitive) { n.myPath=p; else { path(n.left, p+’L’); path(n.right, p+’R’); };   AB C D E F    LLL LR LRL LRR RL RR LL LR LLR

13 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac What are the branching nodes? Siblings of path nodes root Branching nodes of A primitives   AB C D E F   

14 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac What are the path and branching nodes of D? Path nodes Branching nodes   AB C D E F   

15 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac What are i-nodes and u-nodes of A? i-nodes = branching nodes that are children of an intersection u-nodes = branching nodes that are children of a union   AB C D E F    Circle the i-nodes of A? Circle the u-nodes of A?

16 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac Practice i-nodes and u-nodes   AB C D E F    Circle the i-nodes of C? Circle the u-nodes of C?

17 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac What is the active zone of A in S? The active zone Z of primitive A in a given CSG expression of S is the region in which changes to A affect S.

18 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac Simple active zones

19 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac How are I, U, and Z of A defined? I-zone: I = intersection of the i-nodes (or the universe w if none) U-zone: U = union of the u-nodes Active zone: Z = I – U Compute I, U, and Z for A   AB C D E F    I = EF U = B+CD Z = EF – (B+CD) = EF– B –(CD)

20 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac Practice: Shade S and Z IDENTIFY S AND Z Verify that changing A out of Z does not change S   AB C D E F    I = EF U = B+CD Z = EF – (B+CD) = EF– B –(CD) A B F E CD

21 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac Point-in-solid test on CSG Classify(point P, node N) IF N is primitive, THEN RETURN(PMC(P,N)) ELSE RETURN(Combine(N.op, PMC(P,N.left),PMC(P,N.right)));      AB C D E F A B F E C D

22 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac Surfel = point E on the boundary of a primitive A. Does it contribute to the boundary of S? Or can A be changed around E without affecting S? How to test a surfel

23 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac Strategy for CSG rendering Generate a sufficiently dense set of surfels on the boundary of each primitive A –For a cylinder, place surfels on a circle and slide the circle … Classify surfels against Z Render those in Z

24 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac Definition of S 0 and S 1 S 0 is the solid obtained by replacing A by the empty set in S S 1 is the solid obtained by replacing A by the universe in S

25 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac Show that S 0  S  S 1 Remember that A is positive –“  ” means inclusion or equality Adding material to A can only grow S Subtracting material from A can only shrink S

26 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac Reordering the tree to put A on the left

27 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac Prove that S = AI+S 0 Distributing intersection over union in the reordered tree yields S=AI+X. Setting A to 0 shows that X=S 0. Similarly, we can show that S = (A+U)S 1 since (A+B 2 +B 3 )(B 1 +B 2 +B 3 )B 4S = (A+B 2 +B 3 )(B 1 +B 2 +B 3 )B 4 S= (AB 1 +B 2 +B 3 )B 4 = AB 1 B 4 +(B 2 +B 3 )B 4 = AI+S 0

28 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac Show that AI  S  A+U S=AI+S 0 henceS=AI+S 0 hence AI  S S=(A+U)S 1 henceS=(A+U)S 1 hence S  (A+U)

29 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac Show that S 1 =I+S 0 and S 0 =US 1 Replace A by the univese (1) in S=AI+S 0Replace A by the univese (1) in S=AI+S 0 Replace A by the empty set (0) in S=(A+U)S 1Replace A by the empty set (0) in S=(A+U)S 1

30 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac Show that S 1 –S 0 = I–S 0 = S 1 –U Since S 1 =I+S 0, S 1 –S 0 = (I+S 0 )–S 0 = I–S 0 Since S 0 =US 1 S 1 –S 0 = S 1 – US 1 = S 1 – U

31 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac Prove that Z = S 1 –S 0 S 1 –S 0 = (S 1 –S 0 )(S 1 –S 0 ), since X=XX = (I–S 0 )(S 1 –U), proven above = I  S 0 S 1  U, de Morgan = (IS 1 )(  S 0  U), by reordering = (IS 1 )–(S 0 +U), de Morgan = I–U, since I  S 1 and U  S 0 = Z, by definition of Z

32 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac Show that S=AZ+S 0 S = AS 1 +  AS 0, Shanon’s expansion = AS 1 +S 0 = AS 1 +(A  S 0 +AS 0 )+S 0 = (AS 1 +A  S 0 ) + (AS 0 +S 0 ) = A(S 1 –S 0 )+S 0 = AZ+S 0A S0S0S0S0 S1S1S1S1

33 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac Show that AZ and S 0 are disjoint A Z S 0 = A(S 1  S 0 )S 0 = AS 1 (  S 0 S 0 ) = 0

34 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac Assigned Reading Two papers: Active Zones in CSG for Accelerating Boundary Evaluation, Redundancy Elimination, Interference Detection and Shading Algorithms –Jarek Rossignac and Herbert Voelcker –ACM Transactions on Graphics, Vol. 8, pp , Blister: GPU-based rendering of Boolean combinations of free-form triangulated shapes –John Hable and Jarek Rossignac –ACM Transactions on Graphics, SIGGRAPH 2005.

35 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac Assigned Project P8 Due April 4 before class Teams of 1 and 2 Create a joint web page and put a link to it from the PPPs of each team member Include in the project: –Project title: 1050 project P8: Active Zones for CSG –Names of the team members –Short description of the assignment –Definition of the active zone and explanation of how it is computed –A short description of how/why it is used in the applet –An example of a CSG expression and of the active zone expression for a primmitive –Reference to the Active Zone paper –Window with a running applet (described in the next slide) –Explanations of the User Interface commands for dragging/chaning primitives –Link to the course code

36 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac P8 implementation Start with your P3 assignment with a CSG editor –You will not need it tree editing (but it is nice if you have it) –You need to be able to render a CSG defined region –and to circulate which one is the current primitive –and to move the primitive Implement a recursive procedure that compute the path to each primitive and stores it with the primitive (you can represent the path as a string of characters or bits). Let A be the current primitive, Z its active zone, and S 0 the region defined by the expression S whith A replaced by the empty set Render the background in white, S 0 in blue, AZ in red, Z–A in green. Remember that S 0 and AZ are disjoint and that their union is S.

37 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac Showing off the results for P8 Hardwire your code with an interesting CSG tree and select the default current primitive so that it has at at least 3 branching nodes, two of which being Boolean expression with two or more primtives, with at least one i-node and one u-node. In the project web page, print the CSG expression, say which primtive is the defailt active primitive, provide the CSG expressions for its I-zone, U-zone, active zone, and S 0.