Skip to content

Instantly share code, notes, and snippets.

@livinbits
Last active January 6, 2021 01:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save livinbits/e7cf8a58bb345f6d4aeefb7c46ebc9b9 to your computer and use it in GitHub Desktop.
Save livinbits/e7cf8a58bb345f6d4aeefb7c46ebc9b9 to your computer and use it in GitHub Desktop.
"Linea modulata B" (modulated line B) - A generative work of ca. 1987

INSTRUCTION

  1. open on MSXPen
  2. show in fullscreen
  3. wait patiently the completion of circle(*)
  4. press any key when you want to reset the line

(*) the execution can be accelerated by holding down the F12 key.

The work was created with a Philips VG-8235 ("MSX2 Europe" on the emulator).

100 SCREEN 7,,,,,0
110 VDP(9)=VDP(9) OR 32
130 COLOR=(0,0,0,0): COLOR=(1,1,1,1): COLOR=(2,1,1,2): COLOR=(3,2,1,2)
140 COLOR=(4,2,2,2): COLOR=(5,2,2,3): COLOR=(6,3,2,3): COLOR=(7,3,3,3)
150 COLOR=(8,3,3,4): COLOR=(9,4,3,4): COLOR=(10,4,4,4): COLOR=(11,4,4,5)
160 COLOR=(12,5,4,5): COLOR=(13,5,5,5): COLOR=(14,5,5,6): COLOR=(15,5,7,5)
170 COLOR ,0,1: CLS: GOSUB 340: BEEP: CLS
180 K1=.5: K2=1: GK=INT(RND(-TIME)*360): GD=INT(RND(1)*360)
190 XX=INT(RND(1)*512): YY=INT(RND(1)*212)
200 PSET (XX,YY),1
210 :
220 GK=GK+K1: IF GK<0 OR GK>359 THEN K1=-K1: GOTO 220
230 GD=GD+(GK*K2): IF GD<0 OR GD>359 THEN K2=-K2: GOTO 230
240 GT=INT(GD)
250 FOR I=0 TO 2
260 XX=XX+X(GT): IF XX<0 THEN XX=512+XX: ELSE IF XX>511 THEN XX=XX-512
270 IF XX>511 THEN XX=XX-512
280 YY=YY+Y(GT): IF YY<0 THEN YY=212+YY: ELSE IF YY>211 THEN YY=YY-212
290 CL=POINT(XX,YY)+1: IF CL>15 THEN CL=15
300 PSET(XX,YY),CL
310 NEXT I
315 IF INKEY$<>"" THEN CLS: GOTO 180 'added in 2017
320 GOTO 220
330 '===============
340 :
350 '--------------- Calcolo seni e coseni
360 CS=0: I=0: DIM X(360),Y(360)
370 :
380 X(I)=SIN(CS)*2
390 Y(I)=COS(CS)
400 PSET(X(I)*100+255,Y(I)*100+106),7
410 CS=CS+.017453277777#: IF CS>6.28318 THEN RETURN
420 I=I+1
430 GOTO 380
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment