Java Sketch

Confused? Read the Instructions.
(About Java Sketch, Quick Reference, Drawing Cubes, Constrained Motion, Known Bugs)

Your browser does not support Java. You will not be able to view this applet.

by Adam Doppelt, using a modified 3D visualization package by Chris Genly
(c) 1997, Brown University and the NSF Graphics and Visualization Center

based on "Sketch: An Interface for Sketching 3D Scenes"
(by B. Zeleznik, K. Herndon and J. Hughes), published in SIGGRAPH '96 (Aug. 1996)

Sketch is an ongoing research project at the Brown Graphics Group.



About Java Sketch

From the introdution to "Sketch: An Interface for Sketching 3D Scenes" (by B. Zeleznik, K. Herndon and J. Hughes), published in SIGGRAPH '96 (Aug. 1996):

Sketching communicates ideas rapidly through approximate visual images with low overhead (pencil and paper), no need for precision or specialized knowledge, and ease of low-level correction and revision. In contrast, most 3D computer modeling systems are good at generating arbitrary views of precise 3D models and support high-level editing and revision. The SKETCH application described in this paper attempts to combine the advantages of each in order to create an environment for rapidly conceptualizing and editing approximate 3D scenes. To achieve this, SKETCH uses simple non-photorealistic rendering and a purely gestural interface based on simplified line drawings of primitives that allows all operations to be specified within the 3D world.

The Java implementation was written by Adam Doppelt as part of CS224, using a modified 3D visualization package by Chris Genly.

Quick Reference

Drawing Cubes

  • new cube - draw three strokes on shape
  • delete cube - hit 'd', then click on cube
  • clear world - hit 'c' to clear all shapes
  • Camera Control

  • return home - hit <space>
  • trackball - ctrl-drag near edge of applet
  • zoom - ctrl-drag vertically in middle of applet
  • pan - ctrl-drag horizontally in middle of applet
  • Constrained Motion

  • move shape - shift-drag a cube
  • establish axis constraint - draw a stroke, then shift-drag a cube
  • establish planar constraint - draw two strokes, then shift-drag a cube
  • establish rotational constraint - draw a stroke on an object, then shift-drag a cube
  • Drawing Cubes

    The most basic gesture consists of three line segment strokes, axis-aligned with the three coordinate axes of the world, which all meet (more or less) at a single point. The cuboid constructed from this gesture has its dimensions determined by the strokes -- the projected length along each coordinate axis is the length of the stroke that corresponds to that axis. At right is an example -- the three strokes are drawn with arrowheads.

    The view of the world is a parallel projection. This means that the cuboid might be located at any distance from the camera and still have the same projected edge-lengths. Actual placement of the cuboid is therefore determined by a simple rule: a ray is traced from the camera through the most-important-vertex of the gesture (in the basic case, this is the vertex where the three strokes meet), and the first point of intersection of this ray with an object in the world determines the placement of that point of the cuboid. In the example at right, a ray through the most-important-vertex hits the ground plane, so the back lower left vertex is placed on the ground.

    Now suppose that a second cuboid is indicated by a new gesture (as shown at right). The ray traced through the most-important-point hits the top of the first cuboid, so the second cuboid is placed atop the first one. This new gesture shows a different way of specifying a cube -- one edge and two "dimensioning strokes." Both the "three-strokes-at-a-corner" and this "edge-and-two-dimensions" are supported for cube creation.

    Constrained Motion

    Shift-click-and-drag to move the object. Object motion supports constraints in the following sense: at any time, an object's motion may be constrained to a rotation about some axis, a translation in some plane, or translation along some axis. Moving an object will always follow one of these constraints.

    Constrained translation along an axis: The user must draw an axis-aligned stroke, then shift-drag an object roughly parallel to that axis. The object's motion will be constrained to move along that axis until another contraint is established.

    Constrained rotation about an axis: The user must draw an axis-aligned stroke on some object, then shift-drag an object roughly perpendicular to that axis. The object's motion will be constrained to rotate around that axis until another contraint is established. The initial stroke must be placed on an object, because rotation will occur around that specific segment.

    Constrained translation in a plane: The user must draw two axis-aligned strokes, then shift-drag an object. The object's motion will be constrained to move in that plane until another contraint is established.

    One more constraint applies: when an object is created, its location is determined by a ray intersecting some other object (which we'll call the parent ). When the parent of an object is moved, the object moves as well, as if they were "glued together."

    Known Bugs



    Last Modified Mar 18, 1997
    Back to
    Sketch project page.

    Adam Doppelt <amd@cs.brown.edu>