Columns


CUG New Releases

ODMG-93, VGAMAZE, Coerce, and RFVDEMO

Victor R. Volkman


Victor R. Volkman received a BS in Computer Science from Michigan Technological University. He has been a frequent contributor to C/C++ Users Journal since 1987. He is currently employed as Senior Analyst at H.C.I,A. of Ann Arbor, Michigan. He can be reached by dial-in at the HAL 9000 BBS (313) 663-4173 or by Usenet mail to sysop@hal9k.com

New Acquisitions

CUG #419: An ODMG-93 Collection for UNIX

Dale Anderson (San Diego, CA) submits his first release of the collections specified by Object Database Management Group 93 (ODMG-93). This work is based on the publication The Object Database Standard: ODMG-93 (ISBN 1-55860-302-6). Although Anderson has no personal affiliation with the ODMG, his work nevertheless significantly furthers the ODMG conceptual model's propagation. Anderson's release contains collection classes, man pages for each method, and a test suite for almost all methods. The code itself has been tested on an HP/UX 9.0 C++ compiler and GNU C++ on the HP/UX platform. Anderson's ODMG-93 implementation for UNIX (as released on 03/02/94) is immediately available as CUG volume #419.

This implementation does not include a mechanism for persistent objects. Anderson designed his collection to be the "front end" of the specification so that software developed with it today can easily integrate with an object-oriented database (OODB) in the future. Since the ODMG-93 specification intends to be independent of OODB implementations, no back-end database will appear in this implementation. Also, this implementation does not include an SQL parser, though one may eventually be released.

Anderson's short-term goal is to develop a working model of the ODMG-93 class library that is as near 100% compliance as possible. This model then becomes a tool to compare and contrast with the written specification and to experiment with alternatives that can then be proposed to the ODMG-93 working group. Over the long term, Anderson hopes to continue to track with extensions of the ODMG model as they occur.

This software fits the description in the U.S. Copyright Act of a "United States Government Work" — it cannot be copyrighted. This software is freely available to the public for use without a copyright notice, and there are no restrictions on its use, now or subsequently.

CUG #420: VGAMAZE and Coerce

CUG volume #420 includes two graphics tools with source code in C++. VGAMAZE is designed specifically for use with MS-DOS. Coerce is designed for use with UNIX workstations, such as Sun. A single diskette volume includes both programs as described below.

CUG #420A: VGAMAZE in 3-D

James L. Dean (New Orleans, LA) contributes his VGAMAZE tools written for MS-DOS VGA graphics with the Borland C++ 3.0 compiler. VGAMAZE displays mazes with square (SQRMAZE.CPP) or hexagonal rooms (HEXMAZE.CPP)in three dimensions on your monitor. VGAMAZE includes a template for one dimensional virtual arrays. A plotting class can plot any surface z=f(x,y). An example program for surfaces (SPIKE.CPP) demonstrates that its good for more than just mazes. The CUG Library distribution includes all C++ source code and executables for SQRMAZE, HEXMAZE, and SPIKE.

When you start a maze program, it will prompt you for a random number seed of eight or less characters. (Usually, a different random number seed will produce a different maze.) After the maze is displayed, press S to see the solution. Figure 1 shows a square maze fully generated, but before the solution is overlaid. You can then press any key to exit. To run VGAMAZE you will need a VGA (or SVGA) graphics card, a VGA monitor, and about 2 MB of expanded memory or disk space (for virtual memory).

VGAMAZE supports only the large memory model. Also, VGA3D.CPP uses Borland's GRAPHICS.LIB, so you must link this library file in with any program you create. See the Borland documentation on the utilities BINOBJ and TLIB for information on including EGAVGA.BGI in GRAPHICS.LIB.

Be advised that VGAMAZE performs an extreme amount of floating-point arithmetic and probably should not be run without a math coprocessor. On my Cyrix 80486DLC 40 Mhz machine (without math coprocessor) I waited 28 minutes for VGAMAZE to complete its work.

For HEXMAZE, do not optimize invariant code motion if you optimize common subexpressions; a bug in Borland C++ 3.0 causes incorrect code to be generated.

VGAMAZE version 4 (as released on 02/27/94) is immediately available as CUG Library volume #420A.

CUG #420B: Coerce Graphics File Converter for UNIX

Tatsurou Sekiguchi (Department of Information Science, University of Tokyo, Japan) submits his Coerce program which can convert between many graphics file formats popular on BBSs in Japan. Specifically, it converts from one of MAG, PI, PIC, MAKI, PPM, PBM, ML1, and beta formats to one of MAG, PI, PIC, PPM, and beta formats. Coerce compiles on any Sun workstation running SunOs 4.1.3 with GNU C++ 2.4.5 or later. Others have reported good success compiling Coerce on MIPS and RS/6000 machines. Sekiguchi also includes source for a simple X-Window bitmap viewer.

Coerce is a synthesis of converters, so it can be used as an alternative to each individual converter. For instance, in order to convert MAG format to PIC format, type

   % coerce -mag +pic foo.mag
Options of coerce:

-{mag, pi , pic,maki,ppm,pbm,ml1,beta} — Specify the format of input images.

+{mag, pi,pic,ppm, beta} — Specify the format of output images.

-notadjust — Prevents adjustment of the pixel aspect ratio for PIC format images.

-stdin — Indicates that an input image is read from standard input.

-stdout — Indicates that the result is to be sent to standard output.

-o [name] — Specifies the output file name.

-quiet — Prevents messages from being written.

Coerce includes part of the source files from PiFM vet 0.16, which was written by Takashi Nawashiro. Sekiguchi has obtained permission to use and redistribute these source files. He also waives the copyright on Coerce. You may use/modify/redistribute this package freely, even for commercial purposes. You can reach him via the Internet at cocoa@is. s. u-tokyo. ac.jp.

Sekiguchi welcomes ports to other environments and other machines as well as efforts to incorporate new facilities to save/load additional format types. (There is already a patch for xv which enables it to load MAG and PIC format images. It is an interesting attempt to combine Coerce with xv.)

Coerce (as released on 02/24/94) is immediately available as CUG Library volume #420B.

CUG #421: RFV VGA Graphics Demo

Thomas Hagen (Trondheim, Norway) contributes his RFVDEMO collection of high-speed VGA animation demonstrations for MS-DOS. These animations require the Borland C++ 3.1 compiler. RFVDEMO includes four main animation demonstrations: bitmap-rotation routine, fractal zoomer, plasma, and a voxelspace routine. This volume also includes lower-level support routines for keyboard handling, a timer class, and others.

I was particularly impressed with the speed of these demonstrations on my Cyrix 80486DLC 40 Mhz machine (without math coprocessor). The bitmap rotation appeared seamless without flicker, The fractal zoomer showed the Mandelbrot set at a breathtaking speed — faster than some fractal videotaped productions I've seen. An included utility called MAKEFRAC lets you design your own fractal animation sequences. The plasma literally oozes and flows across your screen (see Figure 2) , Last, the voxelspace demo uses shading and perspective to give you a real-time flyby over imaginary terrain.

RFVDEMO requires an 80386 or better CPU (486 recommended) and a register-level-compatible VGA card. If you want to run the MAKEFRAC designer, you'll need a 1 MB SVGA. The programs require fairly heavy chunks of MS-DOS conventional memory, from 500 to 600 KB.

Hagen mentions that he has kept documentation to its bare minimum. He writes: "The one thing you won't find, though, is verbose comments. You're pretty much on your own here!" Licensing is equally informal since the source code has been released into the public domain. Hagen asks only for a postcard if you find the source code useful. He may be contacted at Elvegata 16, N-7013 Trondhiem, Norway. e-mail: thomas@edb. tih. no.

RFVDEMO version 0.1 (as released on 01/17/94) is immediately available in a three disk set as CUG volume #422.