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 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.
Lecture 17a: ACTIVE ZONESof CSG primitives
CS1050: Understanding and Constructing Proofs
Spring 2006
Jarek Rossignac
Learn how to
F
E
D
A
B
C
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
F
E
D
A
B
C
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
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: