IN the March 1987 issue of Computing with the Amstrad an article by Ian Sharpe showed how to produce a dragon curve using a recursive technique. The members of a different kind of dragon curve can be generated using the short program given here. Each curve in the series can be represented by a string of 1s and Os, where 1 defines a 90 degree curve to the right and 0 defines a 90 degree curve to the left. You can see the idea in Figure I. The program first generates the Os and 1s for the chosen curve, putting them in the array j1. Then the curve is plotted. As the order of the curve increases, so the curve becomes more complex, snaking all over the screen. Amazingly, it never crosses itself. The curve is plotted a second time, beginning at the same starting point but rotated through 90 degrees. The second curve fits snugly against the first, interlocking like a jigsaw puzzle. Two more plots can be drawn, each rotated through 90 degrees to complete the pattern. Curves with an order between 6 and 10 produce the best pictures. Higher order curves take a long time to finish and spill off the edges of the screen.  Figure I: The first four dragon curves
CWTA
| ★ AMSTRAD CPC ★ DOWNLOAD ★ |
|
|
CPCrulez[Content Management System] v8.732-desktop/c Page créée en 360 millisecondes et consultée 1202 foisL'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. |
|