CSL Notebook Entry
ToFrom
CSLMaureen Stone, Eric Bier
 CSL
SubjectDate
Gargoyle November 11, 1985
Release asTargetFileName
Came from
 /cyan/gargoyle/Documentation/Gargoyle-CSLN.tioga
Last editedby Maureen Stone November 11, 1985 1:04:23 pm PST
AbstractThis is the first Gargoyle design CSL notebook entry. It describes the project goals and the current state. Further documentation is available through /Cyan/Gargoyle/Top/GargoyleDesign.df
Attributes informal, technical, Imaging, Illustrators
What is Gargoyle?
Gargoyle is to be a synthetic graphics illustrator in the tradition of Draw, Griffin (Xerox, PARC), Gremlin (U. C. Berkeley) and Unicorn (University of East Anglia) and MacDraw (Apple MacIntosh). An illustrator has come to mean any interactive program for making illustrations. We are interested in systems that allow a user to achieve graphic art quality results for journal illustrations, posters, slides and other forms of presentation graphics. A typical scenario involves a designer using an interactive workstation to design output for one or more digital printers.
To achieve our goal of high quality on a range of devices, each part of a Gargoyle design will be defined in a device independent manner, typically as an analytic outline. This is in contrast to "painting" systems, where the designer works directly with the pixels on a display. In Gargoyle design elements consist of regions bounded by lines and curves (such as cubic splines). A region can be colored with either a constant or a sampled color, following the model defined by Interpress. The user treats the regions as graphical objects that can be copied or transformed and that overlap in a defined and changeable priority order. All of the objects in a figure are assumed to belong to one image and lie on a single page. The actual size of the image is not limited except in a practical manner by the specific media on which it is displayed. The point is that we are not going to study pagination issues in Gargoyle. We are going to focus on the problem of creating a single, complex illustration.
We have a previous experiment in single page, device independent illustrators called Griffin [Griffin]. Griffin supports line and curve bounded areas, a primitive form of graphical style, and one-line captions in a limited number of rotations. Griffin was designed for the Alto environment and carefully crafted to match the imaging model of the printing format Press. Gargoyle will be a Cedar program designed to match the imaging model defined by the Cedar Imager and Research Interpress.
Taking Griffin as a starting point, Gargoyle will advance from it in several different areas. First, the objects themselves will be more complex and the relationship between the objects in a scene will be more complex. This will require a richer editing model. Second, Gargoyle will cooperate with other imaging tools in the Cedar environment such as Tioga. Third, Gargoyle will support graphical style. To work on these goals we tend to think of Gargoyle as a collection of experiments. These experiments can be grouped into the following areas: manipulating complex structured objects, integration, and graphical style. We intend for the aggregation of these experiments to be useful to Cedar users for producing slides and illustrations because we believe that only a user community can truely demonstrate effectiveness. Making a collection of experiments a useful tool is an experiment in itself.
Manipulating complex structured objects
A single object in Gargoyle is geometrically equivalent to an Interpress mask [Interpress]. Informally, masks are two dimensional shapes with complex boundaries and holes. A single shape is called an outline. Each closed loop in the outline is called a trajectory. Each trajectory is defined as a sequence of segments. Each segment is a straight line or curve, where the curves can be defined as circular arcs, conics or cubics. We want to support multi-level clustering of outlines to provide a method for combining simple shapes to produce complex ones. We have not yet decided whether to include both instancing and copying.
Given this object structure, the editing model for objects needs to support all the different segment types and a range of continuity constraints between segments. We would like to allow users to break trajectories at (nearly) arbitrary points and insert pieces of other trajectories. We would like to be able to easily select clusters, outlines, trajectories, segments and control points (or whatever mechanism we come up with for editing curves) in a manner that is reminiscent of the Tioga selection mechanism.
Gargoyle will employ intelligent dragging as the mechanism for controlling point and object placement. Intelligent dragging is the combination of the following three techniques: 1) a "gravity function" to snap a cursor to points and curves is of interest; 2) the "points and curves of interest" include not only the objects in a scene, but also points and curves which can be derived from these by a simple rule, e.g. "the circle of radius 25 centered on that vertex," or "the intersection point of those two curves;" 3) objects are translated, rotated, or scaled in a smooth motion coupled to the motion of the same cursor that snaps to points and curves. Hence all of the motions can be performed with precision without grids or global constraint systems. Intelligent dragging is designed to provide more precision than grids without the complexity and uncontrollability of global constraint systems.
We intend eventually to have special tools for creating objects with symmetry and other structure. We would like to include the full set of Boolean point set operations on outlines (e.g. union, intersection, and difference) for constructing shapes. We would like also to explore the use of curve-fitting algorithms [Plass and Stone] to experiment with a combined painting and construction model for defining shapes.
Integration
Gargoyle will be an open system with useful interfaces available to other Cedar programs. We intend to make it easy to generate Gargoyle objects from a Cedar program. Gargoyle graphical objects and segments will be Cedar programming objects to allow clients to easily extend the definition of Gargoyle shapes. A programming object is a record that contains pointers to data and to procedures that define the functionality of the object. This technique separates the functionality of the object from its implementation and allows run time creation of object classes.
For text editing, Gargoyle will attempt to leverage off Tioga as much as possible. As a minimum position, Gargoyle will interactively "paste-up" text from the Tioga formatter by using TiogaImager, which is a package that accepts as input a fragment of a Tioga document plus its style and produces a handle on a programming object that can be displayed through the Imager. Placement points for text will integrate with the shape editing point control mechanisms. Gargoyle style will support Tioga-like style for text and eventually for graphics.
Graphical Style
Graphical style describes a set of named formulas for rendering illustrations from their structure or "geometry" [Beach and Stone]. Work with Griffin, Tioga and TiogaArtwork convinces us that there is merit (and many hard problems) in trying to separate the basic "skeleton" of the figure from such issues as font, color and line weight. This separation provides a mechanism for ensuring consistancy across a number of related illustrations, gives a way to codify some esthetic decisions, such as the relationship between font, line weight and arrowheads, in a manner that can be used by the esthetically naive, and leads us to consider defining "meta-illustrations" that can be rendered for significantly different viewing environments simply by changing the style definition. These three issues can be demonstrated by considering the problem of illustrating a paper that is submitted to a conference. All the illustrations in the paper should look similar, so they should use the same set of properties defined as the style for that paper. If the conference is sponsored by the ACM, it would be appropriate to have an expert define a style that accurately encodes the ACM standards. Finally, since the author is also responsible for presenting the information in a talk, the same illustrations could be used to produce slides. The style for slides and the style for a proceedings are very different, but we can imagine designing a meta-illustration that can be rendered with two dramatically different styles, a bold, multi-colored "slide style" and an elegant, monochrome "proceedings style".
Gargoyle Status
The current Gargoyle implementation is principally the work of Eric Bier. The current system is available for experimentation by the hardy (see /Cyan/Gargoyle/Top/Gargoyle.df). Eric's goals are in the area of manipulating complex structured objects, specifically the problem of intelligent dragging, so this is the area that is most mature. The rest of this section discusses our progress on each of the four experiments.
Manipulating complex structured objects
A Gargoyle scene contains clusters of outlines. Outlines are built from trajectories and segments as above. There exist data structures and procedures for manipulating this hierarchy. GGModelTypes defines the data structures for Scene, Cluster, Outline, Traj, and Segment. GGObjects contain the current set of procedures for manipulating clusters, outlines, and trajectories. Once we understand the set of necessary operations, we would like to make the Cluster definition a Cedar programming object.
The Segment definition is currently a Cedar programming object. GGSegment contains the procedures for creating the segment classes that currently exist: Line, Arc, Conic, Cubic and CubicSpline. The class procedures for the Segment (from GGModelTypes) define the operations for manipulating Segments. The endpoints of a segment are called joints. A segment may have additional points associated with it called control points. A Bezier cubic, for example, is defined by two joints and two control points.
Intelligent dragging
As defined above, intelligent dragging combines a gravity function, dynamic alignment structures and smooth motion to provide simple, precise control while manipulating points and objects. In Gargoyle, the gravity function controls the placement of an alignment point called the caret. The caret is distinct from the cursor, which always follows mouse motion. During editing, the caret follows the cursor but is affected by gravity so that it sticks to trajectories and alignment structures. The strength of the gravity field can be controlled by the user.
Gargoyle supports points, lines and circles as dynamic alignment structures. To use alignment lines, the user indicates the slopes of interest and then selects one or more points as "hot". During editing, lines with the indicated slopes appear, radiating from the hot points. Gravity makes it easy to position points along these lines. To use alignment circles the user indicates the distances of interest and then proceeds as for alignment lines. To make geometric constructions easier, gravity can be made stronger at points of intersection.
Tioga-like selection
The features of Tioga selection we admire most are the point/extend paradigm for selecting sequences, multiple clicks to select hierarchies, and shift-select to perform copy operations.
In this spirit we want to use point/extend selection for sequences of points, segments, trajectories, outlines and clusters, plus we want to implement some form of shift-copy. Note that in a geometry editor we also need to use the mouse to insert points since there is no input method for arbitrary points that is equivalent to typing keys on the keyboard. For intelligent dragging, we also need to use the mouse to apply transformations. It is difficult to load all this functionality on the mouse without making the system difficult to learn. We don't believe we yet have the final solution here, but providing an intuitive and easily-learned interface is a goal.
The current TIP table uses all three mouse buttons four ways: unshifted, with the shift key down, with the control key down and with both shift and control keys down. The unshifted buttons are used for point/extend selections as in Tioga. The shifted buttons are used to insert points. Holding the control key down indicates a transition into transformation mode: left is translate, middle is rotate, right is scale. The transformations are performed on all selected points and objects. Control and shift first makes a copy and then performs the transformation. To perform the equivalent to Tioga's shift-select, you first make your selection, then use control-shift translate. While this is more complicated that the Tioga shift-select mechanism, it has the advantage that you do not need to duplicate all the selection mechanisms with shifted versions.
Editing model
Most editing involves using the mouse to add/move points and to transform objects. Additional features are supplied from a set of buttons and pull-down menus.
The editing model for segments lags behind the segment implementation. Lines are adequately controlled by their endpoints but curves need additional points to control their shape. At the moment these points are randomly supplied.
Integration
The Gargoyle implementation currently produces Interpress masters and will interpret Interpress to produce Gargoyle objects, one per mask operation. Producing an Interpress master from Gargoyle and reading it back in is not idempotent because an object that is outlined and filled will generate two Interpress mask operations which will then be interpreted to produce two Gargoyle objects. A more stylized use of Interpress could make it possible to correct this.
The object hierarchy data structures and procedures are exported to provide a programmers' interface for building Gargoyle objects.
Graphical Style
No work has been done here yet. Objects have color and line weight properties.
Useful illustrator
While Gargoyle is currently robust enough to play with, it is lacking several features that are necessary to make it useful as an illustrator. We believe the following are all necessary before we could call it a working illustrator:
Supress the appearance of joints in Interpress files (unless you're doing a paper on Gargoyle)
File format—you can work with Interpress or work with the session logs to start but eventually we need to design a completely new file format
Some sort of curve editor (random is cute, but not practical)
Ability to change the priority order
Text
Performance—acceptable now only for simple figures
Undo
Color
User interface: BiScrollers, Help, bug fixes.
Next Steps
Siggraph paper on intelligent dragging
The list under Useful Illustrator.
Implement the copy operations.
Implement the "known angle" and "fraction of distance" alignment classes to make Gargoyle a complete Level 2 intelligent dragging system (see the GG Siggraph paper draft for a definition of Level 2).
References
[Beach and Stone] Beach, R.J and Stone, M.C. "Graphical Style—Towards High Quality Illustrations." Computer Graphics, Vol. 17, No. 3, pp. 127-139, July 1983.
[Griffin] Stone, M.C and Pier, K. /Cyan/CedarChest6.0/Documentation/GriffinDoc.tioga.
[Interpress] Interpress Electronic Printing Standard, Version 3.0, draft available December 1985, to published January 1986. Cedar users can also look at the Imager, the InterpressTools and their documentation.
[Plass and Stone] Plass, M. and Stone, M.C. "Curve-fitting with Piecewise Parametric Cubics." Computer Graphics, Vol. 17, No. 3, pp. 229-239, July 1983.