BBK Artist

BBK Artist Main Screen

by: Bryan Schappel and Barry Kolbe

Publication date: July/August 1987

Download the executable (10,466 bytes).
Source code will be posted in the future.

By now most everyone has heard of ANTICS mode $0E. This is commonly referred to as mode 7+. In this display mode, you can make four color pictures with a screen resolution of 160x192. Granted, this is no ST, but you can make some pretty intricate drawings in this mode. (Just look at Alternate Reality sometime.)

Now, unless you have an XL or XE, you can't access this mode directly from BASIC. And who would want to make a work of art with a program of PLOT and DRAWTO statements? This is where the BBK Artist comes in.

Fondly known as BKA, this program contains a menu screen with twenty-five commands, twenty-one of which are used to help create computer art. You can load in a screen previously created with MicroIllustrator, MicroPainter or Magniprint. You can create boxes, lines, circles/ellipses, rays, plot text on the screen in any character set you design (in any size you desire), and touch up your painting with our "Enlarge" mode. This is a feature-packed offering. Let's continue!

The entire program is joystick operated, using as little keyboard input as possible. Just move the cursor over the option you want and press the button. What could be simpler?

Typing it in.
Listing 1 is the BASIC data used to create the BBKART. COM file on your disk. Please refer to the M/L Editor for instructions on keying in the data. Once the typing has been done, refer to your DOS manual for instructions on loading a binary file. You must have the BASIC cartridge disabled to allow BKA to function properly. (On XL or XE computers, press and hold down the OPTION key while booting your system.)

As soon as you binary load the BBKART.COM file, you're ready to go!

You're presented first with the main menu of the program. To select a command, just move the cursor over the option you want and press the fire button.

The drawing commands.

Draw mode (Draw).
This simply allows you to perform "freehand" drawing, in your current brush and fill pattern. You can roam freely about the screen by moving the stick in the direction desired. To draw, simply hold the fire button down and move the stick.

The following commands are what are known as "Rubberband" mode commands. In this mode, you must first move the cursor to the screen position at which you want an endpoint (in the case of circles/ellipses, it's the center) and press fire. Then the image you are working with can be expanded or contracted on-screen without destroying the already formed underlying graphics. When the image is what you want, press fire again to make it permenant.

A note of caution: if you don't want a line to appear where you're currently drawing one, press OPTION. The command will abort, and you'll return to the main menu - no harm done. Once a rubberband object is made "solid" it can't be undone.

Lines (Line).
Using the stick, you will move a rubberband line around on the screen. The final line is drawn from the starting point to the current cursor position. When the line is just right, press fire to make it permanent.

Circles/Ellipses (Circle).
After selecting the center position for a circle/ellipse, the crosshairs you've been seeing will disappear. Move the stick to expand the size of the ellipse. After you've made the ellipse solid, the cursor reappears at the middle of the screen.

Boxes (Box).
This will create a rubberband box. Select the position of one corner of the box and move the stick. The box can be stretched in any direction, and pressing fire makes it permanent.

Rubberband Rays (Rays).
Rays are almost the same as Lines, except that they all share the same starting point. This function is useful in producing a circular starburst. Just press OPTION to return to the main menu.

Screen enlargement.

Enlarge or Magnify (Nlarge).
This is one of the nicer commands in the BKA. It allows you to view and change your work on a screen, with each pixel blown up to a graphics-0-size character. The screen is divided into two sections. The top contains an actual-size view of what's currently blown up on the bottom of the screen.

You're free to move the cursor anywhere onscreen and draw just as you did in the Draw mode. But, when you push on one of the screen's edges, the screen will scroll. You may think of Nlarge as being a window made of a magnifying glass that you can move over your picture.

Naturally, the real-size view of your picture scrolls also, but as you move from the left to the right of your picture, the real-size window will jump along the top of the screen, giving you a relative "feel" for where you are along the X-axis of your picture. When you enter this mode, you're in the upper left corner of your picture.

Putting text on your screens.

The text commands are quite powerful. They allow you put text on your screens, in any fill pattern, in any size, in any font, anywhere!

Text Parameters (Parms).
This allows you to set the parameters for the textplotting routines. First, you type in your text, twenty characters maximum; all characters are acceptable, except DELETE and RETURN. Next, you select the rotation of the text. Move the stick in the direction you want the text to be drawn, and hit fire. Finally, use the stick to determine the height and width of each plotted character. These numbers can be set between 4 and 99. After this, you're returned to the main menu.

Plot text (Text).
Using this command, you can plot the message defined with Parms. Move the cursor to the location where you want the lower left-hand corner of the first character to be, then press fire. The text will be drawn in your current fill pattern - and only the character will be plotted, thus leaving the background intact. Because of this feature, it's quite easy to produce special effects, such as shadowed text.

To shadow text, make a large box filled with a light color, then plot the message in black. Next, select a different color (say, red) and plot the text slightly to the upper right of the black text. You have shadowed text - instantly. Look out, DEGAS!

Hint #1. At the bottom of the draw screen is a line that tells you the X,Y-coordinates of the cursor, the pattern number you're working with and which reflection mode you're in. When you plot the black text, write down the X,Y-coordinates, then use these numbers as a reference for plotting the next layer of text.

HINT #2. To center or block right text, all you need is a calculator. Take the length of your string and multiply it by the width of your characters; this yields exactly how long the plotted string will be. Now subtract this number from 159. To center the text, divide the remainder by 2. Now, just move the cursor to the calculated X-coordinate and hit fire. Bing!, centered text. To block the text to the right, you just don't divide by 2. Use the same procedure to center text vertically multiply by the height and subtract from 191.

Load a new font (Font).
This lets you load in any 1024-byte character set. (These sets can be designed using issue 16's Create-A-Font or one of the COMPUTE! editors.) The program will give you a directory of all the files on the disk with a .FNT extension. To load a font (or any file) into BKA, follow the instructions in the next section.

Loading files.

The load screen is composed of two parts: the directory screen and the load menu. First, get the file you want to load on the directory screen, by using the "More" option of the menu. When the name's on screen, select the "Load" option from the menu. At this point, the first filename in the directory screen is highlighted; you may move this "cursor" to the filename you want to load, by using the joystick. When the name of the file to be loaded is highlighted, just press fire. The load will commence, and you'll be returned to the main menu.

If the file you want to load isn't on this particular disk, select the "Exit" option to return to the main menu.
If you selected Load by accident, there are two ways to abort: (1) press OPTION; and (2) move the cursor either to a blank line or to the "Free Sectors" line, and hit fire.

Filling screen areas.

Fill (Fill).
When you select Fill, you enter the drawing screen. Move the cursor to any point within the area you want to fill and hit fire. The program will begin to fill over the area you selected. The fill routine is good at going around corners and finding "leaks" in your drawing. However, you may run into a few problems.

Problem #1. If you try to fill an entirely blank screen from the center, the fill will start to expand; then suddenly stop. This is because the routine ran into too many "critical points." To continue the fill, move the cursor to another blank portion and hit fire again. Another way around this problem is to start the fill from a corner.

Problem #2. If the fill pattern you're using contains one of the colors you're filling over, the fill may also stop. (This usually occurs when your fill pattern is striped.) Again, to solve this problem, start the fill elsewhere.

Problem #3. You'll find it impossible to fill over a fill pattern. This is because the BKA fills over any color until it hits another color. At best, you will plot one point this way.

Choosing a Fill Pattern/Texture (Txture).
BKA contains seventeen fill patterns: four solid colors, twelve quilts and one user-definable pattern. When the Txture box is clicked, the main menu dims and a wedgeshaped cursor at the bottom of the screen lights up. Move this cursor over the pattern you want to use and press fire. You'll be returned to the main menu.

Defining a Texture (DefTxt).
This lets you define your own fill pattern. The user-defined pattern is to the far right of the screen (its default is vertical blue bars). After clicking this box, you're asked to enter the pattern data. Type four numbers (0 through 3) and hit RETURN. If all goes well, the user pattern is redefined on the menu screen. The four numbers are the color registers used to plot the pattern.

Here's an example: at the prompt, type 1122. When you return to the screen, the last pattern will be made of alternating yellow and green horizontal stripes. To make the stripes vertical, you would enter 1212. To make it a yellow and green quilt, type 1221. Experiment a little.

Setting reflection modes.

Toggle Horizontal Reflection (Horz).
When you click on this box, a small arrow appears next to "Horz," indicating that this reflection mode is on. It reflects each point plotted about the Y-axis. All of the reflection modes work with text, lines, circles, etc.

To turn off a reflection mode, click it again or select another reflection mode.

Toggle Vertical Reflection (Vert).
Selecting this mode reflects each pixel written to the screen about the X-axis. This gives interesting effects. Text is plotted as a mirror image, looking much like the reflection of trees in a lake. Try it.

Toggle Fourway Reflection (Four).
This mode reflects every point into each of the four quadrants of the screen. When used with text, you get undesirable results. Try it to find out why.


Selecting a Brush (Brush).
BKA contains eight different "brushes" you can paint with. When you click this box, the brush line will light up. Move the black cursor until it's over the brush you want, and press fire. You'll return to the main menu.

Changing a color (SetClr).
There are two steps to changing a color. First, you must choose a register to change, by moving the cursor over the "Color #" and pressing fire. Now, move the stick up or down to change luminance, and right or left to change hue. Press the fire button when the color you want is reached.

Erasing your work (Erase).
When you click this, you're transferred to another screen that asks if you're sure. If you click the yes half of the prompt, your picture is erased. Otherwise, nothing happens.

Oops (Undo).
You accidentally said yes to an erase, or you filled something you shouldn't have. Well, just Undo it. When you click this, your last action is undone. There's one exception, of course. Any rubberband object, once made solid, can't be undone. If you don't like a rubberband object, press OPTION to abort.

Let's take a look (View).
This lets you look at your beautiful art. It's used to see what an Undo did - if you don't like the picture after the Undo, simply Undo it. To return to the menu, press the fire button again.

Rainbow effects (Rainbw).
This will "rainbow" the last changed color register, in all 256 glorious colors. If you haven't changed a color, Rainbow will work on the background color. To Rainbow another color, use SetColor to select a color register, and hit fire twice.

Picture I/O.

Saving your work (Save).
All you do here is supply a name and hit RETURN. The picture will be saved in compacted MicroIllustrator format with a PIC extension. Be careful: you aren't asked if you want to replace a file that already exists on the disk.

Loading a MicroIllustrator picture (Koala).
This will give you a directory of all the files on the disk with a .PlC extension. Follow the instructions under Font to load a file. You use this command to load a file saved with BKA, too.

Loading a MicroPainter picture (Micro).
This works the same way Koala does, except you get a directory of all files with a .MIC extension.

Loading a Magniprint picture (Magni).
This option was put in for a friend of mine (it also fills the menu), but it lets you load a picture from a Magniprint disk - or any graphics 7+ or 8 picture saved from BASIC with the SCSAVE.LST file on the Magniprint disk. An extension of .MP is used for Magniprint files.

That sums up the commands... Let's take some notes.

Words to the wise.

Note 1. It would be a good idea to type in the Picture Storage Techniques program from ANALOG Computing's issue 50. This allows you to use pictures generated with BKA in your own programs.

Note. 2. When you're in any drawing mode, you can use the arrow keys to finely move the cursor to a specific screen position. This affords you maximum control over the cursor, though it is slow.

Note 3. When drawing on the screen, press SELECT to change the intensity of the cursor. This is useful if you're drawing over a light background.

Note 4. Pressing TAB while either in Nlarge or on the Draw screen changes your current fill pattern to the next in line. After you pass number 16, you're returned to 0.

Note 5. When setting text parameters, it's a good idea to keep these things in mind: if you set the height/width of a character below 8, some pixels are "knocked out" When the numbers are above 8, some of the characters' definitions are repeated, making the characters a little chunky. Use Nlarge to touch them up. Setting the height/width to 8 gives you graphics-1-size characters; setting the height to 16 and width to 8 yields graphics-2-size characters.

Note 6. The text routine can plot all characters, including inverse and control characters. If you don't load in a special font of your own, the standard ROM set is used.

You will notice that, when you enter text, what you're typing is appearing in your character set - but the prompt is in the ROM set. Neat, huh?

Note 7. The circle/ellipse routine has one limitation: the radius of your circle/ellipse must be less than 63. This isn't so bad, seeing as an ellipse that big almost fills the screen!

Well folks, that's all. I can't think of anything I left out. And if I did forget something, I'll see you in Reader comment Happy drawing!

Barry Kolbe is a mathematics teacher in Madison, WI. He uses the Atari to demonstrate graphing in his classroom. His former student, Bryan Schappel, is studying Computer Science at the University of Wisconsin, Madison.

<% OutputPageFooter %>