Solid States Revisited

by ANALOG Readers with Tom Hudson


In issue 16 of ANALOG, I presented Solid States, a 3-D object plotting system. Readers were asked to send in their 3-D object data and modifications to the original program. Well, we've received a good deal of feedback, and I decided to print some of the more interesting items in lieu of my Basic Training column.

For those readers who do not have the Solid States program, you can still order issue 16 as a back issue. See the ad elsewhere in this issue.

If you have a copy of Solid States, get started typing in the data below!

An "A" for effort.

Paul J. Goldernew, of Pittsburg, PA sent in our first Solid States graphic. It is a 3-D representation of the "A" in the ANALOG logo. Paul's original data file also contained the entire ANALOG logo above the "A," but it was just too big (157 points, 158 lines) for us to print. I did a little editing and cut it down to just the "A" itself, and came out with 100 points and 110 lines. Paul's effort shows how curved lines can be shown with Solid States.

Points: 100Lines: 110
PointXYZ LineFromTo
19-76 112
2976 223
38.757.756 334
48.258.256 445
57.758.756 556
6796 667
7-596 778
8-956 889
9-9-76 9910
10-8.75-7.756 101011
11-8.25-8.256 111112
12-7.75-8.756 121213
13-7-96 131314
14-3-96 141415
15-2.25-8.756 151516
16-1.5-86 161617
17-1-76 171718
18-1-66 181819
19-1.25-56 191920
20-2-36 202021
213-36 212122
224-2.756 222223
234.5-26 232324
244.75-16 242425
254.506 252526
2640.756 262627
27316 272728
28-416 282829
29-52.56 292930
30-53.56 303031
31-4.546 313132
32-3.754.756 323233
33-356 333334
34556 343435
355-76 353536
365.25-86 363637
376-8.756 373738
387-96 383839
398-8.756 393940
408.75-86 40401
417-8.256 414142
426-86 424243
435.5-76 434344
445.75-66 444445
456-5.56 454546
467-5.256 464647
478-5.56 474748
488.5-66 484849
498.75-76 494950
508-86 505041
519-70 515152
52970 525253
538.757.750 535354
548.258.250 545455
557.758.750 555556
56790 565657
57-590 575758
58-950 585859
59-9-70 595960
60-8.75-7.750 606061
61-8.25-8.250 616162
62-7.75-8.750 626263
63-7-90 636364
64-3-90 646465
65-2.25-8.750 656566
66-1.5-80 666667
67-1-70 676768
68-1-60 686869
69-1.25-50 696970
70-2-30 707071
713-30 717172
724-2.750 727273
734.5-20 737374
744.75-10 747475
754.500 757576
7640.750 767677
77310 777778
78-410 787879
79-52.50 797980
80-53.50 808081
81-4.540 818182
82-3.754.750 828283
83-350 838384
84550 848485
855-70 858586
865.25-80 868687
876-8.750 878788
887-90 888889
898-8.750 898990
908.75-80 909051
917-8.250 919192
926-80 929293
935.5-70 939394
945.75-60 949495
956-5.50 959596
967-5.250 969697
978-5.50 979798
988.5-60 989899
998.75-70 9999100
1008-80 10010091
     101858
     102959
     103757
     1042878
     1052070
     1062474
     1073484
     1083585
     109151
     110252

Try the following views:

['A' Logo screenshot]
OBSERVER LOC.   LOOKED AT   ZOOM
-------------   ---------   ----
 30,-50,100       0,6,0     1.5
['A' Logo screenshot]
OBSERVER LOC.   LOOKED AT   ZOOM
-------------   ---------   ----
 -12,-12,1        0,4.5,3    .2

Over "reacting."

Nick A. Brienza, of Columbia, MD, sent in a 3-D representation of a nuclear reactor cooling tower. Once again, this graphic shows how curved surfaces can be shown with Solid States. You'll note that this object was defined using only 32 points, a pretty efficient job.

Points: 32Lines: 40
PointXYZ LineFromTo
1-208 112
2-2.2504 223
3-2.7502 334
4-400 456
5-1.31.38 567
6-1.51.54 678
7-1.91.92 7910
8-2.72.70 81011
9028 91112
1002.254 101314
1102.752 111415
12040 121516
131.31.38 131718
141.51.54 141819
151.91.92 151920
162.72.70 162122
17208 172223
182.2504 182324
192.7502 192526
20400 202627
211.3-1.38 212728
221.5-1.54 222930
231.9-1.92 233031
242.7-2.70 243132
250-28 2515
260-2.254 2659
270-2.752 27913
280-40 281317
29-1.3-1.38 291721
30-1.5-1.54 302125
31-1.9-1.92 312529
32-2.7-2.70 32291
     3348
     34812
     351216
     361620
     372024
     382428
     392832
     40324

Try the following views:

[Tower view screenshot]
OBSERVER LOC.   LOOKED AT   ZOOM
-------------   ---------   ----
 45,45,45        0,0,4       2
[Tower view screenshot]
OBSERVER LOC.   LOOKED AT   ZOOM
-------------   ---------   ----
  5,4,1          0,0,3       .2

Nick also asked if the 3-D views could be animated by showing a series of views in progression, Our next reader came up with a very nice program modification to do just that.

'Round and 'round she goes...

Larry L. Harris, of Poca, WV, has gone beyond the limitations of the original Solid States program, and has come up with a program modification that allows for automatic rotation of an object. Because of the memory requirements of this modification, 48K memory is suggested, and even then only fairly small objects can be rotated. Larry writes:

"This modification allows the viewer to rotate about the object in a circle on the X-Y plane with a Z coordinate the user inputs. The radius is determined by the input X and Y coordinates of the observer's viewpoint. The object appears to rotate on the screen. A two-page flip was added to give instant transition from one frame to the next. You do not see the object develop. It is drawn off-screen, then through a page flip you see the complete object. A machine-language routine is used to clear the GRAPHICS 8+16 screen.

"To add this feature to the existing Solid States program, simply add the lines in Listing 1. Some are changes to existing lines.

"The program runs like the original until the zoom factor has been entered. Respond Y to "DO YOU WANT TO DO AN X-Y LOOP." Then input the total number of degrees rotation and the number of degrees to increment for each drawing. Expect a screen flicker and some delay while initializing takes place and the first drawing is developed off-screen. Do not turn DMA off if you want to rotate around the object, or you won't see it.

"The program will also operate as originally designed. Just answer N to the above prompt."

BASIC Listing 1
135 ? "* ROTATION:  LARRY HARRIS *"
160 DIM R$(1),A$(5),F$(20),DMA$(1),O$(
1),EG$(2),IN$(1):EG$=CHR$(27):EG$(2)=C
HR$(7)
434 ? :? "DO YOU WANT TO DO AN X-Y LOO
P";:INPUT R$:IF R$<>"Y" THEN 440
436 ? "HOW MANY DEG. TOTAL ROTATION";:
INPUT AN2:AN2=(AN2/360)*6.28
438 ? "HOW MANY DEG. INC. ROTATION";:I
NPUT AN3:AN3=(AN3/360)*6.28:GOSUB 2300
:REM SET UP PAGE FLIP
439 GOTO 2000
850 GOSUB 2200:SETCOLOR 2,0,0:COLOR 1:
TRAP OFF
1035 IF FLAG THEN 2100
1040 IF PEEK(53279)=7 AND STRIG(0)=1 T
HEN 1035
2000 FLAG=1:R=(OX^2+OY^2)^0.5:AN1=ATN(
OY/OX):AN2=AN2+AN1
2100 AN1=AN1+AN3:OX=R*COS(AN1):OY=R*SI
N(AN1)
2120 GOTO 440
2199 REM PAGE FLIP
2200 IF  NOT FLAG THEN GRAPHICS 24:RET
URN 
2201 IF AN1>AN2 THEN FLAG=0
2202 XI=XI+1-2*(XI=2):XA=2-(XI=2)
2205 FOR S=40 TO 0 STEP -10:SOUND 0,S,
10,8:NEXT S
2210 POKE DL+4,DLL(XA):POKE DL+5,DLH(X
A)
2220 POKE DL+100,DHL(XA):POKE DL+101,D
HH(XA)
2230 POKE 88,DLL(XI):POKE 89,DLH(XI)
2240 ADS=DLL(XI)+256*DLH(XI):Z=USR(153
6,ADS)
2250 RETURN 
2299 REM SET UP DATA FOR PAGE FLIP
2300 TRAP 2500:DIM DLL(2),DLH(2),DHL(2
),DHH(2):X=0:RESTORE 2400
2310 READ DAT:IF DAT=-1 THEN 2330
2320 POKE 1536+X,DAT:X=X+1:GOTO 2310
2330 X=2:GOSUB 2350:X=1:POKE 106,PEEK(
106)-32:GOSUB 2350
2340 RETURN 
2350 GRAPHICS 24:DLL(X)=PEEK(88):DLH(X
)=PEEK(89):DL=PEEK(560)+256*PEEK(561):
DHL(X)=PEEK(DL+100)
2360 DHH(X)=PEEK(DL+101):RETURN 
2399 REM CLR DATA
2400 DATA 104,24,104,133,4,104,133,3,1
65,4,105,30,133,10,160,0,169,0,145,3,2
00,192,0,208,249,160,0
2410 DATA 230,4,165,4,197,10,208,237,9
6,-1
2500 TRAP OFF:GRAPHICS 24:RETURN 
Checksum Data
135 DATA 471,818,862,448,491,960,288,9
40,646,226,587,882,488,565,553,9225
2202 DATA 137,386,315,415,598,533,792,
859,512,109,526,736,794,614,58,7384
2399 DATA 298,832,508,534,2172

Keep'em coming.

I'd like to thank all the readers who have sent in their 3-D image data. Special thanks goes to Larry L. Harris for his rotation modification. If you've created a 3-D object and haven't sent it in yet, what are you waiting for? Simply send it (on tape, disk or printout) to:

Solid States
c/o ANALOG
P.O. Box 23
Worcester, MA 01603

When we get another good batch of objects. we'll run them in a future issue.

[Solid States graphic]


Previous | Contents | Next

Original text copyright 1984 by ANALOG Computing. Reprinted with permission by the Digital ANALOG Archive.