Sitenotice: 11/29/2018: The wiki is back. It turns out, some anti-virus product on my web server had an issue with the latest version of PHP. My server techs have resolved this issue, and things should be working again. During the investigation, I did restore to a backup from September. There is a chance that any changes done since then were lost, but I do not recall any edits. --OS-9 Al

8/30/2016: Massive re-work is being done on the InfoBox Templates. Read that page to keep up with the plan for that, and adding better keyword tags (categories) to all the pages. --OS-9 Al (talk) 15:28, 31 August 2016 (CDT)

Undercolor/850103/Another Fine Mess

From CoCopedia - The Tandy/Radio Shack Color Computer Wiki
Jump to: navigation, search

Home Articles Companies Publications Hardware People Software Timeline ... Emulators Internet Resources
(Don't see something listed? Click "edit" and add it! Together we can build this database. When making a new info page, refer to this InfoBox Template for guidelines.)



UnderColor, Volume 1, Number 3, January 11, 1985

  • Title: Another Fine Mess
  • Author: Richard Ramella
  • Synopsis: Classy circle art.
  • Page Scans: Link

Article

Ed’s Note: Here 's some fun just in time for the end of the

holidays, as only Richard Ramella can product it!

With the help of Leonardo da Vinci, Stanley Laurel, Oliver

Hardy and Winky the Clown, l'm going to show you how to

use the Circle command to create simple and impressive computer art.

Normally computer art tends to produce lines and squares,

and complex efforts require more data entry than the results

often merit. However, with the Circle command‘s diversity

you can break into the heady atmosphere of the curved line.

You can control the curve and bend it to your artistic will.

l must acknowledge da Vinci, perhaps the greatest artist

in history, because of an anecdote I read about him. lt is

said he could draw a perfect circle with an unsupported brush.

Out he would reach, around would go his sure hand and-

swish—a perfect circle.

I began to look for the circle in Leonardo's art. It is

everywhere. You probably won't have much trouble finding

a print of the Mona Lisa. Look carefully at that famous face.

The forehead, the cheeks, the chin, the nose, even the

enigmatic smile—they are all parts of circles. Somehow, the

harmony and the mystery of the face emerge from the gently rounded parts.

Perhaps it was a leap from the sublime to the mundane, but I began to see that the Circle command could be used to make art. l'm no artist, but I tried it and it worked. You won't see anything comparable to The Last Supper in my work. Try Listing 1, Another Fine Mess, and you will see passable caricatures of my favorite comics, Mister Laurel and Mister Hardy. Try Listing 2, Winky, and you will see a colorful clown with a bit of animation.

What is noteworthy about these efforts is that the Circle command is so diverse it can be used to create greatly different curved lines.

Listing 3, Circle Tester, is a demonstration program. lt lets you play with three concepts taught in the Going in Circles chapter (pages 40-47) of the manual Going Ahead With Extended Color Basic. The three ideas of the demonstration are radius of the circle, height/width ratio, and start-end points of the circumference.

I urge you to key in and try the short program Circle Tester before you try Winky or Another Fine Mess. This way, you’ll understand the concepts of the main programs when you

see them at work.

Circle Tester has a three-item menu. Each one either draws a circle or a portion of a circle. In all cases the center of the circle is the center of the screen: 128 on the across axis and 96 on the down axis.

Let's try each menu item:

Radius—Flun the program and tap R. The radius of a circle is the distance from its center to its edge. On the Color Computer the numbers referring to the radius are expressed in terms of the PSET points on the screen at the highest resolution. That means the screen has 255 points on the X axis, and 192 on the Y axis.

For some strange reason we are allowed a circle radius from 0 to 65535. In trying this test, you will see the following prompt:

FOR RADIUS OF CIRCLE

- 0 to 65535

Answer the prompt with a number within these two figures and tap Enter. When you have seen the result and want to try again, tap any key to return to the prompt.

Line 640 shows the form of the command, and the X position is where the radius number or variable goes in the circlecommand.

In choosing radii, the number 0 will produce a mere dot on the screen. Try larger numbers — 5, 10, 30 and 40 — to see larger circles. As you choose increasingly larger numbers for the radius, the circle, like a balloon inflated in a box, will flatten against the edges of the screen. Keep trying higher numbers and you will in time see the result as a square at

screen’s edge.

Now run the program again. Type H and tap Enter to try some height/width experiments. Depending on the number you enter here, you can make either height or width greater than the other. You will see this prompt:

- 1 TO 255 FOR HEIGHT

- 0 TO .99 FOR WIDTH

Answer the prompt by typing the number and tapping Enter. To return from the display to the prompt for another try, tap any key. Line 300 is where the Circle command does its trick, and the variable X at the end of the command represents

the number you've chosen. The number 1 is meant to produce a perfect circle. The number 2 gives a circle which is twice as high as it is wide, and 3 gives a 3-to-1 height/width ratio. Larger numbers, such as 255, squeeze the top and bottom of the circle against the screen, producing a box. Experiment with varied numbers to get the idea here.

By entering a number from 0 to .99, the height is made that percentage of the width. Example: the number .5 would give a circle half the height of its width. Again, experiment.

The final menu choice of Circle Tester is Start—End. It is possible to use the circle command to draw a section of a circle (an arc) which begins and ends at points you specify. This method is explained on page 45 of the manual.

In trying Start—End, you must enter two numbers separated by a comma. The first is the start point, the second the end point. Line 380 ofthe program shows the form with X representing start and Y the end point.

As in other menu choices, type your number choices and tap Enter to see the result. Then tap any key to return to the menu. Try these possibilities: .5,.75 / .25,.35 / 0,.80 and see what happens.

You might want to later go through the manual's chapter on circles. I have left out a few possibilities. I wanted only to cover the major concepts used in the main programs with

this article.

When you have tried Circle Tester, I hope the circles and curved lines produced will have suggested possibilities to you. You now have the capability of producing an amazing

variety of shapes. In the programs ahead you will see eyes, ears, noses, smiles, hair, heads. . . all produced with different kinds of circles.

Now it’s time to try Another Fine Mess. it produces caricatures of Laurel and Hardy and plays a version of the duo’s theme, which is known as the Cuckoo Song.

Let me cover the program:

• Laurel Sequence

220 Head shape.

230-260 Hat brim. Across axis of circle’s center is X, which equals 50. By looping Y from 25 to 30, the lower part of a circle is drawn several times and thickens into the brim.

270 The rest of the hat is painted in.

280-300 Chin created and given a bit of emphasis by forming two lower circle sections with Y having subsequent values of 135 and 136.

310-330 Wide bottom half of circle drawn with Y having three descending positions, and smiling mouth results.

340-400 Eyes created. 310 begins a loop that occurs twice 30 positions apart. In each pass . . . 360 forms the large arch of the eye, 370 draws the circle of the eye's iris, 380 paints in the eye, 390 sets a light dot in the eye to give it sparkle, and 400 is the end of the loop.

410-420 These two line commands form the long ridges of the nose.

430 The rounded bottom of the nose connects the nose's two ridge lines.

440-460 Ears are made on either side of the head.

• Hardy Sequence

470 Head Shape.

480-500 A loop draws the mouth in a scowl of two thicknesses.

510 The bulbous nose

520-3540 Mustache is created by forming a high, elongated half circle, then stepping it down from the radius of 12 to 1.

560-580 Eyes. They are drawn in a loop which centers one eye on an X value on 145, the other on an X value of 185. Line 560 forms the found area to the left of the eye, and line 570 forms the iris.

590 The hat brim

600 The rounded derby's shape.

610 A small line is drawn, linking the top and bottom areas of the hat. This makes it possible for the coming single Paint command to spill over entirely within the derby.

continued on page 23

continued from page 6

620 The derby takes full shape through the Paint command.

630-650 A series of characteristic spitcurls is formed across

the forehead.

660-720 A series of sounds is assembled into FS, which

when played at 720 proves to be the Cuckoo Song.

The program Another Fine Mess is achieved through highest

resolution, PMODE 4,1, and it is monochromatic. By contrast the program Winky uses a few other tricks to achieve

fairly high resolution along with a few colors and a bit of

animation.

ln Winky you can isolate effects by stopping the program

after specific lines. For example, put in this line; iss eoro

iss. This freezes the display to show you the effect of Line

150. Delete Line 155 and put in a new line: iss GoTo iss. This

will show the effect of Line 160. ln this way you can move

slowly through the program studying the effects of any given

line.

I tend to use the Circle command to create the faces of

characters—and somewhat symmetrical faces at that.

Remember, I said l‘m no artist, though l'm pleased with the

results so far. (end)

Listings

Listing 1. Another Fine Mess
100 REM * ANOTHER FINE MESS * RICHARD RAMELLA
110 REM * TRS—80 EXTENDED COLOR BASIC 16K
120 CLS
130 CLEAR 400
140 PRINT @ 231,”ANOTHER FINE MESS”
150 FOR T=1 TO 1000
160 NEXT T
170 PMODE 4,1
180 PCLS 1
190 SCREEN 1,0
200 FOR T=1 TO 500
210 NEXT T
220 CIRCLE(50,96),35,.2,3
230 X=50
240 FOR Y=25 TO 30
250 CIRCLE(X,Y),40,.2,.1,.01,.5
260 NEXT
270 PAINT(40,2),2,2
280 FOR Y=135 TO 136
290 CIRCLE(50,Y),20,4,5,0,.5
300 NEXT Y
310 FOR Y=109 TO 111
320 CIRCLE(50,Y),20,2,.2,0,.5
330 NEXT Y
340 Y=70
350 FOR X=35 TO 65 STEP 30
360 CIRCLE(X,Y),10,2,3,.5,0
370 CIRCLE(X+3,Y—3),5,2
380 PAINT(X+3,Y-3),2,2
390 NEXT
400 LINE(55,75)—(68,100),PRESET
410 LINE(45,75)-(54,100),PRESET
420 CIRCLE(61,100),8,2,.2,0,.5
430 FOR X=15 TO 85 STEP 70
440 CIRCLE(X,70),4,2,5
450 CIRCLE(170,96),70,2
460 FOR Y=155 TO 156
470 CIRCLE(170,Y),20,2,.25,.5
480 NEXT Y
490 CIRCLE(170,110),15,2
500 FOR A=12 TO 1 STEP -1
510 CIRCLE(170,147),A,.2,2,.5
520 NEXT A
530 FOR X=145 TO 185 STEP 40
540 CIRCLE(X,90),5,2,.8,.25,.75
550 CIRCLE(X+5,90),3,2
560 NEXT X
570 DRAW "C0;BM100,50;R140”
580 CIRCLE(170,50),55,2,.8,.5,.01
590 DRAW "C1;BM170,22;D5"
600 PAINT(170,30),2,2
610 FOR X=140 TO 200 STEP 5
620 CIRCLE(X,57),5,2,2,.25,.75
630 NEXT X
640 POKE 223,100
650 A$=”L8;G;P64;E;P64;G;P64;E;P16"
660 B$="L10;FGFDG;L8;E;P4”
670 C$=”L12;FGFDG;L8;C;P4”
680 D$=”L8;E;L4;C;P8"
690 E$=D$+D$+D$
700 F$=A$+A$+B$++A$+A$+C$+E$
710 PLAY FS
720 GOTO 710
Listing 2. Winky
100 REM * WINKY THE CLOWN * RICHARD RAMELLA
110 REM * TRS-80 EXTENDED COLOR BASIC
120 PMODE 3,1
130 PCLS 1
140 SCREEN 1,1
150 CIRCLE(128,100),25
160 CIRCLE(96,70),15
170 CIRCLE(158,70),15
180 LINE(0,191)-(78,160),PSET
190 LINE(178,160)—(252,191),PSET
200 CIRCLE(96,70),10,3,.70
210 PAINT(97,71),3
220 CIRCLE(158,70),10,3,.7
230 PAINT(157,71),3
240 CIRCLE(96,70),3,,2
250 CIRCLE(158,70),3,,2
260 PAINT(130,96),8,8
270 CIRCLE(128,96),60,4,2
280 CIRCLE(60,96),10,,3
290 CIRCLE(196,96),10,,3
300 CIRCLE(100,60),20,,2,.5,1
310 CIRCLE(154,60),20,,2,.5,1
320 DRAW "BM30,30;R50”
330 DRAW ”BM178,30;R50”
340 LINE(30,30)—(70,70),PSET
350 LINE(228,30)-(188,70),PSET
360 PAINT(40,35),3,8
370 PAINT(180,35),3,8
380 PAINT(l0,191),8,8
390 PAINT(250,191),8,8
400 CIRCLE(128,96),200,4
410 Y=2
420 FOR X=96 TO 160 STEP 4
430 LINE(X,0)—(X,Y),PSET
440 IF X<127 THEN Y=Y+4 ELSE Y=Y-4
450 NEXT X
460 DRAW "BM128,127;D11"
470 DRAW "BM110,145;R35"
480 PAINT(3,3),2,4
490 PAINT(250,3),2,4
500 PMODE 4,1
510 FOR T=1 TO 800
520 NEXT T
530 DRAW "C0;BM100,145;R55"
540 FOR X=125 TO 155
550 IF X=126 THEN FOR T=1 TO 1000: NEXT
560 CIRCLE(128,X),40,1,.5,0,.5
570 NEXT X
580 FOR X=145 TO 151
590 CIRCLE(128,X),32,2,.4,0,.5
600 NEXT X
610 FOR T=1 TO 1000
620 NEXT T
630 PMODE 3,1
640 SCREEN 2,1
650 FOR T=1 TO 500
660 NEXT T
670 FOR Q=1 TO 2
680 FOR X=10 TO 3 STEP -1
690 CIRCLE(96,70),X,5,.7
700 CIRCLE(96,70),3,,2
710 NEXT X
720 FOR X=1 TO 10
730 CIRCLE(96,70),X,3,.7
740 CIRCLE(96,70),3,,2
750 NEXT X,Q
760 GOTO 670
Listing 3. Circle Tester
0 REM * CIRCLE TESTER * RICHARD RAMELLA
10 REM * TRS—80 EXTENDED COLOR BASIC 16K
20 CLS
30 PMODE 4,1
40 PCLS1
50 PRINT ”<S>TART-END"
60 PRINT ”<H>EIGHT-WIDTH RATIO"
70 PRINT ”<R>ADIUS”
80 INPUT CS
90 IF C$=”S” THEN 220
100 IF C$='R" THEN 300
110 IF C$='H' THEN 140
120 CLS
130 GOTO 50
140 CLS
150 PRINT ”-- 1 TO 255 FOR HEIGHT"
160 PRINT "-- 0 TO .99 FOR WIDTH"
170 INPUT X
180 PCLS 1
190 SCREEN 1,0
200 CIRCLE(128,96),30,2,X
210 IF INKEY$<>”" THEN 140 ELSE 210
220 CLS
230 PRINT ”FOR PART OF CIRCLE..."
240 PRINT '-- 2 NUM ERS FROM 0 TO 1
250 INPUT ”START,FINISH";X,Y
260 PCLS 1
270 SCREEN 1,0
280 CIRCLE(128,96),40,2,1,X,Y
290 IF INKEY$<>"' THEN 220 ELSE 290
300 CLS
310 PRINT ”FOR RADIUS OF A CIRCLE”
320 PRINT '--- 0 TO 65535"
330 INPUT X
340 PCLS 1
350 SCREEN 1,0
360 CIRCLE(128,96),X,2
370 IF INKEY$<>"” THEN 300 ELSE 370
380 END