Home » Archimedes archive » Acorn User » AU 1993-05 (2).adf » !StarInfo/Files/HSVcone

!StarInfo/Files/HSVcone

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 » Acorn User » AU 1993-05 (2).adf
Filename: !StarInfo/Files/HSVcone
Read OK:
File size: 02A4 bytes
Load address: FFFFFB44
Exec address: 78BC986E
Duplicates

There is 1 duplicate copy of this file in the archive:

File contents
   10REM     >HSVcone (Info4)
   20REM By  DCA
   30REM For 32-bit machines (RO3.1)
   40REM (c) BAU May 1993
   50:
   60MODE 15
   70OFF
   80SYS "OS_SWINumberFromString",,"ColourTrans_ConvertHSVToRGB" TO hsv_to_rgb%
   90SYS "OS_SWINumberFromString",,"ColourTrans_SetGCOL" TO set_gcol%
  100v_step=0.2
  110ORIGIN 640,1200
  120FOR v=v_step TO 1 STEP v_step
  130 s_step=0.05-0.035*v
  140 FOR s=s_step TO 1 STEP s_step
  150  h_step=3-2.5*v*s
  160  FOR h=0 TO 360-h_step STEP h_step
  170   SYS hsv_to_rgb%,h*&10000,s*&10000,v*&FF TO r%,g%,b%
  180   SYS set_gcol%,(r%<<8)+(g%<<16)+(b%<<24),,,&100,0
  190   x=s*v*500*COSRAD(h)
  200   z=2000+s*v*500*SINRAD(h)
  210   y=800*v-1200
  220   x1=2000*x/z
  230   y1=2000*y/z
  240   CIRCLE FILL x1,y1,4
  250  NEXT
  260 NEXT
  270NEXT
  280END

�     >HSVcone (Info4)

� By  DCA
!� For 32-bit machines (RO3.1)
(� (c) BAU May 1993
2:
<� 15
F�
PLș "OS_SWINumberFromString",,"ColourTrans_ConvertHSVToRGB" � hsv_to_rgb%
ZBș "OS_SWINumberFromString",,"ColourTrans_SetGCOL" � set_gcol%
dv_step=0.2
nȑ 640,1200
x� v=v_step � 1 � v_step
� s_step=0.05-0.035*v
� � s=s_step � 1 � s_step
�  h_step=3-2.5*v*s
�!  � h=0 � 360-h_step � h_step
�8   ș hsv_to_rgb%,h*&10000,s*&10000,v*&FF � r%,g%,b%
�6   ș set_gcol%,(r%<<8)+(g%<<16)+(b%<<24),,,&100,0
�   x=s*v*500*��(h)
�   z=2000+s*v*500*��(h)
�   y=800*v-1200
�   x1=2000*x/z
�   y1=2000*y/z
�   ȏ Ȑ x1,y1,4
�  �
 �
�
�
�
00000000  0d 00 0a 1a f4 20 20 20  20 20 3e 48 53 56 63 6f  |.....     >HSVco|
00000010  6e 65 20 28 49 6e 66 6f  34 29 0d 00 14 0d f4 20  |ne (Info4)..... |
00000020  42 79 20 20 44 43 41 0d  00 1e 21 f4 20 46 6f 72  |By  DCA...!. For|
00000030  20 33 32 2d 62 69 74 20  6d 61 63 68 69 6e 65 73  | 32-bit machines|
00000040  20 28 52 4f 33 2e 31 29  0d 00 28 16 f4 20 28 63  | (RO3.1)..(.. (c|
00000050  29 20 42 41 55 20 4d 61  79 20 31 39 39 33 0d 00  |) BAU May 1993..|
00000060  32 05 3a 0d 00 3c 08 eb  20 31 35 0d 00 46 05 87  |2.:..<.. 15..F..|
00000070  0d 00 50 4c c8 99 20 22  4f 53 5f 53 57 49 4e 75  |..PL.. "OS_SWINu|
00000080  6d 62 65 72 46 72 6f 6d  53 74 72 69 6e 67 22 2c  |mberFromString",|
00000090  2c 22 43 6f 6c 6f 75 72  54 72 61 6e 73 5f 43 6f  |,"ColourTrans_Co|
000000a0  6e 76 65 72 74 48 53 56  54 6f 52 47 42 22 20 b8  |nvertHSVToRGB" .|
000000b0  20 68 73 76 5f 74 6f 5f  72 67 62 25 0d 00 5a 42  | hsv_to_rgb%..ZB|
000000c0  c8 99 20 22 4f 53 5f 53  57 49 4e 75 6d 62 65 72  |.. "OS_SWINumber|
000000d0  46 72 6f 6d 53 74 72 69  6e 67 22 2c 2c 22 43 6f  |FromString",,"Co|
000000e0  6c 6f 75 72 54 72 61 6e  73 5f 53 65 74 47 43 4f  |lourTrans_SetGCO|
000000f0  4c 22 20 b8 20 73 65 74  5f 67 63 6f 6c 25 0d 00  |L" . set_gcol%..|
00000100  64 0e 76 5f 73 74 65 70  3d 30 2e 32 0d 00 6e 0f  |d.v_step=0.2..n.|
00000110  c8 91 20 36 34 30 2c 31  32 30 30 0d 00 78 1b e3  |.. 640,1200..x..|
00000120  20 76 3d 76 5f 73 74 65  70 20 b8 20 31 20 88 20  | v=v_step . 1 . |
00000130  76 5f 73 74 65 70 0d 00  82 18 20 73 5f 73 74 65  |v_step.... s_ste|
00000140  70 3d 30 2e 30 35 2d 30  2e 30 33 35 2a 76 0d 00  |p=0.05-0.035*v..|
00000150  8c 1c 20 e3 20 73 3d 73  5f 73 74 65 70 20 b8 20  |.. . s=s_step . |
00000160  31 20 88 20 73 5f 73 74  65 70 0d 00 96 16 20 20  |1 . s_step....  |
00000170  68 5f 73 74 65 70 3d 33  2d 32 2e 35 2a 76 2a 73  |h_step=3-2.5*v*s|
00000180  0d 00 a0 21 20 20 e3 20  68 3d 30 20 b8 20 33 36  |...!  . h=0 . 36|
00000190  30 2d 68 5f 73 74 65 70  20 88 20 68 5f 73 74 65  |0-h_step . h_ste|
000001a0  70 0d 00 aa 38 20 20 20  c8 99 20 68 73 76 5f 74  |p...8   .. hsv_t|
000001b0  6f 5f 72 67 62 25 2c 68  2a 26 31 30 30 30 30 2c  |o_rgb%,h*&10000,|
000001c0  73 2a 26 31 30 30 30 30  2c 76 2a 26 46 46 20 b8  |s*&10000,v*&FF .|
000001d0  20 72 25 2c 67 25 2c 62  25 0d 00 b4 36 20 20 20  | r%,g%,b%...6   |
000001e0  c8 99 20 73 65 74 5f 67  63 6f 6c 25 2c 28 72 25  |.. set_gcol%,(r%|
000001f0  3c 3c 38 29 2b 28 67 25  3c 3c 31 36 29 2b 28 62  |<<8)+(g%<<16)+(b|
00000200  25 3c 3c 32 34 29 2c 2c  2c 26 31 30 30 2c 30 0d  |%<<24),,,&100,0.|
00000210  00 be 16 20 20 20 78 3d  73 2a 76 2a 35 30 30 2a  |...   x=s*v*500*|
00000220  9b b2 28 68 29 0d 00 c8  1b 20 20 20 7a 3d 32 30  |..(h)....   z=20|
00000230  30 30 2b 73 2a 76 2a 35  30 30 2a b5 b2 28 68 29  |00+s*v*500*..(h)|
00000240  0d 00 d2 13 20 20 20 79  3d 38 30 30 2a 76 2d 31  |....   y=800*v-1|
00000250  32 30 30 0d 00 dc 12 20  20 20 78 31 3d 32 30 30  |200....   x1=200|
00000260  30 2a 78 2f 7a 0d 00 e6  12 20 20 20 79 31 3d 32  |0*x/z....   y1=2|
00000270  30 30 30 2a 79 2f 7a 0d  00 f0 14 20 20 20 c8 8f  |000*y/z....   ..|
00000280  20 c8 90 20 78 31 2c 79  31 2c 34 0d 00 fa 07 20  | .. x1,y1,4.... |
00000290  20 ed 0d 01 04 06 20 ed  0d 01 0e 05 ed 0d 01 18  | ..... .........|
000002a0  05 e0 0d ff                                       |....|
000002a4