Recent Changes - Search:

Home

Is the Laser up?

People

Publications

Calendar

Projects

Spring 2012

Older Courses

Fall 2011

Spring 2011

Fall 2010

Spring 2010

Fall 2009

Spring 2009

Fall 2008

Spring 2008

Fall 2007

HOWTOs

edit SideBar

LiquidMath

Curran Kelleher
May 13, 2009

Overview

LiquidMath is a 3D graphing calculator. It graphs implicit parametric equations, where (x,y,z) = f(u,v). Functions are input as Lisp code in the text box, and the surface is displayed as a freely rotatable 3D object.

Screenshot

Concepts Demonstrated

  • Accessor functions are often used to abstract away detail.
  • Dynamic code generation is used when compiling the code entered by the user to provide boilerplate code and built-in functions.
  • Dynamic scoping is essential in allowing the users code to mutate variables visible to the rendering code.
  • Tail recursion (..well, at least Clojure's explicit variant of it) is used for iteration over all vertices.

External Technology

LiquidMath is written in Clojure, a modern Lisp variant which compiles to Java bytecode. Java's Swing API is used for the GUI. OpenGL is used for 3D rendering, accessed via the Java OpenGL (JOGL) library. OpenGL Display Lists are used to achieve smooth rotation interaction.

Innovation

LiquidMath combines the dynamic nature of Lisp, the beauty of math, and the interactivity of modern graphics to deliver an effective educational tool for gaining insight into the nature of parametric surfaces. Conventionally, courses which explore 3D surfaces such as calculus III use only static diagrams. LiquidMath could be used by instructors during class, or by students when doing assignments.

Technology Used Block Diagram

LiquidMath is designed around the model-view-controller pattern, in which the model is the data representing salient application state, the view is the gui definition, and the controller sets up communication between the view and model. The view contains the text box and graphics panel. The text box updates the model via a listener added by the controller. The graphics panel is responsible for responding to changes in the model by generating and compiling code from the newly entered function string, then rerendering the surface into the display list.

Additional Remarks

The full source code is posted here: http://curransoft.com/code/liquidmath-20090513.zip

Here are some additional works that came out of this project:

The following are discussions on the Clojure mailing list:

Edit - History - Print - Recent Changes - Search
Page last modified on May 13, 2009, at 02:44 AM