INIT_QUADTREE(4,0)
INIT_QUADTREE(4,1)
CREATE_RECTANGLE(LEIA,2,2,2,2)
CREATE_RECTANGLE(YODA,2,14,1,1)
CREATE_RECTANGLE(LUKE,8,8,2,2)
CREATE_RECTANGLE(C3PO,8,13,2,1)
CREATE_RECTANGLE(HAN,13,2,3,2)
CREATE_RECTANGLE(R2D2,13,8,1,1)
CREATE_RECTANGLE(OBIWAN,14,12,2,3)
CREATE_RECTANGLE(JABBA,4,5,4,1)
CREATE_RECTANGLE(VADER,11,5,2,2)
CREATE_RECTANGLE(WEDGE,16,6,2,1)
LIST_RECTANGLES()
TRACE ON
INSERT(LEIA)
INSERT(YODA)
INSERT(LUKE)
INSERT(C3PO)
INSERT(HAN)
INSERT(R2D2)
INSERT(OBIWAN)
TOUCH(JABBA)
TOUCH(VADER)
TOUCH(OBIWAN)
TOUCH(WEDGE)
TOUCH(HAN)
TOUCH(LEIA)
WITHIN(JABBA,0)
WITHIN(JABBA,1)
WITHIN(VADER,0)
WITHIN(VADER,1)
WITHIN(VADER,3)
HORIZ_NEIGHBOR(YODA)
HORIZ_NEIGHBOR(JABBA)
HORIZ_NEIGHBOR(LEIA)
HORIZ_NEIGHBOR(LUKE)
HORIZ_NEIGHBOR(R2D2)
HORIZ_NEIGHBOR(OBIWAN)
HORIZ_NEIGHBOR(WEDGE)
VERT_NEIGHBOR(YODA)
VERT_NEIGHBOR(VADER)
VERT_NEIGHBOR(LEIA)
VERT_NEIGHBOR(LUKE)
NEAREST_RECTANGLE(8,8)
NEAREST_RECTANGLE(6,6)
NEAREST_RECTANGLE(10,10)
NEAREST_RECTANGLE(0,16)
NEAREST_RECTANGLE(12,9)
NEAREST_RECTANGLE(17,17)
NEAREST_RECTANGLE(5,5)
NEAREST_RECTANGLE(8,11)
NEAREST_NEIGHBOR(YODA)
NEAREST_NEIGHBOR(C3PO)
NEAREST_NEIGHBOR(VADER)
NEAREST_NEIGHBOR(WEDGE)
NEAREST_NEIGHBOR(JABBA)
LEXICALLY_GREATER_NEAREST_NEIGHBOR(YODA)
LEXICALLY_GREATER_NEAREST_NEIGHBOR(C3PO)
LEXICALLY_GREATER_NEAREST_NEIGHBOR(LUKE)
LEXICALLY_GREATER_NEAREST_NEIGHBOR(OBIWAN)
LEXICALLY_GREATER_NEAREST_NEIGHBOR(R2D2)
LEXICALLY_GREATER_NEAREST_NEIGHBOR(YODA)
WINDOW(0,4,8,8)
WINDOW(1,4,8,8)
WINDOW(2,4,8,8)
WINDOW(3,4,8,8)
WINDOW(4,4,8,8)
WINDOW(5,4,8,8)
WINDOW(6,4,8,8)
WINDOW(7,4,8,8)
WINDOW(8,4,8,8)
LABEL()
MOVE(YODA,5,-3)
LABEL()
INSERT(JABBA)
LABEL()
INSERT(VADER,1)
SPATIAL_JOIN(0,1)
