Tavolo is a tabletop application for conferences. This application was developed for the Microsoft Surface using the WPF Framework.
Monthly Archive: November 2009
CT Hours for Monday November 23rd will be cancelled. If you have any questions, please contact me at
I will be out of town from Monday the 23nd until Wednesday the 25th. My tutorials will be covered by the other TAs as follows.
T01 – Tedd Hellmann
T03 – Kate Chatfield-Reed
I will be available by email most of this week, although at times, my responses will likely be delayed.
Assignment 3 is due Friday, November 20th at Noon.
This has been shamelessly borrowed from Chris Luce, as he showed them in one of my tutorials last week.
This example shows a Tic Tac Toe checker, to see if there is a win in a board, or if it’s a cats game.
This example uses a 2 dimensional list, which you may find helpful to understand for your assignment.
In this example, we created a few helper functions, like the ones below to convert values between cartesian values and screen coordinates
#convert an x value from cartesian coordinates to screen coordinates def cartx(x): x = scale * x x = xcenter + x return x #convert an x value from cartesian coordinates to screen coordinates def carty(y): y = scale * y y = ycenter - y return y
The core of the program, that is, the drawing of the curve was also done using functions, as seen here
#Draw the curve defined by a,b,c and d from a beginning cartesian value to an end cartesian value #approximating by delta cartesian units def draw(a,b,c,d,begin,end,delta): x = begin while x < end: y = formula(a,b,c,d,x) y2 = formula(a,b,c,d,x+delta) print "line",cartx(x),carty(y),cartx(x+delta),carty(y2) x = x + delta sys.stdout.flush()