The remaining subsections outline a technique by which CelLab can be used as a tool for professional graphic design. We provide you with two special utilities so that CelLab image processing can be inserted as an intermediate step between the creating of an image in AutoCAD or AutoSketch and the printing out of the image on a PostScript® printer. The subsections tell how to feed an AutoCAD or AutoSketch image to CelLab, and how to turn the resulting CelLab image into PostScript. Please write us as soon as you are able to sell a client an image created in this way; we'd like to have a record of such an historic first.
You can use these patterns "right out of the box," and you can also compose other patterns by loading them, storing them in the simulator's buffers, and then using the operations on bitmaps to perform logical operations to combine the patterns. Note that the arrow keys actually scroll the bitmap, not just the screen, so you can load a pattern, scroll it to where you want it on the screen, save it in a buffer, then load another pattern and combine it with the shifted pattern by performing a logical OR between the bit plane containing the second pattern and the buffer holding the shifted version of the first.
Since the scroll keys truncate material scrolling off the screen when used in open mode, you can crop patterns by flipping to open world mode with F3 (or with Alt-F8), scroll to delete unwanted material, then flip back to torus mode if that's the mode you'll be using for the simulation.
Specify plot size in millimeters? <N> N Maximum horizontal (X) plot size in inches <>: 320 Printer dots per inches in the horizontal (X) direction <>: 1 Maximum vertical (Y) plot size in inches <>: 200 Printer dots per inches in the vertical (Y) direction <>: 1 Output format, 0 to 2 <>: 0 Does the printer plotter support color? <> Y ...calibration...see below Enter the Size or Width,Height in Inches) <>: 320,200
If you use the default "calibration" for aspect ratio, squares in the AutoCAD drawing will be converted to rectangles taller than they are wide when mapped to the VGA or CGA bitmap (the distortion is usually more extreme on the CGA, depending on how the monitor is adjusted). You can calibrate the printer plotter driver to compensate for this. First use the default calibration and plot a square that just about fills the screen. Use PRPJCP to make a pattern from the plot and load it. Measure the pattern on the screen and enter the actual sizes. Use the actual height for both the vertical and horizontal desired heights. When you calibrate the driver, you'll need to re-enter the response to the:
Enter the Size or Width,Height in Inches) <>: 320,200
prompt as indicated. After you've calibrated the driver you will see some odd-looking numbers for the sizes if you later reconfigure. Don't worry, AutoJCD knows what it's doing.
Patterns are prepared as AutoCAD drawings. You may specify bitplane assignments by setting the AutoCAD color number to the binary value you wish to assign to the lower 4 bit planes.
Since AutoCAD printer plot files output only 4 bits of color information, only states 0 through 15 may be set using this program.
All other colors are taken modulo 16, with zeroes changed to 7s (not terribly useful, but that's how AutoCAD does it). You can also convert monochrome printer plot files, but such files may only be used to set bits in plane 0.
Use the PRPLOT command to generate a printer plot (.prp) file, then convert it to a CelLab pattern file with the command: PRPJCP plotname where plotname is the name of the AutoCAD-generated printer plot file, with no file type specified. PRPJCP reads the printer plot file and emits a CelLab pattern named plotname.jcp. The pattern files generated by PRPJCP are in uncompressed format. If you want to create a compressed pattern file from a printer plot, make an uncompressed file with PRPJCP, load that file into JC, then save it as a compressed file by pressing Ctrl-F4. The default pattern-save-mode of JC is compressed.
Select plotter: ... 3. Autodesk Device Interface Printer ... Plotter selection: 3 Select output format: 1. Binary file ... Output format 1 or 2 <2>: 1 Specify plot size in millimeters? <N>: N Maximum horizontal (X) plot size in inches <11.0>: 3.2 Printer dots per inch in horizontal (X) direction <100.00>: 100 Maximum vertical (Y) plot size in inches <8.50>: 2 Printer dots per inch in vertical (Y) direction <100.0>: 100 Does the printer support color? <N>: Y
Use AutoSketch to create the pattern, then make a plot of it by selecting Plot Area and entering 3.2 in the "X Plot Size" box and 2 in the "Y Plot Size" box. Select "OK", then move and scale the resulting plot box to enclose the material you want plotted. The size and shape of the plot box accurately reflects what you'll see on the screen in CelLab. You can assign CelLab state codes 1 through 7 to the standard AutoSketch colors by selecting "Pen Info" and assigning pen numbers equal to the desired state codes to the colors in your drawing. Finally, make a plot. This will write a .PRP file, on which you run PRPJCP. The resulting .JCP file may be loaded directly into CelLab.
If you have a PostScript printer, you can print patterns by converting them to PostScript with the JCPPS utility supplied with CelLab. PostScript files produced by JCPPS may also be included in many publishing systems, allowing inclusion of illustrations of CelLab screens in documents. To generate a PostScript representation of a pattern, first save the pattern into a .JCP file with Ctrl-F4. You can save the pattern in either compressed or uncompressed form. Exit CelLab to return to DOS, then enter the command:
jcpps [options] patfile
where patfile is the name of the pattern file you saved. JCPPS.EXE and your .JCP pattern file must be in the same directory. Don't specify the .JCP file type--it is added automatically by JCPPS, which places the PostScript output in a file with the same name but with file type .PS. You may send the PostScript to your printer or use it in other ways as with any PostScript file. JCPPS normally produces a PostScript image that prints in "landscape" mode: the horizontal edge of the screen is aligned with the long direction of the paper. This fills the page and provides higher resolution, but if you're including the image in a publishing system it results in the image standing on its end. To prevent this, specify the "-P" option to select "portrait" orientation; the image will appear at the bottom of the page with the bottom of the screen drawn along the short direction of the paper.
The output from JCPPS is by default a complete PostScript file including a header and showpage command to print the image. If you set the "-R" option JCPPS writes, instead, a "raw" PostScript file consisting only of the image operator that defines the pattern bit map.