CODINGLISTINGS ★ GRAPHIC - PATTERN PLOTTER ★

GRAPHIC - PATTERN PLOTTER (Amstrad Action)GRAPHIC - PATTERN PLOTTER (The Amstrad User)
★ 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 ★ 

Here's a handy program for anyone with a plotter: it generates patterns and gives you the option of sending it to a Tandy plotter. Paul Bridel of Cullompton, Devon, is the man to thank.

If you have a different plotter, a breakdown of the codes may help you write your own plotter driver:

  • CHR$ (17) sets text mode
  • CHR$(18) sets graphics mode
  • S0 gives 80 columns
  • P lets you mix text and graphics
  • M means move pen
  • I sets the origin
  • D for draw
  • A to return to text mode

1 ' Pattern plotter
2 ' by Paul Bridel
3 ' Amstrad Action September 87
20 ' For Tandy CGP-115 plotters & compatibles
30 MODE 2: INPUT"Step Value (0.1 to 4 are best) ";stp
40 ' Screen-draw routine
50 ORIGIN 320,200: FOR a=0 TO 230 STEP stp
60 DRAW a*SIN(a),a*COS(a): NEXT a
70 INPUT "Do you want a plot-out of this? ";plt$
80 IF plt$="Y" OR plt$="y" THEN 100 ELSE 30
90 ' Plot Routine
100 PRINT#8,CHR$(17): PRINT#8: PRINT#8,CHR$(18)
110 PRINT#8,"S0": PRINT#8,"Pstep Value: ";stp
120 PRINT#8,"M240,-240": PRINT#8,"1"
130 FOR a=0 TO 230 STEP stp
140 PRINT#8,"D";a*SIN(a);",";a*COS(a): NEXT a
150 PRINT#8,"A": GOTO 20

AA

★ PUBLISHERS: The Amstrad User (Australia) , Amstrad Action (UK)
★ YEARS: 1987 , 1988
★ CONFIG: AMSDOS + 64K
★ LANGUAGE:
★ LiCENCE: LISTING
★ AUTHOR: Paul Bridel
 

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

Lien(s):
» Coding Src's » Losange (CPC Infos)
» Coding Src's » Triangles (The Amstrad User)
» Coding Src's » Poussiere (CPC Infos)
» Coding Src's » Darwin Goes CPC (Schneider Aktiv)
» Coding Src's » Excat
» Coding Src's » Graphic - Vax Silly's Snowflake (Amstrad Computer User)
Je participe au site:

» 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 195 millisecondes et consultée 2181 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.