CHAI 3D
Computer Haptics & Active Interfaces

Examples


How To Use This Page

This page contains information on each of the CHAI examples. If you're viewing it online, it gives you a feel for what CHAI can do. If you're viewing it locally after unzipping CHAI, you will be able to open the relevant project files and binaries from this page. Note that you do not need a haptic device installed to run the examples; they will automatically launch the 'virtual haptic device' if a supported device is not found.

The best way to view the example sources is via the solution/project group files that let you access all the examples from one place... you can load them from here if you're viewing this page locally:

MSVC7 solution MSVC6 workspace Borland 6 project group

Note that if your browser opens some of these files as text, you should just open the file you want from the examples folder inside the CHAI distribution.


CHAI Examples

basic_shapes

This example demonstrates simple haptic interaction with a polygonal mesh, which is created programmatically.

Launch: MSVC7 version   MSVC6 version   Borland 6 version  
object_loader

This example demonstrates the loading of mesh files in .3ds and .obj format, and haptic interaction with those meshes. It also demonstrates the programmatic control of various haptic and graphic rendering options. This is a great starting point for building your own CHAI application.

Launch: MSVC7 version   MSVC6 version   Borland 6 version  
mass_springs

This example demonstrates a simple dynamic system, creating a chain of masses and springs that you can control with your haptic device. It also demonstrates the direct application of forces, bypassing the proxy or other built-in force algorithms.

Launch: MSVC7 version   MSVC6 version   Borland 6 version  
record_player

This example lets you use your haptic device to spin a record, demonstrating the use of sound in CHAI, via the BASS audio library. It also demonstrates the multinational composition of the CHAI development team.

Launch: MSVC7 version   MSVC6 version   Borland 6 version  
sounds

This example demonstrates the generation of sound based on contact with virtual objects, based on the algorithm developed by van den Doel et al.

Launch: MSVC7 version   MSVC6 version   Borland 6 version  
dynamic_ode

This example demonstrates the integration of CHAI with ODE, a popular open-source engine for rigid-body dynamics. You can push around a cube using one or two hapic devices.

Launch: MSVC7 version   MSVC6 version   Borland 6 version  
dynamic_meshes

This example demonstrates the integration of CHAI with ODE. You can push around arbitrary meshes.

Launch: MSVC7 version   MSVC6 version   Borland 6 version  
active_x

This example demonstrates the embedding of a CHAI application (graphics and haptics) in an ActiveX control, and subsequently in a web page. Note that the links here are to .html files, and will only work properly in Internet Explorer.

Launch: MSVC7 version   MSVC6 version   Borland 6 version  
math

This example demonstrates the basic use of the CHAI math functions.

Launch: MSVC7 version   MSVC6 version   Borland 6 version  
clock

This example demonstrates the basic use of the CHAI clock and timer functions.

Launch: MSVC7 version   MSVC6 version   Borland 6 version  
reflections

This example demonstrates the use of GLUT with CHAI, haptic interaction with a dynamic object, the use of CHAI's potential field class to generate non-mesh-based forces, and the use of environment mapping.

Launch: MSVC7 version   MSVC6 version   Borland 6 version  
earth

This example demonstrates the use of GLUT with CHAI and the use of CHAI's potential field class to generate non-mesh-based forces.

Launch: MSVC7 version   MSVC6 version   Borland 6 version  
nano world

This example demonstrates haptic interaction with a height map loaded from an image file.

Launch: Borland 6 version  
viewmesh

This is a command-line mesh loader, which demonstrates the use of GLUT with CHAI and the use of CHAI in a command-line application.

Launch: MSVC7 version   Cygwin version  
mesh-mesh collisions

This example demonstrates the extension of CHAI's collision-detection framework to detect mesh-mesh collisions.

Launch: MSVC7 version   MSVC6 version   Borland 6 version  
implicit functions

This example demonstrates the use of CHAI's potential field hierarchy to haptically render implicit functions.

Launch: MSVC7 version   MSVC6 version   Borland 6 version  
implicit functions

This example demonstrates the extension of CHAI's haptic proxy to support force shading.

Launch: MSVC7 version   MSVC6 version   Borland 6 version  


Written by Dan Morris, September 2005
Last updated by Chris Sewell, April 2007