Classic Computer Magazine Archive ST-Log ISSUE 21 / JULY 1988 / PAGE 86



CAD-3D 2.0 by Tom Hudson

CYBERMATE by Mark Kimball 2-disk set (requires one megabyte RAM) $89.95


by LC Technologies
Add-on glasses only: $99.95


For CAD-3D 2.0
by Tom Hudson

All products marketed by:

The Catalog
524 Second Street
San Francisco, CA 94107
Orders: (800) 443-0100
Customer Service: (415) 957-0886

Review by Andy Eddy and Charles F. Johnson

Since their introduction, computers have been touted as omnipotent tools, with the power to increase productivity while liberating human beings from the tedium of repetitious tasks. The latest 68000-based personal computers—among them, the Atari ST—promise to bring the number-crunching strength of the $40,000 workstation to the common man. All that's left is for programmers to create applications that will utilize that muscle for practical, real-world purposes.

One of the more powerful facets of computer usage these days is Computer-Aided Design (CAD). CAD software offers a way to design and visualize objects before money is spent—and perhaps wasted—on creating the final product. Furthermore, the capable ST makes an inexpensive station for CAD duties.

Tom Hudson's original CAD-3D has been enhanced and streamlined for efficiency to provide more than just simple three-view drawings. At the same time, many "bells and whistles" have been added to Stereo CAD-3D 2.0, making it even easier to design objects, letting the user build complex groups of CAD-3D objects through the use of standard camera movements (zooms and rotations, for example) and object manipulations. It also bears the distinction of being the first ST product that requires one megabyte of RAM to operate.

By far the most exciting addition is animation through frame-by-frame recording to disk (we'll discuss the details shortly). To assist in that goal, The Catalog provides an animation editing language called Cybermate with CAD-3D 2.0. The combined package is named Cyber Studio.

The Cybermate language was created by Mark Kimball, who was primarily involved in the StereoTek project at Tektronix. The StereoTek glasses are a new approach to 3D; instead of traditional red and green lenses, these glasses contain liquid crystal shutters that alternately open and close in tight synchronization with the ST monitor's screen refresh rate. The program alternates between two different screens at the same rate, so fast that only a slight flickering is noticeable. A View-Master effect is achieved because each eye sees a separate image from a slightly different perspective. CAD-3D 2.0 and Cyber-mate both support the StereoTek glasses, so entire 3D animations can be created.

Put Away Your Hammer And Nails. . .

Comparing the new program with its predecessor, CAD 2.0 (as we'll refer to it from here on) primarily has a refined user interface. The new package is icon-driven; anything you need can be achieved by sliding the mouse pointer to a specific icon and clicking. This differs from CAD 1.0 (still available by itself), which works entirely from drop-down menus.

Beyond that, the scope of the package is immense. For starters, one of the icons contains a bank of "primitives," basic shapes like spheres, cubes and wedges that can be used as building blocks to create more intricate shapes. And you can easily create your own set of primitives with two included utilities.

The "Spin" routine is used for lathing symmetrical objects—such as a wine glass or light bulb—from an outline. Once this "template" is completed, clicking on the "Do spin" line from the drop-down menu magically carves out the item and places it in your viewing windows. You can also do partial spins of whatever percentage or number of degrees you choose, to bring about more intricate shapes.

The other object-sculpturing tool is the "Extrude" routine, which works like a hot knife to cut non-symmetrical pieces. Placing the points of the object's perimeter on the template and clicking on "Do extrude" will similarly result in a 3D object.

These two easy-to-use routines give great control over the items you work with. Though you can use an overlaid grid for precision plotting, it's difficult to make rounded edges. You must click the mouse exactly on each point of the arc; freehand drawing of circles and arcs is close to impossible. Some companies are distributing ST-compatible graphics tablets that should help with object creation.

A promising and less expensive alternative is a separate program (currently in the works and possibly out by the time you read this) that will allow you to create CAD-3D objects from DEGAS picture files. Many of the necessary tools for making cleaner curves and, more importantly, editing oddball shapes are inherently designed into DEGAS, whereas attempting those tasks with either of the Spin or Extrude routines will likely result in a struggle. If this product fulfills its promise, it could present a library of animation characters—such as digitized acquisitions—and enable quality computer "movies."

Stepping beyond the basics, complex creations can be constructed by taking multiple objects and combining them mathematically. Four interactions—Adding ("gluing" together), Subtracting (cutting the overlap of one object from another), And (making a separate item from the overlap area of two objects), or Stamping (to emboss a "decal" of one object's impression, like letters on an airplane wing)—can be called by the "Join" icon, giving you the ability to make intricate models from simpler, building block shapes.

You're not limited to just making objects, either. Once you've constructed an object, CAD 2.0 frees you to alter parameters that control any part of object viewing. The resultant images can be viewed in four modes—Wireframe, Solid, Hidden Line Removed (a combination of Solid and Wireframe), or Solid Outline (a Solid shape with highlighted edges)—and even particulars like lighting (strength and locations) and coloring (both object and background) can be varied to suit your needs. Additionally, you can use a DEGAS picture as a backdrop for further ambience and artistic effect.

To view the scene as a full-screen depiction, a click on the "Superview" icon will display whatever is in the camera view, which can be saved to disk in your choice of DEGAS, NEO or C.O.L.R. file formats. Double-clicking the Superview icon brings up a dialog box for setting up the viewing mode (listed previously), in mono or stereo, or in draft or final version. The latter gives a more accurately calculated picture, less likely to contain errors of perspective. For stereo viewing, you can also control what percentage of deviation exists between the left and right images, and where the image appears "in" the monitor, "outside" the monitor, or "at center" (at the screen face).

You also have your choice of four viewing windows: Camera, Top or Bottom, Front or Back, and Right or Left (with the opposite windows capable of being toggled with each other). Your viewpoint can be varied by moving the camera angle or zoom, and the object(s) can be moved within any active window (excluding the Camera window, which is only for "sightseeing") by dragging it with the mouse. Incidentally, any window can be set to fill half the screen for better control over the adjustment and refinement of the object.

Additional tools are available to manipulate objects within the CAD 2.0 "universe"—the cube-shaped world that your objects inhabit. There are icons for moving, rotating and sizing; including group or single object rotation; rotation around the universe's center point, a group's center point or user-specified point; and camera rotation and banking.

For any CAD program to work in a professional capacity, it needs to be able to identify scale and establish its accuracy. Precision scaling of objects is amply provided for in CAD 2.0 by labelling one of your objects as the "master" and using it as a reference in sizing any other objects.

Lights, Camera, Action. . .

Now we get to the exciting part: making your designs come to life. It's accomplished by clicking on the "film-strip" icon to activate the animation recorder, then moving the objects in the windows or shifting the camera perspective, and recording those changes one-by-one (by clicking on the record icon) to save the "frame" to disk. It's that simple. The final results can be run as a stand-alone "movie," without the need for the CyberStudio disk, by using the included public-domain ANIMATE2.PRG file (available in the Databases of Analog's ST SIG on Delphi).

It's important to note that products like the Future Design Disk and the Fonts, Primitives, Hints and Tips Disk are being released to give users additional components and tools for working with CAD-3D. With expansion in mind, Hudson made CAD 2.0 the first module of a potentially larger "Cyber"system.

GEM contains built-in commands that enable programs running on the ST to communicate with each other, using a structure called a "message pipe." In this way, an accessory and a running application may exchange information—in fact, it's possible for the accessory to take complete control of the application (assuming the programs are written to work together, of course). This is the principle behind the pipeline; it allows programmers to write accessories that can greatly extend CAD-3D's capacities. To further this end, The Catalog has released the 3D Developer's Disk, which contains several practical programming examples of how to access the pipeline, and complete documentation on all the message protocols supported by CAD 2.0.

The manuals for the 3D Developer's Disk and Cybermate are provided in the form of text files on disk that you must print out yourself. . .a not-too-minor inconvenience, since these files produce over 70 pages of hardcopy each. The files are formatted for a standard 8 ½&inch; by 11&inch; page, but you have to make sure your printhead is set exactly at the perforation line before you start printing, or the headers and footers will be incorrectly aligned. A large portion of the text in the 3D Developer's Disk documentation was published previously in STart magazine, Summer 1987.

The CYBSMASH and PD3DCTL accessories (see below) are examples of what can be achieved by using the message pipeline. Just about every function of CAD-3D 2.0 can be remotely controlled; hopefully, programmers will begin using this ability to add features to CAD-3D, like real-time machine language object rotation routines, or better compression routines for animation files.

The first example—and Hudson's acknowledged testbed—of this potential is the PD3DCTL desk accessory. It's a strange name for a powerful tool, but here's how the name breaks down: PD stands for Public Domain; 3D refers to the CAD program; CTL is an acronym for Control.

To summarize, PD3DCTL (which is also available in the ST SIG on Delphi) is a freeware taste of the forthcoming Cyber Control language; the aim being automation of the animation sequence. Visualizing the tedium of the above situation (recording a frame, moving the objects or camera a tiny bit, recording the frame, etc.), you can see how beneficial it would be to have the computer handle those tasks. After all, as we mentioned at the top of the article, this is the strongest feature of computers.

With PD3DCTL/Cyber Control, you can write a BASIC-like script file using a simple programming language to take control of CAD 2.0's desktop and the animation sequence. It can take hours to build an animation by hand; running things from your command script can save a lot of time and free you to do other things. It's a powerful tool with loops, variables and functions, resulting in an "Automated Animation Construction Set."

To show Cyber Control's strength, they've also added some features not programmed into CAD-3D, such as remote cameras; at present, the only camera in CAD 2.0 is always facing the center of the CAD universe, a hindrance to certain effects in an animation. The remote camera could be placed anywhere in the CAD 2.0 "universe," flying around and even through objects.

The Cybermate Language.

Included in every CAD 2.0 package is Cybermate, an "object-oriented" programming language very similar to Forth (in fact, supposedly based on MT Forth), which gives you the ability to manipulate the "delta" animation files created by CAD 2.0. "Delta Compression" is the data-compaction scheme used by CAD 2.0 to keep the size of animation files within manageable limits by saving only the frame-to-frame changes, instead of saving an entire 32K screen for each animation frame.

Cybermate allows you to control and alter many aspects of these delta files—cutting frames in and out of sequences (similar to "splicing" film or video tape), stepping through an animation sequence, changing its speed or screen location, setting loop points, chaining to other delta files (to get around memory limitations and allow much larger animation sequences), pixel-by-pixel dissolves from one "scene" to the next, and more. Cybermate also allows you to include files generated by The Catalog's G.I.S.T. sound editor program, to spice up your mini-movies with appropriate sound effects.

The Forth Connection.

Cybermate's familial relationship with Forth is both a strength and a weakness. Although Forth has many advocates, a case could be made that it is not the easiest or most intuitive language for people to learn. As in Forth, all Cybermate math operations are performed using Reverse Polish Notation; to add two and three the Cybermate statement would be "2 3 + ," not the way most people are accustomed to thinking about math. Cybermate programs are organized into one or more 16-line "screens," another Forth convention. To edit "Cybercode," you must load each screen individually, edit the text it contains, and save it to disk before editing another screen; you can have only one screen's worth of code in memory at any one time. This procedure is rather clumsy, especially for casual programmers accustomed to the full-screen editors used by most implementations of BASIC. We strongly suggest the use of a RAM disk or a hard disk while editing Cybercode—otherwise the constant disk accesses will have you in the rubber room in short order.

On the other hand, Forth is generally recognized as a good language for motion control applications, which makes it particularly well-suited for animation editing on the ST. The "screen" editing concept (although inconvenient at times) has the advantage of freeing up lots of memory for animation objects, which are usually quite large. Forth is a "user-extensible" language; this means that you can develop routines (called "words") for general purposes and actually make them part of the language—like adding your own commands. Also, since Forth/ Cybermate is a compiled language, it's possible to produce a .PRG (or "runtime") version of an animation that can be run as a stand-alone file, without the need for Cybermate or any special display program.

The Cybermate language system has four primary modes of operation: Interpreter, Text Editor, Preview Editor, and Display. Interpreter mode acts much like BASIC'S "direct" mode. You can type in any legal Cybermate command and it will be acted upon immediately. Text edit mode lets you create and edit screens of Cybercode, which will comprise your animation program. The Text Editor has many word processor-like features, including cut-and-paste and Insert/Replace text entry modes. The Preview Editor displays your animation frame-by-frame, snowing you the current time values and color settings and allowing you to alter them. Preview Edit mode is useful for determining exact timing of animation sequences, without having to edit a screen and re-compile it. Display mode is entered when you "run" a Cybermate program.

Cybermate is referred to as "object-oriented" because of the way it handles animation data files; when a file is loaded, Cybermate creates an internal structure called an "object" using the data in that file. You give each object a unique name, and refer to the object by that name for all programming/editing operations. Objects can be of three basic types: sound effect files produced by G.I.S.T., uncompressed picture files created by the DEGAS paint program, or sequence files created by CAD 2.0's record function. Once an object is defined in this way, it can be "cloned" to make a copy for working purposes. These are the main building blocks of a Cybermate animation.

Like most computer languages, Cybermate has variables, looping structures, and data areas. A typical Cybermate program might display the first frame of an animation sequence, then enter a "TICK/TOCK" loop, which would update the screen image according to Cybermate's internal clock. The clock regulating the execution of a TICK/TOCK loop can be adjusted to any value, to achieve faster or slower animation speeds. A TICK/TOCK loop is similar to a FOR/NEXT loop in BASIC; all code between the TICK and TOCK statements is executed at regular intervals, until the last frame in a sequence is detected or the loop is exited by other means.

Cybermate also supports some traditional Forth looping structures, like DO/LOOP, and BEGIN/UNTIL/REPEAT, and decisional structures like IF/THEN. A full range of logical and bitwise operators is available for integer math functions.

If you have no experience with Forth, be prepared to spend a good deal of time puzzling over the Cybercode examples contained in the CAD-3D package. At the end of the Cybermate manual is a short appendix titled "Generic Forth" which will help a little bit, but the manual is not intended to teach Forth. Instead, it recommends several books devoted to this purpose, including Starting Forth by Leo Brodie (arguably the "forth programmer's Bible"). The manual does contain a well-written tutorial that walks you through the main functions of Cybermate, using 3D objects which you create when you go through the main CAD 2.0 tutorial.

The Cyber-verdict.

Cybermate works well as a whole, although a few annoying quirks are evident. You must be in low resolution to run Cybermate...yet, the program starts up with a medium resolution 80-column text screen. Since the program obviously handles resolution changes itself anyway, why not let the user load Cybermate in either resolution? At the time of this writing, there is no support for monochrome, even though CAD 2.0 can generate monochrome DELTA files. (Note: According to Catalog Marketing Director Gary Yost, monochrome monitor support is planned for Cybermate, and a version that works in monochrome may even be released by the time you read this.) Also, the interpreter mode's keyboard input has an odd, somewhat disconcerting feature; the backspace key does not delete characters, it just moves the cursor backwards, leaving the text intact.

It's important to note that Cybermate is probably not for everyone. Indeed, the manual states that "Cybermate is NOT the place to start in the Cyber Studio system." A comprehensive understanding of CAD 2.0 is essential before you can begin to tackle Cybermate; and even then you've got some work ahead of you. A background in some sort of programming will definitely help; a background in Forth would be even better. However, if you make the effort to climb Cybermate's rather steep learning curve, you'll find yourself in possession of a very impressive set of animation editing tools.

The Wrap-up.

This package is typically Hudson-esque—our term for the type of carefully-written, easily-worked software for which Tom is well-known. If the communications pipeline is imaginatively exploited, we may see Atari ST computers gaining more respect.