Lecture 17a active zones of csg primitives
This presentation is the property of its rightful owner.
Sponsored Links
1 / 37

Lecture 17a: ACTIVE ZONES of CSG primitives PowerPoint PPT Presentation


  • 53 Views
  • Uploaded on
  • Presentation posted in: General

Lecture 17a: ACTIVE ZONES of CSG primitives. CS1050: Understanding and Constructing Proofs. Spring 2006. Jarek 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

Download Presentation

Lecture 17a: ACTIVE ZONES of CSG primitives

An Image/Link below is provided (as is) to download presentation

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

Presentation Transcript


Lecture 17a active zones of csg primitives

Lecture 17a: ACTIVE ZONESof CSG primitives

CS1050: Understanding and Constructing Proofs

Spring 2006

Jarek Rossignac


Lecture objectives

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


What is a csg tree

F

E

D

A

B

C

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

root

primitives


A 2d example

A 2D example


A shape has many csg reps

A shape has many CSG reps


When is a primitive redundant

When is a primitive redundant

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


Is a redundant if a adds nothing to s

Is A redundant if A adds nothing to S?


How to convert a csg to its positive form

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)


What is the positive form of s

E

F

A

B

D

C

What is the positive form of S?

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

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

F

E

B

D

A

C


Now assume csg is in positive form

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)


What is the path of a primitive a

F

E

D

A

B

C

What is the path of a primitive A?

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

Nodes in the path of A

root

primitives


How to compute the path

F

E

D

A

B

C

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

};

};

L

R

LL

LR

RR

RL

LLR

LLL

LRR

LRL


What are the branching nodes

F

E

D

A

B

C

What are the branchingnodes?

  • Siblings of path nodes

root

Branching nodes of A

primitives


What are the path and branching nodes of d

What are the path and branching nodes of D?

Path nodes

Branching nodes

F

E

D

A

B

C


What are i nodes and u nodes of a

F

E

D

A

B

C

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

Circle the i-nodes of A?

Circle the u-nodes of A?


Practice i nodes and u nodes

F

E

D

A

B

C

Practice i-nodes and u-nodes

Circle the i-nodes of C?

Circle the u-nodes of C?


What is the active zone of a in s

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.


Simple active zones

Simple active zones


How are i u and z of a defined

I = EF

F

E

U = B+CD

D

A

B

C

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

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


Practice shade s and z

I = EF

F

E

U = B+CD

D

A

B

C

Practice: Shade S and Z

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)


Point in solid test on csg

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

A

B

E

F

F

E

D

C

D

A

B

C


How to test a surfel

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


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

Strategy for CSG rendering


Definition of s 0 and s 1

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

Definition of S0 and S1


Show that s 0 s s 1

Remember that A is positive

“” means inclusion or equality

Show that S0 S  S1

Adding material to A can only grow S

Subtracting material from A can only shrink S


Reordering the tree to put a on the left

Reordering the tree to put A on the left


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

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

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

Prove that S = AI+S0

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


Show that ai s a u

S=AI+S0 hence AI  S

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

Show that AI  S  A+U


Show that s 1 i s 0 and s 0 us 1

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

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

Show that S1=I+S0 and S0=US1


Show that s 1 s 0 i s 0 s 1 u

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

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

Show that S1–S0 = I–S0 = S1–U


Prove that z s 1 s 0

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

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

= IS0S1U, de Morgan

= (IS1)(S0U) , by reordering

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

= I–U, since I  S1 and U  S0

= Z, by definition of Z

Prove that Z = S1–S0


Show that s az s 0

S = AS1+AS0, Shanon’s expansion

= AS1+S0

= AS1 +(AS0 +AS0)+S0

= (AS1+AS0) + (AS0+S0)

= A(S1–S0)+S0

= AZ+S0

Show that S=AZ+S0

A

S0

S1


Show that az and s 0 are disjoint

A Z S0 = A(S1S0)S0 = AS1(S0S0) = 0

Show that AZ and S0 are disjoint


Assigned reading

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


Assigned project p8

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


P8 implementation

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


Showing off the results for p8

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


  • Login