
















Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!

















n-dimensional space
splitting hyperplane (n-1)-dimensional a 1 x 1 + a 2 x 2 + … anxn + an+1 = 0 ax + by + c = 0 (2D) ax+by+cz+d = 0 (3D)
n-dimensional space +ve half space ax + by + c > 0 ax+by+cz+d > 0
-ve half space ax + by + c < 0 ax+by+cz+d < 0
coincident ax + by + c = 0 ax+by+cz+d = 0
x
z
y
Equation of ph is z – 2 = 0 General: ax + by + cz + d = 0
n-dimensional space
-ve +ve
-ve
+ve
coincident list
a
b
c
d
g
e
f
h
a
b
c
d
g
e
f
h
a
b
c
d
g
e
f
h a-b c-d^ e-f g-h
a
b
c
d
g
e
f
h
a bc d e f^ g^ h
a
b
c
d
g
e
f
h
a bc d e f^ g^ h
a
b
c
d
g
e
f
h
a bc d e f^ g^ h
a
b
c
d
g
e
f
h
a
b
c
d
g
e
f
h
a
b
c
d
g
e
f
h
a
b
c
d
g
e
f
h
a
a
b
b
a
a
b
b
c
c
a
a
b
b
c
c
d
d
a
a
b
b c d e
d (^) e c
if O is empty , return null ; Create a new node N ; N.ph = partitioning hyperplane for O ; lList = rList = N.cList = null ; for each object z in O do if z is coincident to ph or |O| = 1, add z to N. cList ; if z is left of ph , add z to lList ; if z is right of ph , add z to rList ; if z spans ph , split z and add pieces to lList and rList ; N.leftChild = BSPTree(lList); N.rightChild = BSPTree(rList); return N;
{ draw(N.rightChild); draw N.cList; draw(N.leftChild) };
{ draw(N.leftChild); draw N.cList; draw(N.rightChild) };
{ draw(N.leftChild); draw N.cList; draw(N.rightChild) };
{ draw(N.rightChild); draw N.cList; draw(N.leftChild) };