Home » Archimedes archive » Archimedes World » AW-1994-02-Disc1.adf » Disk1Feb94 » !AWFeb94/Goodies/Basic/Cubic/Rotate

!AWFeb94/Goodies/Basic/Cubic/Rotate

This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.

Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.

Tape/disk: Home » Archimedes archive » Archimedes World » AW-1994-02-Disc1.adf » Disk1Feb94
Filename: !AWFeb94/Goodies/Basic/Cubic/Rotate
Read OK:
File size: 028F bytes
Load address: 0000
Exec address: 0000
File contents
    1
    2MODE MODE
    3LIBRARY "PathLib:OS_units.Paths"
    4LIBRARY "PathLib:OS_units.Transforms"
    5ORIGIN 640,512
    6PROCCreate_Curve
    7PROCCreateTransform
    8PROCDrawObjects
    9END
   10
   11DEF PROCCreateTransform
   12 INPUT '"Number of rotations";n%
   13 PROCPath_CreateTransform(rotate%)
   14 PROCPath_Rotation(rotate%,PI/(2*n%))
   15ENDPROC
   16
   17DEF PROCDrawObjects  
   18 col%=0
   19 REPEAT
   20  FOR i%=1 TO n%
   21   SYS "Draw_Stroke",cubic%
   22   PROCPath_Transform(cubic%,rotate%)
   23   PRINT TAB(0,3);"Press space bar"
   24   x$=GET$
   25  NEXT
   26  col%+=1 : GCOL 1+col% MOD 6
   27  UNTIL FALSE      
   28ENDPROC
   29
   30DEF PROCCreate_Curve
   31PROCPath_ObjectBegin(cubic%,200)
   32  PROCPath_Move(0,0)
   33  PROCPath_Cubic(0,200,400,-200,400,0)
   34PROCPath_ObjectEnd
   35ENDPROC
   36

� �
ț "PathLib:OS_units.Paths"
$ț "PathLib:OS_units.Transforms"
ȑ 640,512
�Create_Curve
�CreateTransform
�DrawObjects
	�


� �CreateTransform
  � '"Number of rotations";n%

# �Path_CreateTransform(rotate%)
% �Path_Rotation(rotate%,�/(2*n%))
�

� �DrawObjects  
 col%=0
 �
  � i%=1 � n%
   ș "Draw_Stroke",cubic%
&   �Path_Transform(cubic%,rotate%)
    � �0,3);"Press space bar"
   x$=�
  �
  col%+=1 : � 1+col% � 6
  � �      
�

� �Create_Curve
!�Path_ObjectBegin(cubic%,200)
   �Path_Move(0,0)
!'  �Path_Cubic(0,200,400,-200,400,0)
"�Path_ObjectEnd
#�
$
�
00000000  0d 00 01 04 0d 00 02 07  eb 20 eb 0d 00 03 1f c8  |......... ......|
00000010  9b 20 22 50 61 74 68 4c  69 62 3a 4f 53 5f 75 6e  |. "PathLib:OS_un|
00000020  69 74 73 2e 50 61 74 68  73 22 0d 00 04 24 c8 9b  |its.Paths"...$..|
00000030  20 22 50 61 74 68 4c 69  62 3a 4f 53 5f 75 6e 69  | "PathLib:OS_uni|
00000040  74 73 2e 54 72 61 6e 73  66 6f 72 6d 73 22 0d 00  |ts.Transforms"..|
00000050  05 0e c8 91 20 36 34 30  2c 35 31 32 0d 00 06 11  |.... 640,512....|
00000060  f2 43 72 65 61 74 65 5f  43 75 72 76 65 0d 00 07  |.Create_Curve...|
00000070  14 f2 43 72 65 61 74 65  54 72 61 6e 73 66 6f 72  |..CreateTransfor|
00000080  6d 0d 00 08 10 f2 44 72  61 77 4f 62 6a 65 63 74  |m.....DrawObject|
00000090  73 0d 00 09 05 e0 0d 00  0a 04 0d 00 0b 16 dd 20  |s.............. |
000000a0  f2 43 72 65 61 74 65 54  72 61 6e 73 66 6f 72 6d  |.CreateTransform|
000000b0  0d 00 0c 20 20 e8 20 27  22 4e 75 6d 62 65 72 20  |...  . '"Number |
000000c0  6f 66 20 72 6f 74 61 74  69 6f 6e 73 22 3b 6e 25  |of rotations";n%|
000000d0  0d 00 0d 23 20 f2 50 61  74 68 5f 43 72 65 61 74  |...# .Path_Creat|
000000e0  65 54 72 61 6e 73 66 6f  72 6d 28 72 6f 74 61 74  |eTransform(rotat|
000000f0  65 25 29 0d 00 0e 25 20  f2 50 61 74 68 5f 52 6f  |e%)...% .Path_Ro|
00000100  74 61 74 69 6f 6e 28 72  6f 74 61 74 65 25 2c af  |tation(rotate%,.|
00000110  2f 28 32 2a 6e 25 29 29  0d 00 0f 05 e1 0d 00 10  |/(2*n%))........|
00000120  04 0d 00 11 14 dd 20 f2  44 72 61 77 4f 62 6a 65  |...... .DrawObje|
00000130  63 74 73 20 20 0d 00 12  0b 20 63 6f 6c 25 3d 30  |cts  .... col%=0|
00000140  0d 00 13 06 20 f5 0d 00  14 11 20 20 e3 20 69 25  |.... .....  . i%|
00000150  3d 31 20 b8 20 6e 25 0d  00 15 1e 20 20 20 c8 99  |=1 . n%....   ..|
00000160  20 22 44 72 61 77 5f 53  74 72 6f 6b 65 22 2c 63  | "Draw_Stroke",c|
00000170  75 62 69 63 25 0d 00 16  26 20 20 20 f2 50 61 74  |ubic%...&   .Pat|
00000180  68 5f 54 72 61 6e 73 66  6f 72 6d 28 63 75 62 69  |h_Transform(cubi|
00000190  63 25 2c 72 6f 74 61 74  65 25 29 0d 00 17 20 20  |c%,rotate%)...  |
000001a0  20 20 f1 20 8a 30 2c 33  29 3b 22 50 72 65 73 73  |  . .0,3);"Press|
000001b0  20 73 70 61 63 65 20 62  61 72 22 0d 00 18 0b 20  | space bar".... |
000001c0  20 20 78 24 3d be 0d 00  19 07 20 20 ed 0d 00 1a  |  x$=.....  ....|
000001d0  1c 20 20 63 6f 6c 25 2b  3d 31 20 3a 20 e6 20 31  |.  col%+=1 : . 1|
000001e0  2b 63 6f 6c 25 20 83 20  36 0d 00 1b 0f 20 20 fd  |+col% . 6....  .|
000001f0  20 a3 20 20 20 20 20 20  0d 00 1c 05 e1 0d 00 1d  | .      ........|
00000200  04 0d 00 1e 13 dd 20 f2  43 72 65 61 74 65 5f 43  |...... .Create_C|
00000210  75 72 76 65 0d 00 1f 21  f2 50 61 74 68 5f 4f 62  |urve...!.Path_Ob|
00000220  6a 65 63 74 42 65 67 69  6e 28 63 75 62 69 63 25  |jectBegin(cubic%|
00000230  2c 32 30 30 29 0d 00 20  15 20 20 f2 50 61 74 68  |,200).. .  .Path|
00000240  5f 4d 6f 76 65 28 30 2c  30 29 0d 00 21 27 20 20  |_Move(0,0)..!'  |
00000250  f2 50 61 74 68 5f 43 75  62 69 63 28 30 2c 32 30  |.Path_Cubic(0,20|
00000260  30 2c 34 30 30 2c 2d 32  30 30 2c 34 30 30 2c 30  |0,400,-200,400,0|
00000270  29 0d 00 22 13 f2 50 61  74 68 5f 4f 62 6a 65 63  |).."..Path_Objec|
00000280  74 45 6e 64 0d 00 23 05  e1 0d 00 24 04 0d ff     |tEnd..#....$...|
0000028f