APPLICATIONSPROGRAMMATION ★ GRAPHICS (PERSONAL COMPUTING TODAY) ★

Graphics (Personal Computing Today)Applications Programmation
★ 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 ★ 

One of the best features of the CPC464 is its impressive graphics. Easy to use too, as Simon Rockman demonstrates with some stunning programs._

In the recent past computers did not have very impressive graphics. Now computers like the BBC micro and the Amstrad CPC 464 have changed all that.

The CPC 464 is particularly powerful in that it has 27 colours. Because it can only display 16 of these at once there is a process known as paletting which allows you to select your colour or 'INK'. Table 1 shows the possible colours.

The keywords on the CPC 464 are very well chosen to make it easy to understand the process of putting each ink into a pen. When you change pens you get a new colour to write with; however there are two slight flaws in the process. The first is that the background has an ink colour, so INK 0,13 would set the background, pen 0, to grey. This takes a bit of getting used to but it is not so difficult to deal with.

What is slightly more confusing is that changing the ink in the pen re-colours all the existing stuff drawn with that pen. This has some great advantages. If you draw a bar in black (colour 0) using pen 1 on a black background (pen 0), then you can make the bar appear by allocating a different ink to pen 1 .

Program 1 shows the effect of this. It looks as if the bar is moving across the screen. However, all that is happening is that the bar is lighting up and switiching off rapidly, just like the signs in Piccadilly Circus.

Ink NumberColour/Ink

0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26

Black
Blue
Bright Blue
Red
Magenta
Mauve
Bright Red
Purple
Bright Magenta
Green
Cyan
Sky Blue
Yellow
White
Pastel Blue
Orange
Pink
Pastel Magenta
Bright Green
Sea Green
Bright Cyan
Lime Green
Pastel Green
Pastel Cyan
Bright Yellow
Pastel Yellow
Bright White

Table 1 Master Colour
Chart: INK numbers and colours.

Because the switching is almost instant it does not matter how complicated the shape is. This is well suited to the kind of games in the little LCD pocket devices. However, since there are only 16 colours available for this switching process the number of objects you can have is limited.

Flashing colours can be used in a similar way and because they will keep flashing regardless of what the rest of the computer is doing, it is possible to create the effect of movement. By altering the rate of flash an illusion of acceleration and deceleration can be achieved. Program 2 shows a stationary road, the flashing colours give the impression that you are riding down it.

In the world of supercomputers, graphics are getting so complicated and the resolution so high that they rival artwork for quality. Most of the programmers and designers who drive these machines started life as artists and not as computer people, however one thing they all agree on is that you have to learn the associated maths.

The only time I ever took any interest in maths at school was when I knew that listening in class meant that I could go home and draw a pretty (if lo-res) picture on my computer. The result was that I learnt how to draw circles. Program 3 shows a neat way of doing this and Program 4 some improvisations on the theme.

Flat graphics are all very well but the fun starts when a third dimension is added. Program 5 shows a CPC 464 version of a hump which appeared in the August 1984 issue of PCT for the Commodore 64. If you play around with the values for elevation and angle you can look around most of the figure.

Unfortunately the CPC 464 is not capable of drawing a new figure 20 times each second or it would be possible for you to "fly" over and around the figure. This is something best left to the simulators which cost millions of pounds.

It would be nice to combine the speed of changing inks with the complexity of a three dimensional figure. This is what the final program does. It produces a tilted beach ball which rotates. Use the 'Z' key to make it go faster and the 'X' to slow it down. Play about with all these programs and see what you can produce. Maths is much more fun when you see it in action.

PCT

★ PUBLISHER: Personal Computing Today
★ YEAR: 1985
★ CONFIG: 64K + AMSDOS
★ LANGUAGE:
★ LiCENCE: LISTING
★ AUTHOR: Simon ROCKMAN
 



★ AMSTRAD CPC ★ DOWNLOAD ★

Type-in/Listing:
» Graphics    (Personal  Computing  Today)    ENGLISH    LISTINGDATE: 2025-10-28
DL: 32
TYPE: PDF
SiZE: 1248Ko
NOTE: Supplied by archive.org ; 6 pages/PDFlib v1.6

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

Lien(s):
» Applications » Key-Help (CPC Amstrad International)
» Applications » Function Keys (Amstrad Action)
» Applications » RSX Keywords
» Applications » Copy Key Utility (Computing With the Amstrad)
» Applications » Key Helper (Your Computer)
» Applications » RSX PutKey (Amstrad Action)
Je participe au site:
» Pour ce titre nous ne disposons de fichier executable sur CPC (Dump, Saisie du listing) , alors si vous avez ça dans vos cartons ou vous désirez usé vos petit doigts boudinés sur votre clavier faites le nous savoir.
» Vous avez des infos personnel ?
» 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.732-desktop/c
Page créée en 621 millisecondes et consultée 114 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.