- 48 Views
- Uploaded on
- Presentation posted in: General

Lecture 17a: ACTIVE ZONES of CSG primitives

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Lecture 17a: ACTIVE ZONESof CSG primitives

CS1050: Understanding and Constructing Proofs

Spring 2006

Jarek Rossignac

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

F

E

D

A

B

C

- 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

root

primitives

A primitive A is redundant in S if S can be expressed using the other primitves, without A.

Apply de Morgan laws and push the complement down to the primitives

Primitives complemented an odd number of times are negative (and hence unbounded)

E

F

A

B

D

C

S=(A+B)–(C–D)–(EF)

S = (A+B) (C–D) (E+F)

F

E

B

D

A

C

- 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)

F

E

D

A

B

C

- The parent and ancestors of A in the CSG tree.

Nodes in the path of A

root

primitives

F

E

D

A

B

C

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’);

};

};

L

R

LL

LR

RR

RL

LLR

LLL

LRR

LRL

F

E

D

A

B

C

- Siblings of path nodes

root

Branching nodes of A

primitives

Path nodes

Branching nodes

F

E

D

A

B

C

F

E

D

A

B

C

i-nodes = branching nodes that are children of an intersection

u-nodes = branching nodes that are children of a union

Circle the i-nodes of A?

Circle the u-nodes of A?

F

E

D

A

B

C

Circle the i-nodes of C?

Circle the u-nodes of C?

The active zone Z of primitive A in a given CSG expression of S is the region in which changes to A affect S.

I = EF

F

E

U = B+CD

D

A

B

C

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

Z = EF – (B+CD) = EF– B –(CD)

I = EF

F

E

U = B+CD

D

A

B

C

IDENTIFY S AND Z

Verify that changing A out of Z does not change S

A

B

E

F

C

D

Z = EF – (B+CD) = EF– B –(CD)

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)));

A

B

E

F

F

E

D

C

D

A

B

C

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?

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

S0 is the solid obtained by replacing A by the empty set in S

S1 is the solid obtained by replacing A by the universe in S

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

Distributing intersection over union in the reordered tree yields S=AI+X.

Setting A to 0 shows that X=S0.

Similarly, we can show that S = (A+U)S1since

S = (A+B2+B3)(B1+B2+B3)B4

S= (AB1+B2+B3)B4 = AB1 B4 +(B2+B3)B4 = AI+S0

S=AI+S0 hence AI S

S=(A+U)S1 hence S (A+U)

Replace A by the univese (1) in S=AI+S0

Replace A by the empty set (0) in S=(A+U)S1

Since S1=I+S0 , S1–S0 = (I+S0)–S0 = I–S0

Since S0=US1 S1–S0 = S1– US1 = S1– U

S1–S0= (S1–S0)(S1–S0), since X=XX

= (I–S0)(S1–U), proven above

= IS0S1U, de Morgan

= (IS1)(S0U) , by reordering

= (IS1)–(S0+U), de Morgan

= I–U, since I S1 and U S0

= Z, by definition of Z

S = AS1+AS0, Shanon’s expansion

= AS1+S0

= AS1 +(AS0 +AS0)+S0

= (AS1+AS0) + (AS0+S0)

= A(S1–S0)+S0

= AZ+S0

A

S0

S1

A Z S0 = A(S1S0)S0 = AS1(S0S0) = 0

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. 51-87, 1989.

- Blister: GPU-based rendering of Boolean combinations of free-form triangulated shapes
- John Hable and Jarek Rossignac
- ACM Transactions on Graphics, SIGGRAPH 2005.

- 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

- 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 S0 the region defined by the expression S whith A replaced by the empty set
- Render the background in white, S0 in blue, AZ in red, Z–A in green.Remember thatS0 and AZ are disjoint and that their union is S.

- 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 S0.