CODINGLISTINGS ★ KALEIDOSCOPE (COMPUTING WITH THE AMSTRAD) ★

Kaleidoscope (Computing with the Amstrad)Coding Listings
★ Ce texte vous est présenté dans sa version originale ★ 
 ★ This text is presented to you in its original version ★ 
 ★ Este texto se presenta en su versión original ★ 
 ★ Dieser Text wird in seiner Originalfassung präsentiert ★ 

MANY of the best computer graphics programs seem to originate from traditional visual toys, and Kaleidoscope is no exception.

In the original, one of several sectors contains coloured pieces of tinsel cut in various shapes -triangles, rectangles, crescents and so on.

Shaking the instrument causes these to form a random pattern in the sector. When you look through the eyepiece, -mirror reflections in the remaining sectors show a pleasing symmetrical image which you can change as often as you like.

To simulate the coloured tinsel shapes, the program uses a series of different sized rectangles in a variety of colours. The length to width ratio of these rectangles varies randomly and they are drawn initally in one sector. (Sector B shown in Figure I.)

Almost instantaneously each shape is repeated in the other seven sectors using machine code. The result is effectively to mirror the initial pattern about the dividing lines between the sectors centered about the graphics origin - the middle of the screen.

For those who like to experiment the following information may be of use: In line 80 the number 7 restricts the size of the largest block allowed into the pattern while the values 6 and 2 determine the minimum size and length to width ratio respectively. Keep the latter at 2 or more because under certain conditions the parameters passed to the machine code can have weird effects.

The factor 0.3 in line 90 determines approximately the percentage of background black appearing in the display.

The machine code routine checks that exactly four parameters have v been received from Basic. Plotting a single pixel uses rom call &BBEA and each pixel is plotted 8 times - once in each sector. When one row of dots is complete, according to parameter b%, other rows of similar length are repeated underneath from parameter a%. The very first pixel to be plotted takes its position from the variables x% and y%.

Kaleidoscope runs on all CPC Amstrads. The patterns produced will show on a green screen but to get the best effects colour is essential.

CWTA

★ PUBLISHER: Computing With The Amstrad
★ YEAR: 1987
★ CONFIG: 64K + AMSDOS
★ LANGAGE: ???
★ LiCENCE: LISTING
★ COLLECTION: COMPUTING WITH THE AMSTRAD 1987
★ AUTHOR: Richards Watts
 

★ AMSTRAD CPC ★ DOWNLOAD ★

Type-in/Listing:
» Kaleidoscope    (Computing  with  the  Amstrad)    LISTINGDATE: 2018-03-20
DL: 195
TYPE: text
SiZE: 2Ko
NOTE:

★ AMSTRAD CPC ★ A voir aussi sur CPCrulez , les sujets suivants pourront vous intéresser...

Lien(s):
» Coding Src's » Waves (Computing with the Amstrad)
» Coding Src's » Square Curves (Computing with the Amstrad)
» Coding Src's » Arabescos (Amstrad User)
» Coding Src's » Increasing workspace (Computing with the Amstrad)
» Coding Src's » Revolving Message
» Coding Src's » Music Galore (Amstrad Computer User)
Je participe au site:
» Vous avez des infos personnel, des fichiers que nous ne possédons pas concernent ce programme ?
» Vous avez remarqué une erreur dans ce texte ?
» Aidez-nous à améliorer cette page : en nous contactant via le forum ou par email.

CPCrulez[Content Management System] v8.7-desktop/c
Page créée en 802 millisecondes et consultée 1384 fois

L'Amstrad CPC est une machine 8 bits à base d'un Z80 à 4MHz. Le premier de la gamme fut le CPC 464 en 1984, équipé d'un lecteur de cassettes intégré il se plaçait en concurrent  du Commodore C64 beaucoup plus compliqué à utiliser et plus cher. Ce fut un réel succès et sorti cette même années le CPC 664 équipé d'un lecteur de disquettes trois pouces intégré. Sa vie fut de courte durée puisqu'en 1985 il fut remplacé par le CPC 6128 qui était plus compact, plus soigné et surtout qui avait 128Ko de RAM au lieu de 64Ko.