Sample interactive programs
Below are some sample graphical user interfaces
that I've developed for teaching purposes at ETS.
They are each designed to demonstrate the programming of multiple techniques and features,
but I also tried to keep the source code as simple as possible, to allow students to
find their way around the code and modify things.
All source code identifiers (class, method, and variable names, etc.)
and comments within the source code are in English,
though some of the documentation files are written in French.
Feel free to download these samples and play
with them if they might be useful to you.
Please send me email
about how you
use these code samples in your courses or other projects.
SimplePaint
3D Modeller
Network Visualizer
Multitouch Real-Time Strategy (RTS) Game
Multitouch Multi-User Electronic Whiteboard
- A Java application
- A simple multi-user electronic whiteboard for making drawings, allowing each user
to draw with multiple fingers and choose options from their own floating palette
- Implements a multitouch framework that can read either
native Windows 10 touch events (using JWinPointer),
or pseudo-multitouch events simulated with a standard mouse
(useful for testing when true multitouch hardware is not available).
To choose between JWinPointer or the mouse simulator,
simply swap in the appropriate version of one source code file (MultitouchFramework.java)
and recompile.
- Uses JOGL and OpenGL to render the 2D drawing
- Demonstrates how to implement a combination rectangle/lasso selection tool
inspired by [Saund et al. 2003]
- Implements pan and zoom, using the 2-finger "pinch" gesture, over a 2D space
- Implements direct manipulation, using the 2-finger "pinch" gesture, to translate, rotate, and scale selected strokes of the drawing
- ~2800 lines of code
- Download .zip file: java/SimpleWhiteboard-2D-Multitouch_JavaApplication-JOGL-OpenGL.zip
- Browse source code directory: java/SimpleWhiteboard-2D-Multitouch_JavaApplication-JOGL-OpenGL/
- Overview of classes (in French): java/SimpleWhiteboard-2D-Multitouch_JavaApplication-JOGL-OpenGL/src/CLASSES.html
3D Volume Viewer
- A Java application
- A simple 3D program that allows volumetric data
to be viewed from different angles and rendered with variable opacity
and variable thresholding
- Uses JOGL and OpenGL to render the 3D scene
- Implements a Camera class that can be easily rotated or translated in response to mouse input
- Implements several geometric classes
- Demonstrates the use of Swing widgets
- ~1375 lines of code
- Data sets included
- Download .zip file: java/SimpleVolumeViewer-3D_JavaApplication-JOGL-OpenGL.zip
- Browse source code directory: java/SimpleVolumeViewer-3D_JavaApplication-JOGL-OpenGL/
Python example
- Written in Python
- Renders a hardcoded 3D wireframe model
- Uses OpenGL to render the 3D scene
- Implements a Camera class that can be easily rotated or translated in response to mouse input
- Implements Point3D, Vector3D, and Matrix4x4 classes to ease linear-algebra computations,
and that demonstrate operator overloading
- Demonstrates the use of Qt widgets
- ~560 lines of code
- Browse source code directory: python/example-3D_Python-Qt-OpenGL/