Constructive Solid Geometry - PowerPoint PPT Presentation

1 / 3
About This Presentation
Title:

Constructive Solid Geometry

Description:

inL = inR = inC = false; /* assume origin is outside both objects ... while (l ) and (r ) do. if (l.x r.x) then. if (not (inR)) then. C.add(l.x); inC = not(inC) ... – PowerPoint PPT presentation

Number of Views:81
Avg rating:3.0/5.0
Slides: 4
Provided by: wen61
Category:

less

Transcript and Presenter's Notes

Title: Constructive Solid Geometry


1
Constructive Solid Geometry
2
Union Algorithm
  • procedure Union(in L,R, out C)
  • / L, R left right lists C composite list
    /
  • inL inR inC false / assume origin is
    outside both objects /
  • l L.first
  • r R.first
  • while (l ? ?) and (r ? ?) do
  • if (l.x ? r.x) then
  • if (not (inR)) then
  • C.add(l.x)
  • inC not(inC)
  • endif
  • l l.next
  • inL not(inL)
  • else

3
Union Algorithm (cont.)
  • else
  • if (not(inL)) then
  • C.add(r.x)
  • inC not(inC)
  • endif
  • r r.next
  • inR not(inR)
  • endif
  • endwhile
  • while (l ? ?) do
  • C.add(l.x) l l.next
  • endwhile
  • while (r ? ?) do
  • C.add(r.x) r r.next
  • endwhile
Write a Comment
User Comments (0)
About PowerShow.com