Computer Science 225
Advanced Programming
Spring 2021, Siena College
Lecture 12: Quadtrees and Traversals; More Interesting Event Driven Programs
Date: Friday, April 2, 2021
Agenda
- Announcements
- no ongoing labs or problem sets, no upcoming exam!
- no class Monday
- labs resume as usual next week (please fill out my form)
- watch for an intro to problem set 4 next week
- Quadtrees
- a look at the remaining methods
- In-class exercise: quadtree traversals (3 points)
- iteration over quadtrees
- More interesting event-driven programs
- Happy Easter!
Examples
- Points2D: spatial data structures including an adaptive quadtree
- MouseDroppings: basic mouse event handling
and maintaining a list of objects to redraw
- SpiralLines: dragging to draw spiral shapes
- SunAndMoon: move/drag events to affect the
state of objects displayed
- UglyDragABall: dragging an object with the
mouse, but a little ugly
- DragABall: dragging an object with the
mouse, better
- DragMany: drag any of many objects,
including a custom class to represent the shapes we drag