[Univ of Cambridge] [Dept of Engineering]
next up previous contents
Next: Decision Routine Up: Dodgems: A longer exercise Previous: Geometric Routines

Graphics Routines

C++ doesn't have any graphics routines. CUED people can use the Vogle Library to create the following routines (about 40 lines of code). If you don't have vogle, you'll need to write the following routines using whatever graphics available.
void initialise_graphics(); // create a window, and arena outline
                            // and suitable scale factors
void draw_circle(int x,int  y, int radius, Team t); //use t to select color
void undraw_circle(int x,int  y, int radius);
void wait_for_key(); // wait for a key to be pressed before removing window



Tim Love
2001-07-05