home *** CD-ROM | disk | FTP | other *** search
/ APDL Public Domain 1 / APDL_PD1A.iso / customise / texturgdn / !TexturGdn / Docs / Language < prev    next >
Encoding:
Text File  |  1996-10-12  |  55.2 KB  |  1,608 lines

  1.  
  2.          Texture Garden texture generation language specification
  3.          ========================================================
  4.            
  5.     This file documents version 0.47 of the texture generation language
  6.           This is distributed with Texture Garden version 0.47.
  7.  
  8. 1.00 Introduction
  9. 1.10 The format of this file
  10. 2.00 Writing textures
  11. 2.10 Syntactic considerations
  12. 3.00 Command summary (commands grouped by class)
  13. 4.00 Command details (commands grouped by class)
  14.  
  15. 1.00 Introduction
  16. ~~~~~~~~~~~~~~~~~
  17. The Language:
  18.  
  19. When editing texture generation programs, some syntactical rules need to be
  20. borne in mind.  The language is a compromise between three design criteria:
  21.  
  22. 1: That it should be readable by a human
  23. 2: That it should be editable by the computer.
  24. 3: That it should go like the clappers.
  25.  
  26. Compactness was not considered to be particularly important. 
  27. Characteristically commands are verbose.  It is recommended that typing in
  28. commands using longhand is to be avoided and that cut and paste facilities
  29. are employed wherever possible.
  30.  
  31. When loaded, commands are translated into an internal format and the original
  32. textfile is discarded.  Loaded files may contain command names in any case,
  33. truncated names, commands optionally abbreviated with the "." character,
  34. confused and confusing punctuation and mismatched brackets.  When the file is
  35. saved, it is cleaned up, reformatted and expanded into a standard format. 
  36. Unless you know what you are doing, keeping copies of the original files is
  37. recommended, as What The Computer Thinks You Are Talking About may initially
  38. differ from What You Are Trying To Say.
  39.  
  40. Error checking is currently implemented mainly at the parsing stage.  If the
  41. program you feed the computer contains errors, a message will tell you
  42. which line they are found on.  These messages should be helpful in the
  43. process of tracking down mistakes.  Runtime error messages are also possible,
  44. but should occur rarely in practise.
  45.  
  46. If your version of this program is unregistered, then you will probably
  47. experience difficulties in changing existing textures or getting your own
  48. textures to be displayed.  Please refer to the "Register" document for
  49. details of why this occurs.
  50.  
  51. Resources:
  52.  
  53. There are currently several main resources available for use in generating
  54. textures.  The texture generation program "sees" a virtual machine with a
  55. variety of storage media and one primary output channel.
  56.  
  57. There are three one dimensional buffers of &400 16-bit values which may be
  58. manipulated.   One two dimensional buffer is provided, with dimensions
  59. controlled by the size of the sprite to be generated.  A buffer for storing
  60. colourmaps exists and there is space reserved for the manipulation of &400
  61. variables.  These contain unspecified values on entry to the routine.
  62.  
  63. Texture generation programs are entered when a texture is required.  Their
  64. execution begins at their first line.
  65.  
  66. 1.10 The format of this file
  67. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  68. In the command summary which follows, each command is named and then it is
  69. followed by a string in brackets indicating what kind of parameters it takes.
  70. If there are no brackets then the command takes no parameters.  In the second
  71. part of the document, descriptions of the operation of each of the commands
  72. are also given.
  73.  
  74. Comments are considered to be anything after a "|" character.  Comments in
  75. If...Then...Else lines are treated using the same conventions as in Obey
  76. files, i.e. "If 1 = 2 THEN |ECHO Equal! ELSE ECHO Not_Equal!" would print
  77. "Not_Equal!" in an Obey file, despite the earlier "|".
  78.  
  79. 2.00 Writing textures
  80. ~~~~~~~~~~~~~~~~~~~~~
  81. Conventions:
  82.  
  83. All textures should begin with a definition of their primary palette enclosed
  84. by the commands "StartColourDefinition" and "EndColourDefinition".
  85.  
  86. Textures terminate when they reach the "End" command.  It is conventional to
  87. place subroutine definitions after the "End" so they are separate from the
  88. main program.  The mutator may rely on this in the future.
  89.  
  90. 2.00 Syntactic considerations
  91. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  92. Essentially, the syntax of the language is simple.  
  93.  
  94. Everything falls into one of four categories.
  95.  
  96. These four categories are: Comments, Commands, Functions and Parameters.
  97.  
  98. Comments are simple: they are considered to be anything after a "|"
  99. character.
  100.  
  101. Commands come in three types: Conditional, Ordinary and Branch commands.
  102.  
  103. Conditionals have the form: "If <Condition> Then <Command> Else <Command>". 
  104. The "Until <Condition>" command also comes into this category.
  105.  
  106. Ordinary commands normally appear at the start of each line.  They may have
  107. zero or more parameters.  If they have parameters then these are enclosed in
  108. brackets.
  109.  
  110. Branch related commands come in several types.  "Define <DefinitionMarker>"
  111. sets a named mark at a point in the file, "Call <DefinitionMarker>" calls the
  112. relevant "Define" and continues until a "Return" is encountered. 
  113. "Goto <DefinitionMarker>" simply continues execution from the relevant
  114. "Define".
  115.  
  116. Functions may be given instead of parameters.  They should never appear at
  117. the start of a line.  Functions are defined over the domain (&0000-&FFFF). 
  118. They generally range over (&0000-&FFFF).  That they have the same range as
  119. their domains means that it is convenient to feed the results of functions
  120. to other functions as parameters.
  121.  
  122. Parameters may cover the range from &0000 to &FFFF.  They may be given as
  123. signed or unsigned, decimal or hexadecimal (with a preceding "&") integers. 
  124. Where a parameter is required, this may be given as a constant numerical
  125. value or as a function.  Variables may be used and are implemented as simple
  126. functions.
  127.  
  128. Textures are not especially sensitive to punctuation mistakes, spaces, or
  129. other idiosyncrasies.  If brackets are mismatched, the program guesses where
  130. they should be and inserts them.  This is useful when editing textures in a
  131. text editor.
  132.  
  133. 3.00 Command summary (commands grouped by class)
  134. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  135. 01 Functions
  136. ~~~~~~~~~~~~
  137. Combine(Type,A,B)
  138. ScaledSignedMultiply(A,B)
  139. SignedMultiply(A,B)
  140. PartlyScaledSignedMultiply(A,B)
  141. PartlyScaledMultiply(A,B)
  142. Divide(Numerator,Denominator)
  143. Eor(A,B)
  144. And(A,B)
  145. Or(A,B)
  146. Absolute(A)
  147. LogicalShiftLeft(A,Exponent)
  148. LogicalShiftRight(A,Exponent)
  149. ArithmeticShiftLeft(A,Exponent)
  150. ArithmeticShiftRight(A,Exponent)
  151. Variable(Variable_Number)
  152. Random(And_value,Eor_value)
  153.  
  154. 02 Types
  155. ~~~~~~~~
  156. SimpleAddition
  157. UnboundedAddition
  158. CeilingAddition
  159. HalvingAddition
  160. SimpleSubtraction
  161. UnboundedSubtraction
  162. FloorSubtraction
  163. HalvingSubtraction
  164. Maximise
  165. Minimise
  166. Overwrite
  167. PositiveOverwrite
  168. Preserve
  169. Multiplication
  170. ScaledMultiplication
  171. Zeroise
  172.  
  173. 03 Constants
  174. ~~~~~~~~~~~~
  175. True
  176. False
  177. Zero
  178. Ninety
  179. OneHundredAndEighty
  180. TwoHundredandSeventy
  181. FloydSteinberg
  182.  
  183. 04 Variables
  184. ~~~~~~~~~~~~
  185. X
  186. Y
  187. Z
  188. Size
  189. LogSize
  190. LogBitsPerPixel
  191. AnimationFrameNumber
  192. AnimationType(Frequency)
  193.  
  194. Sin(Theta)
  195. Cos(Theta)
  196. SignedSin(Theta)
  197. SignedCos(Theta)
  198. SquareRoot(Value)
  199.  
  200. 05 Section of Functions of X and Y
  201. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  202. Noise(Intensity,MaximumFrequency)
  203. PinkNoise(Intensity,MaximumFrequency)
  204. QuickNoise(Intensity,MaximumFrequency)
  205. BandpassNoise(Intensity,MinimumFrequency,MaximumFrequency)
  206. BandpassQuickNoise(Intensity,MinimumFrequency,MaximumFrequency)
  207. FractalNoise(MaximumIntensity,FractalDimension)
  208. ShiftedSymmetricNoise(Intensity,MaximumFrequency,X,Y)
  209. ShiftedSymmetricPinkNoise(Intensity,MaximumFrequency,X,Y)
  210. ShiftedNoise(Intensity,MaximumFrequency,X,Y)
  211. ShiftedPinkNoise(Intensity,MaximumFrequency,X,Y)
  212. ShiftedSymmetricQuickNoise(Intensity,MaximumFrequency,X,Y)
  213. ShiftedQuickNoise(Intensity,MaximumFrequency,X,Y)
  214. ShiftedSymmetricFractalNoise(MaximumIntensity,FractalDimension,X,Y)
  215. ShiftedFractalNoise(Intensity,MaximumFrequency,X,Y)
  216.  
  217. TwoDimensionalPoint(X,Y)
  218. OneDimensionalPoint(X)
  219. OneDimensionalPointOne(X)
  220. OneDimensionalPointTwo(X)
  221. QuickTwoDimensionalPoint(X,Y)
  222. QuickOneDimensionalPoint(X)
  223. QuickOneDimensionalPointOne(X)
  224. QuickOneDimensionalPointTwo(X)
  225.  
  226. 06 Miscellaneous
  227. ~~~~~~~~~~~~~~~~
  228. Beep
  229. Bell
  230. End
  231. Checksum(Value)
  232. UnknownCommand
  233.  
  234. 07 Conditional
  235. ~~~~~~~~~~~~~~
  236. If <Condition> Then <Command> Else <Command>...
  237.  
  238. IsLessThan(A,B)
  239. IsGreaterThan(A,B)
  240. IsLessThanOrEqualTo(A,B)
  241. IsGreaterThanOrEqualTo(A,B)
  242. SignedIsLessThan(A,B)
  243. SignedIsGreaterThan(A,B)
  244. SignedIsLessThanOrEqualTo(A,B)
  245. SignedIsGreaterThanOrEqualTo(A,B)
  246. IsEqualTo(A,B)
  247. IsNotEqualTo(A,B)
  248.  
  249. 08 Mutation
  250. ~~~~~~~~~~~
  251. StopMutating
  252. StartMutating
  253.  
  254. 09 Animation
  255. ~~~~~~~~~~~~
  256. StartAnimating
  257. StopAnimating
  258.  
  259. 10 Graphical output
  260. ~~~~~~~~~~~~~~~~~~~
  261. MakeSprite
  262. AddToSprite
  263. MakeVirtualSprite(Type_R,Type_G,Type_B)
  264. MakeSpriteFromVirtualSprite
  265. TruncateSpriteVertically(Bottom,Top)
  266. TruncateSpriteHorizontally(Left,Right)
  267. ResizeSprite(XFactor,YFactor)
  268.  
  269. 11 Fourier Transform related
  270. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  271. CreateTwoDimensionalFilter(Filter_Description)
  272. TwoDimensionalTransform
  273. SmoothTwoDimensionalTransform
  274. CreateOneDimensionalFilter(Filter_Description)
  275. OneDimensionalTransform
  276. SmoothOneDimensionalTransform
  277.  
  278. 12 Variable Setting
  279. ~~~~~~~~~~~~~~~~~~~
  280. SetVariable(Variable_Number,Value)
  281. SetAnimationFrameNumber(Value)
  282.  
  283. Seed(Value)
  284. RestoreArtefactsFlags
  285. Phase(Value)
  286. NoiseToBeFiltered(Value)
  287. CreateCosineSymmetry
  288. CreateSineSymmetry
  289. CreateCosineArtefacts(Value)
  290. CreateSineArtefacts(Value)
  291. AbandonCosinePhase
  292. AbandonSinePhase
  293.  
  294. 13 Dithering
  295. ~~~~~~~~~~~~
  296. Dithering(Value)
  297. DitheringOne(Value)
  298. DitheringTwo(Value)
  299.  
  300. 14 Processing
  301. ~~~~~~~~~~~~~
  302. OneDimensionalProcess(X1,X2,Function,Type)
  303. TwoDimensionalProcess(X1,X2,Y1,Y2,Function,Type)
  304. OneDimensionalFilter(Left,Centre,Right,Type)
  305. TwoDimensionalFilter(Top_Left,Top_Centre,Top_Right,Middle_Left,Middle_Centre,
  306.   Middle_Right,Bottom_Left,Bottom_Centre,Bottom_Right,Type)
  307. TwoDimensionalContrast(Value)
  308. OneDimensionalContrast(Value)
  309. OneDimensionalFlood(Threshold,Multiplier,Value,Type)
  310. TwoDimensionalFlood(Threshold,Multiplier,Value,Type)
  311. OneDimensionalEqualization
  312. TwoDimensionalEqualization
  313. TwoDimensionalInversion
  314. OneDimensionalInversion
  315. GenerateOneDimensionalDust(Threshold,NewValue,Type)
  316. GenerateTwoDimensionalDust(Threshold,NewValue,Type)
  317. TwoDimensionalClear
  318. OneDimensionalClear
  319. DefineSolidBlock(Block_Description)
  320. Sculpture(Path_of_X,Path_of_Y,Path_of_Z)
  321. Resize(XFactor,YFactor)
  322.  
  323. 15 Linear segments
  324. ~~~~~~~~~~~~~~~~~~
  325. LinearField(Y1,Y2)
  326. LinearFieldSegment(H1,H2,X1,X2,Type)
  327. Rectangle(I,X1,X2,Y1,Y2,Type)
  328.  
  329. 16 Shifting
  330. ~~~~~~~~~~~
  331. OneDimensionalShift(Delta_X,Type)
  332. TwoDimensionalShift(Delta_X,Delta_Y,Type)
  333.  
  334. 17 Rotation
  335. ~~~~~~~~~~~
  336. QuickRotate(Theta,Type)
  337. Rotate(Theta,Type)
  338. SlowRotate(Theta,Type)
  339. RotateAbout(Theta,X,Y,Type)
  340. SlowRotateAbout(Theta,X,Y,Type)
  341.  
  342. 18 Loops
  343. ~~~~~~~~
  344. Repeat
  345. Until(Condition)
  346. For(Number_of_times_to_loop)
  347. Next
  348.  
  349. 19 Buffer manipulation
  350. ~~~~~~~~~~~~~~~~~~~~~~
  351. OneDimensionalStoreBufferOne
  352. OneDimensionalStoreBufferTwo
  353. OneDimensionalSwapBufferOne
  354. OneDimensionalSwapBufferTwo
  355. OneDimensionalMaskBufferOne(Type)
  356. TwoDimensionalStore
  357. TwoDimensionalSwap
  358. TwoDimensionalMask(Type)
  359.  
  360. 20 Waves and Distortions
  361. ~~~~~~~~~~~~~~~~~~~~~~~~
  362. VerticalDistortion(Type)
  363. HorizontalDistortion(Type)
  364. HorizontalWaveWarp(Type)
  365. VerticalWaveWarp(Type)
  366. HorizontalWaves(Type)
  367. VerticalWaves(Type)
  368.  
  369. 21 Colour related
  370. ~~~~~~~~~~~~~~~~~
  371. StartColourDefinition
  372. EndColourDefinition
  373. CreateColoursUsingRGBData
  374. CreateColoursUsingHSVData
  375. CreateColoursUsingCIEData
  376.  
  377. 22 Mirroring, Flipping and Shearing
  378. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  379. HorizontalMirror(Type)
  380. VerticalMirror(Type)
  381. LeadingDiagonalMirror(Type)
  382. TrailingDiagonalMirror(Type)
  383. HorizontalShear(Size,Type)
  384. VerticalShear(Size,Type)
  385.  
  386. 23 Blobbing
  387. ~~~~~~~~~~~
  388. Ripples(Intensity,Radius,X,Y,Type)
  389. Radials(Intensity,Radius,X,Y,Type,TypeTwo)
  390.  
  391. 24 Branching
  392. ~~~~~~~~~~~~
  393. Define <DefinitionMarker>
  394. Goto <DefinitionMarker>
  395. Call <DefinitionMarker>
  396. Return
  397.  
  398. 4.00 Command details (commands grouped by class)
  399. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  400.                        01 Section of Functions
  401.                        =======================
  402.  
  403. Combine(Type,A,B)
  404. ~~~~~~~~~~~~~~~~~
  405. This function combines the values of A and B according to the rule described
  406. by the "Type" given.  This type may be expressed as one of the following:
  407.  
  408. SimpleAddition, UnboundedAddition, CeilingAddition, HalvingAddition,
  409. SimpleSubtraction, UnboundedSubtraction, FloorSubtraction,
  410. HalvingSubtraction, Maximise,Minimise, Overwrite, PositiveOverwrite,
  411. Preserve, Multiplication or ScaledMultiplication.
  412.  
  413. These are described in the section on types below.  Alternatively, A number
  414. or expression may be given.  Please refer to the types section which contains
  415. technical details on this.
  416.  
  417. ScaledSignedMultiply(A,B)
  418. ~~~~~~~~~~~~~~~~~~~~~~~~~
  419. Function returning the value of (A * B) << 16, treating A and B as signed
  420. integers.
  421.  
  422. SignedMultiply(A,B)
  423. ~~~~~~~~~~~~~~~~~~~
  424. Function returning the value of A * B, treating A and B as signed integers.
  425.  
  426. PartlyScaledSignedMultiply(A,B)
  427. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  428. Function returning the value of (A * B) << 8, treating A and B as signed
  429. integers.
  430.  
  431. PartlyScaledMultiply(A,B)
  432. ~~~~~~~~~~~~~~~~~~~~~~~~~
  433. Function returning the value of (A * B) << 8.
  434.  
  435. Divide(Numerator,Denominator)
  436. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  437. Function returning the value of Integer(Numerator / Denominator)
  438.  
  439. Eor(A,B)
  440. ~~~~~~~~
  441. Function returning the value of A Exclusive_Or B.
  442.  
  443. And(A,B)
  444. ~~~~~~~~
  445. Function returning the value of A And B (bitwise AND).
  446.  
  447. Or(A,B)
  448. ~~~~~~~
  449. Function returning the value of A Or B (bitwise OR).
  450.  
  451. Absolute(A)
  452. ~~~~~~~~~~~
  453. IF A < &8000 THEN returns A ELSE returns A Exclusive_Or &FFFF.
  454.  
  455. LogicalShiftLeft(A,Exponent)
  456. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  457. Function returning the value of A * 2^Exponent (A << Exponent).
  458.  
  459. LogicalShiftRight(A,Exponent)
  460. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  461. Function returning the value of Integer(A / 2^Exponent) (A >> Exponent).
  462.  
  463. ArithmeticShiftLeft(A,Exponent)
  464. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  465. Function returning the value of A * 2^Exponent (A << Exponent).
  466.  
  467. ArithmeticShiftRight(A,Exponent)
  468. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  469. Function returning the value of A / 2^Exponent treating A as a signed
  470. integer.
  471.  
  472. Variable(Variable_Number)
  473. ~~~~~~~~~~~~~~~~~~~~~~~~~
  474. Returns the value of the <Variable_Number>th system variable.
  475.  
  476. Random(And_value,Eor_value)
  477. ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  478. Function returning the value of a 16-bit system random number generator ANDed
  479. with <And_value> and then EORed with <Eor_value>.
  480.  
  481. Sin(Theta)
  482. ~~~~~~~~~~
  483. Returns ((Sin of <Theta>) + 0.5) * &8000.
  484.  
  485. Cos(Theta)
  486. ~~~~~~~~~~
  487. Returns ((Sin of <Theta>) + 0.5) * &8000.
  488.  
  489. SignedSin(Theta)
  490. ~~~~~~~~~~~~~~~~
  491. Returns (Sin of <Theta>) * &8000.
  492.  
  493. SignedCos(Theta)
  494. ~~~~~~~~~~~~~~~~
  495. Returns (Sin of <Theta>) * &8000.
  496.  
  497. SquareRoot(Value)
  498. ~~~~~~~~~~~~~
  499. Returns the square root of Value.
  500.  
  501.                       02 Section of Types
  502.                       ===================
  503.  
  504. Types govern how two parameters are combined with one another.  Precicely
  505. which two parameters it refers to depends on the function using it.  Often, a
  506. process will perform some calculation on the value of a function at a point
  507. and then recombine this with the original value at that point before using
  508. its result.
  509.  
  510. In the following description of the common Types, A and B are used to
  511. describe the two values to be combined.
  512.  
  513. SimpleAddition
  514. ~~~~~~~~~~~~~~
  515. IF A + B < &10000 THEN returns (A + B) ELSE returns &20000 - (A + B).
  516.  
  517. This produces an effect like a ball bouncing off a ceiling (ahem).
  518.  
  519. UnboundedAddition
  520. ~~~~~~~~~~~~~~~~~
  521. Returns (A + B) And &FFFF.
  522.  
  523. CeilingAddition
  524. ~~~~~~~~~~~~~~~
  525. IF A + B < &10000 THEN returns (A + B) ELSE returns &FFFF.
  526.  
  527. HalvingAddition
  528. ~~~~~~~~~~~~~~~
  529. Returns (A + B) DIV 2 (A and B are considered unsigned).
  530.  
  531. SimpleSubtraction
  532. ~~~~~~~~~~~~~~~~~
  533. IF A - B > 0 THEN returns (A - B) ELSE returns (B - A).
  534.  
  535. This produces an effect like a ball bouncing off a floor.
  536.  
  537. UnboundedSubtraction
  538. ~~~~~~~~~~~~~~~~~~~~
  539. Returns (A - B) And &FFFF.
  540.  
  541. FloorSubtraction
  542. ~~~~~~~~~~~~~~~~
  543. IF A - B > 0 THEN returns (A - B) ELSE returns 0.
  544.  
  545. HalvingSubtraction
  546. ~~~~~~~~~~~~~~~~~~
  547. Returns (A - B) DIV 2 (A and B are considered unsigned).
  548.  
  549. Maximise
  550. ~~~~~~~~
  551. Returns the greater of A and B (A and B are considered unsigned).
  552.  
  553. Minimise
  554. ~~~~~~~~
  555. Returns the lesser of A and B (A and B are considered unsigned).
  556.  
  557. Overwrite
  558. ~~~~~~~~~
  559. Returns B.
  560.  
  561. PositiveOverwrite
  562. ~~~~~~~~~~~~~~~~~
  563. Returns (B EOR &8000).
  564.  
  565. Preserve
  566. ~~~~~~~~
  567. Returns A.
  568.  
  569. Multiplication
  570. ~~~~~~~~~~~~~~
  571. Returns A * B And &FFFF.
  572.  
  573. ScaledMultiplication
  574. ~~~~~~~~~~~~~~~~~~~~
  575. Returns ((A * B) DIV &10000) And &FFFF.
  576.  
  577. Zeroise
  578. ~~~~~~~
  579. Returns 0.
  580.                          03 Section of Constants
  581.                          =======================
  582.  
  583. True
  584. ~~~~
  585. Returns &FFFF.
  586.  
  587. False
  588. ~~~~~
  589. Returns 0.
  590.  
  591. Zero
  592. ~~~~
  593. Returns 0.
  594.  
  595. Ninety
  596. ~~~~~~
  597. Returns &4000.
  598.  
  599. OneHundredAndEighty
  600. ~~~~~~~~~~~~~~~~~~~
  601. Returns &8000.
  602.  
  603. TwoHundredandSeventy
  604. ~~~~~~~~~~~~~~~~~~~~
  605. Returns &C000.  These commands are useful in connection with "Rotate".  They
  606. are not affected by the mutation engine.
  607.  
  608. FloydSteinberg
  609. ~~~~~~~~~~~~~~
  610. Returns &FEBE (from "FloydstEinBErg").  Not currently used.
  611.  
  612.                           04 Section of Variables
  613.                           =======================
  614.  
  615. X
  616. ~
  617. Y
  618. ~
  619. Z
  620. ~
  621. Return X, Y, and Z in appropriate situations.  In OneDimensional commands, Y
  622. is always 0.  Z should not be used, except in "DefineSolidBlock" commands.
  623.  
  624. Size
  625. ~~~~
  626. Returns the size at which the texture is being generated.  This should not
  627. normally be referred to.
  628.  
  629. LogSize
  630. ~~~~~~~
  631. Returns the size at which the texture is being generated.  This should not
  632. normally be referred to.
  633.  
  634. LogBitsPerPixel
  635. ~~~~~~~~~~~~~~~
  636. Returns the log in base 2 of the number of bits-per-pixel in the screen mode
  637. in which the texture is being generated.  This may be usefully referred to
  638. when choosing dithering patterns for the texture: e.g.
  639.  
  640. AnimationFrameNumber
  641. ~~~~~~~~~~~~~~~~~~~~
  642. Returns the number of the animation frame currently being generated.
  643. This is only of interest if the texture is to be animated.
  644.  
  645. AnimationType(Frequency)
  646. ~~~~~~~~~~~~~~~~~~~~~~~~
  647. Returns the value of the corresponding value to Frequency in the buffer
  648. controlling the type of animation to be used.  This buffer can be thought of
  649. as containing 1024 signed 4-bit values, controlling the way in which various
  650. frequencires in the texture are animated.  This should only normally be
  651. referred to if the texture is to be animated.  If the texture is not being
  652. animated and the "Use animation type" option is not on then it returns 0.
  653.  
  654.                   05 Section of Functions of X and Y
  655.                   ==================================
  656.  
  657. These functions are functions of X and Y as well as their parameters.  They
  658. are mainly used for creating filters.  Using a command like
  659. "CreateTwoDimensionalFilter".  Filters are usually used to filter random
  660. noise with the result then being inverse-fourier-transform'd.  The
  661. descriptions of the functions describe what they look like when viewed in the
  662. frequency domain.  Descriptions in three dimensions use the convention of
  663. describing the value of the function at a point as its "height" at that
  664. point.
  665.  
  666. Noise(Intensity,MaximumFrequency)
  667. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  668. The plan view of this function looks like a circle about the origin.  In
  669. three dimensions it looks like a cylindrical tin can of height H = Intensity.
  670.  
  671. PinkNoise(Intensity,MaximumFrequency)
  672. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  673. The plan view of this function looks like a circle about the origin.  It
  674. fades towards the edges and may be visualised in three dimensions as a cone
  675. or "witches hat" of height H = Intensity.
  676.  
  677. QuickNoise(Intensity,MaximumFrequency)
  678. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  679. The plan view of this function looks like a square about the origin.  In
  680. three dimensions it looks like  a square office block of height
  681. H = Intensity.
  682.  
  683. BandpassNoise(Intensity,MinimumFrequency,MaximumFrequency)
  684. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  685. The plan view of this function looks like a circle about the origin with its
  686. centre hollowed out.  In three dimensions it looks like a doughnut of height
  687. H = Intensity with sharp corners.
  688.  
  689. BandpassQuickNoise(Intensity,MinimumFrequency,MaximumFrequency)
  690. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  691. The plan view of this function looks like a square about the origin with its
  692. centre hollowed out.  In three dimensions it looks like a square office block
  693. with a square central courtyard.
  694.  
  695. FractalNoise(MaximumIntensity,FractalDimension)
  696. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  697. This function looks like a mountain whose sides follow the function
  698. H = FractalDimension/(RxR) where R is the distance from the origin.  The
  699. mountain is truncated at H = MaximumIntensity.
  700.  
  701. ShiftedNoise(Intensity,MaximumFrequency,X,Y)
  702. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  703. The plan view of this function looks like a circle centred at (X,Y).  In
  704. three dimensions it looks like a cylindrical tin can of height H = Intensity.
  705.  
  706. ShiftedPinkNoise(Intensity,MaximumFrequency,X,Y)
  707. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  708. The plan view of this function looks like a circle centred at (X,Y).  It
  709. fades towards the edges and may be visualised in three dimensions as a cone
  710. or "witches hat" of height H = Intensity.
  711.  
  712. ShiftedQuickNoise(Intensity,MaximumFrequency,X,Y)
  713. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  714. The plan view of this function looks like a square centred at (X,Y).  In
  715. three dimensions it looks like  a square office block of height
  716. H = Intensity.
  717.  
  718. ShiftedFractalNoise(Intensity,MaximumFrequency,X,Y)
  719. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  720. This function looks like a mountain whose sides follow the function
  721. H = FractalDimension/(RxR) where R is the distance from the point (X,Y).  The
  722. mountain is truncated at H = MaximumIntensity.
  723.  
  724. ShiftedSymmetricNoise(Intensity,MaximumFrequency,X,Y)
  725. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  726. The plan view of this function looks like four circles centred at (X,Y),
  727. (-X,Y), (X,-Y) and (-X,-Y).  In three dimensions it looks like four
  728. cylindrical tin cans of height H = Intensity.
  729.  
  730. ShiftedSymmetricPinkNoise(Intensity,MaximumFrequency,X,Y)
  731. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  732. The plan view of this function looks like four circles centred at (X,Y),
  733. (-X,Y), (X,-Y) and (-X,-Y).  They fade towards their edges and may be
  734. visualised in three dimensions as four cones or "witches hats" of height
  735. H = Intensity.
  736.  
  737. ShiftedSymmetricQuickNoise(Intensity,MaximumFrequency,X,Y)
  738. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  739. The plan view of this function looks like four squares centred at (X,Y),
  740. (-X,Y), (X,-Y) and (-X,-Y).  In three dimensions they look like four square
  741. office blocks of height H = Intensity.
  742.  
  743. ShiftedSymmetricFractalNoise(MaximumIntensity,FractalDimension,X,Y)
  744. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  745. This function looks like four mountains whose sides follow the function
  746. H = FractalDimension/(RxR) where R is the distance from the point (X,Y).  The
  747. mountains are symmetrical about the lines X = 0 and Y = 0.  The mountains are
  748. truncated at H = MaximumIntensity.
  749.  
  750. TwoDimensionalPoint(X,Y)
  751. ~~~~~~~~~~~~~~~~~~~~~~~~
  752. Returns the value or "height" at the point (X,Y).  This command and the three
  753. that follow it employ an anti-aliising technique to smooth sharp edges.
  754.  
  755. OneDimensionalPoint(X)
  756. ~~~~~~~~~~~~~~~~~~~~~~ Returns the value or "height" at the point (X) in the
  757. main one-dimensional buffer.
  758.  
  759. OneDimensionalPointOne(X)
  760. ~~~~~~~~~~~~~~~~~~~~~~~~~
  761. Returns the value or "height" at the point (X) in the first one-dimensional
  762. buffer.
  763.  
  764. OneDimensionalPointTwo(X)
  765. ~~~~~~~~~~~~~~~~~~~~~~~~~
  766. Returns the value or "height" at the point (X) in the second one-dimensional
  767. buffer.
  768.  
  769. QuickTwoDimensionalPoint(X,Y)
  770. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  771. QuickOneDimensionalPoint(X)
  772. ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  773. QuickOneDimensionalPointOne(X)
  774. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  775. QuickOneDimensionalPointTwo(X)
  776. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  777. These four commands are identical to the four above them, except for the fact
  778. that they do not employ any anti-aliasing techniques.
  779.  
  780.                           06 Miscellaneous commands
  781.                           =========================
  782.  
  783. Beep
  784. ~~~~
  785. Bell
  786. ~~~~
  787. These produce a short beep using an equivalent to VDU 7.
  788.  
  789. UnknownCommand
  790. ~~~~~~~~~~~~~~
  791. This is not a command that should ever appear in a file, bit is inserted
  792. whenever a command is not recognised.  If a texture does not form, and saving
  793. the texture as a textfile contains this command, then probably some mistake
  794. has been make in the typing of new commands.
  795.  
  796. End
  797. ~~~
  798. This command should always be included at the end of the texture file and
  799. before any subroutines are declared.  It should always be present, by
  800. convention.
  801.  
  802. Checksum(Value)
  803. ~~~~~~~~~~~~~~~
  804. This command is included as a marketing device for the program.  It enables
  805. distribution of a version of the program that can read and display textures,
  806. and allow their saving as bitmaps, while not allowing unregistered users to
  807. edit the programs that generate these textures.
  808.  
  809. In unregistered versions of the program, textures which do not contain the
  810. correct value in their checksum or contain no checksum at all are rejected by
  811. the program and not displayed.  This limits the extent to which unregistered
  812. users may manipulate their textures.
  813.  
  814. In registered versions, an additional module is supplied which will enable
  815. the program (and all future upgrades of it) to read textures independently of
  816. the checksum.
  817.  
  818. A site license or Super-user version will also display whether the checksum
  819. is correct, and will write texture files with correct checksums, enabling
  820. people other than the author to distribute textures readable by the freeware
  821. distributed version of the program.
  822.  
  823.                        07 Conditional commands
  824.                        =======================
  825.  
  826. If <Condition> Then <Command> Else <Command>...
  827. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  828. This command is unusual in that it does not require brackets for its
  829. parameters.  The syntax is identical to the way if statements are used in
  830. Obey files. The commands may optionally contain further If statements. 
  831. Comments are treated as they would be in Obey files, i.e. "If 1 = 2 THEN
  832. |ECHO Equal! ELSE ECHO Not_Equal!" would print "Not_Equal!" in an Obey file,
  833. despite the earlier "|".
  834.  
  835. Digression beginning...
  836.  
  837. "If ... Then ... If ... Then ... Else" constructs currently treat the Else as
  838. belonging to BOTH "If"s.  One can't help thinking that "If ... Then ... If
  839. ... Then ... Else ... Else" should make sense - i.e. the "Else" should belong
  840. to the nearest "If".  Unless the "Ifs" are nested in this manner one of them
  841. cannot have an "Else" without the other one getting it too.  However, BASIC
  842. does not agree (and that's BBC BASIC, the official Englishman's dialect).  No
  843. doubt the Germans would have implemented it as they are used to recursively
  844. peeling verbs from their sentences and correlating them with earlier nouns. 
  845. Still, the sentence "The boy, the girl, the man, kissed, hit, ran" is reputed
  846. to be good English, though no-one seems quite to be able to get their head
  847. 'round it.  I suppose it is possible to invert the first condition so that
  848. the "If" comes after the "Else" instead of after the Then (unless the command
  849. required there is another "If" statement).
  850.  
  851. Obey files don't seem to like their "If"s nested either (programmers must
  852. find it easier to just look for the next "Else" than to count the
  853. intermediate "If"s), and so neither does Texture Garden (which tries to
  854. follow the Obey file syntax, so its files can be displayed in Obey file
  855. syntax-colouring modes in text editors).
  856.  
  857. ...digression end.
  858.  
  859. As <Condition>s you cannot use "<", "=", ">=" "!=" etc.  A list of conditions
  860. that are acceptable follows:
  861.  
  862. IsLessThan(A,B)
  863. ~~~~~~~~~~~~~~~
  864. IsGreaterThan(A,B)
  865. ~~~~~~~~~~~~~~~~~~
  866. IsLessThanOrEqualTo(A,B)
  867. ~~~~~~~~~~~~~~~~~~~~~~~~
  868. IsGreaterThanOrEqualTo(A,B)
  869. ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  870. SignedIsLessThan(A,B)
  871. ~~~~~~~~~~~~~~~~~~~~~
  872. SignedIsGreaterThan(A,B)
  873. ~~~~~~~~~~~~~~~~~~~~~~~~
  874. SignedIsLessThanOrEqualTo(A,B)
  875. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  876. SignedIsGreaterThanOrEqualTo(A,B)
  877. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  878. IsEqualTo(A,B)
  879. ~~~~~~~~~~~~~~
  880. IsNotEqualTo(A,B)
  881. ~~~~~~~~~~~~~~~~~
  882. These functions are fairly self explanatory, and I hope a single example will
  883. suffice:
  884.  
  885. IsLessThan(A,B) returns TRUE (&FFFF or -1) if A is less than B, otherwise it
  886. returns FALSE (0).
  887.  
  888.                         08 Mutation Commands
  889.                         ====================
  890.  
  891. StopMutating
  892. ~~~~~~~~~~~~
  893. This command effectively stops the system from mutating until the next
  894. StartMutating command.  This has the effect of stopping any intervening
  895. commands from being affected by any mutations or sexual recombination that
  896. may occur.  This may be of use when stopping mutations affecting parts of the
  897. texture whose structural integrity is important.
  898.  
  899. StartMutating
  900. ~~~~~~~~~~~~~
  901. Reverses the effect of the last "StopMutating" command.
  902.  
  903.                       09 Animation Commands
  904.                       =====================
  905.  
  906. StopAnimating
  907. ~~~~~~~~~~~~~
  908. This command effectively stops the system variable "AnimationFrameNumber"
  909. from affecting the texture until the next StartAnimating command.  This has
  910. the effect of stopping any intervening commands from being affected by any
  911. animation that is occuring.  This may be of use when stopping palettes which
  912. are declared using Fourier transforms from being "animated" causing the
  913. palette to change then this is considered undesirable.
  914.  
  915. StartAnimating
  916. ~~~~~~~~~~~~~~
  917. Reverses the effect of the last "StopAnimating" command.
  918.  
  919. See also:
  920. SetAnimationFrameNumber, AnimationFrameNumber and AnimationType(Frequency).
  921.  
  922.                    10 Graphical output commands
  923.                    ============================
  924.  
  925. MakeSprite
  926. ~~~~~~~~~~
  927. Creates a sprite in the current mode using the current colourmap.
  928.  
  929. AddToSprite
  930. ~~~~~~~~~~~
  931. Adds to an existing sprite using the current colourmap.  The existing sprite
  932. is written to only at the points where the value at (X,Y) is non-zero.
  933.  
  934. MakeVirtualSprite(Type_R,Type_G,Type_B)
  935. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  936. This makes a 24-bit colour virtual sprite.
  937.  
  938. This is useful when creating images by using multiple layers of texture.
  939.  
  940. "Type_R", "Type_G" and "Type_B" are the combination-types to be used when
  941. adding to an existing sprite for red, green and blue components respectively.
  942.  
  943. The virtual sprite should not be assumed to be blank when it is created
  944. and so the first occurrence of this command should normally use
  945. "Overwrite,Overwrite,Overwrite" as its parameters.
  946.  
  947. MakeSpriteFromVirtualSprite
  948. ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  949. This command makes a RISC OS sprite from the 24-bit virtual sprite created
  950. by a previous "MakeVirtualSprite" command.
  951.  
  952. One point to note is that dithering should always be set to 0 (Zero) before
  953. this command is executed.
  954.  
  955. This is for compatibility with dithering routines whose implementation is
  956. currently in the planning stage.
  957.  
  958. TruncateSpriteVertically(Bottom,Top)
  959. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  960. Truncates the top and bottom edges from the sprite. * #
  961.  
  962. TruncateSpriteHorizontally(Left,Right)
  963. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  964. Truncates the left- and right-hand edges from the sprite. * #
  965.  
  966. ResizeSprite(XFactor,YFactor)
  967. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  968. Performs "TruncateSpriteHorizontally(0,XFactor)" and
  969. "TruncateSpriteVertically(0,YFactor)".  This is the method used by
  970. Texture Garden's front-end to resize textures.
  971.  
  972. * Note that with these commands, the sprite may not subsequently be added
  973.   to.  These operations may stop the resulting sprite from tessellating.
  974.  
  975. # These commands should only be used when resizing the texture using the
  976.   front-end is not necessary, as they will stop textures from being resized.
  977.  
  978.                     11 Fourier Transform related commands
  979.                     =====================================
  980.  
  981. CreateTwoDimensionalFilter(Filter_Description)
  982. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  983. This function is a function of X and Y as well as of its parameter
  984. "Filter_Description".  It generates a field of values in the main two
  985. dimensional working buffer.  These form a "Filter" which is usually used to
  986. filter random noise with the result then being inverse-fourier-transform'd. 
  987. The functions commonly used are described in a different section.  Filters
  988. may be defined in other ways, if so desired, but this is the main recommended
  989. method.
  990.  
  991. TwoDimensionalTransform
  992. ~~~~~~~~~~~~~~~~~~~~~~~
  993. This and the command that follow it perform a series of operations on the
  994. main two dimensional working buffer.  First, the contents of the buffer are
  995. used as a filter to filter a spectrum of random white noise.
  996.  
  997. What noise is used and how the filtering is performed is affected by the
  998. following commands: Seed(Value), Phase(Value), NoiseToBeFiltered(Value),
  999. CreateCosineSymmetry, CreateSineSymmetry, CreateCosineArtefacts(Value),
  1000. CreateSineArtefacts(Value), AbandonCosinePhase, and AbandonSinePhase.
  1001.  
  1002. Exactly how these commands affect the filtering of the noise is partially
  1003. described elsewhere.
  1004.  
  1005. Next the resulting spectrum is exposed to an two-dimensional inverse fast
  1006. fourier transform.  This is an elaborate function that is capable of
  1007. converting a signal from the frequency domain into the space/time domain.  I
  1008. refer you to signal processing textbooks for further details.  Finally the
  1009. resultant vectors are converted to a series of amplitudes by squaring, adding
  1010. and then square-rooting their components.
  1011.  
  1012. SmoothTwoDimensionalTransform
  1013. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1014. This is identical to the above command, except the resulting values are
  1015. centred about &8000, eliminating the "spiky artefacts" that occur near H = 0
  1016. when the plain "TwoDimensionalTransform" is used.
  1017.  
  1018. CreateOneDimensionalFilter(Filter_Description)
  1019. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1020. See above description of this function in two dimensions.  The main one
  1021. dimensional buffer is used.  The filter is calculated only over the range
  1022. where Y = 0.
  1023.  
  1024. OneDimensionalTransform
  1025. ~~~~~~~~~~~~~~~~~~~~~~~
  1026. See above description of this function in two dimensions.The main one
  1027. dimensional buffer is used.
  1028.  
  1029. SmoothOneDimensionalTransform
  1030. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1031. See above description of this function in two dimensions.
  1032. The main one dimensional buffer is used.
  1033.  
  1034.                        12 Variable Setting commands
  1035.                        ============================
  1036.  
  1037. SetVariable(Variable_Number,Value)
  1038. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1039. This sets variable number (Variable_Number MOD &400) to be equal to <Value>.
  1040.  
  1041. SetAnimationFrameNumber(Value)
  1042. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1043. This sets the system variable "AnimationFrameNumber" to be equal to <Value>.
  1044. This not normally be referred to.  If the texture is to be animated manually
  1045. using batch files, then it may be used in conjunction with the "Use Animation
  1046. type" option.
  1047.  
  1048. Seed(Value)
  1049. ~~~~~~~~~~~
  1050. Sets the seed to be used in the random number generators.
  1051.  
  1052. RestoreArtefactsFlags
  1053. ~~~~~~~~~~~~~~~~~~~~~
  1054. Resets the "AbandonCosinePhase", "AbandonSinePhase", "CreateCosineSymmetry"
  1055. and "CreateSineSymmetry" flags to off.
  1056.  
  1057. Sets the values of "AbandonCosinePhase", "AbandonSinePhase",
  1058. "CreateCosineArtefacts" and "CreateSineArtefacts" to zero.
  1059.  
  1060. Phase(Value)
  1061. ~~~~~~~~~~~~
  1062. Sets the phase to be used in the filtering of the random white noise to
  1063. <Value>.  This phase affects all frequencys equally.  Changing it smoothly
  1064. produces similar effects to animating the texture using the "Positive.Boring"
  1065. animation pattern.
  1066.  
  1067. NoiseToBeFiltered(Value)
  1068. ~~~~~~~~~~~~~~~~~~~~~~~~
  1069. Sets the amplitude of the random white noise used in the filtering to
  1070. <Value>.
  1071.  
  1072. CreateCosineSymmetry
  1073. ~~~~~~~~~~~~~~~~~~~~
  1074. When filtering white noise, eliminate all sin components.  This produces a
  1075. pattern guaranteed to at its maximum at its centre, with a rotational
  1076. symmetry of two.
  1077.  
  1078. CreateSineSymmetry
  1079. ~~~~~~~~~~~~~~~~~~
  1080. When filtering white noise, eliminate all cosine components.  This produces a
  1081. pattern guaranteed to be zero at its centre, with a rotational symmetry of
  1082. two.
  1083.  
  1084. CreateCosineArtefacts(Value)
  1085. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1086. When filtering white noise, this eliminates all cosine components with an
  1087. amplitude less than a certain value.  Its effect is like "CreateSineSymmetry"
  1088. but not as extreme.
  1089.  
  1090. CreateSineArtefacts(Value)
  1091. ~~~~~~~~~~~~~~~~~~~~~~~~~~
  1092. When filtering white noise, this eliminates all sine components with an
  1093. amplitude less than a certain value.  Its effect is like
  1094. "CreateCosineSymmetry" but not as extreme.
  1095.  
  1096. AbandonCosinePhase
  1097. ~~~~~~~~~~~~~~~~~~
  1098. When filtering white noise, this eliminates the effect of the noise on the
  1099. cosine components of the result.  Instead of white noise, "bright white
  1100. light" may be thought of as being used.
  1101.  
  1102. AbandonSinePhase
  1103. ~~~~~~~~~~~~~~~~
  1104. See "AbandonCosinePhase" substituting "Sine" for "Cosine".
  1105.  
  1106.                       13 Dithering commands
  1107.                       =====================
  1108.  
  1109. The next three commands affect the way dithering is used in the generation of
  1110. palettes and sprites.
  1111.  
  1112. Dithering0 affects the red component of palettes defined using RGB data, the
  1113. "hue" component of palettes defined using HSV data and general
  1114. (within-palette) dithering when making Sprites.
  1115.  
  1116. Dithering1  affects the green component of palettes defined using RGB data
  1117. and the "saturation" component of palettes defined using HSV data.
  1118.  
  1119. Dithering2  affects the blue component of palettes defined using RGB data and
  1120. the "value" component of palettes defined using HSV data.
  1121.  
  1122. The dithering used in sprite generation is random dithering.  Floyd-Steinberg
  1123. dithering is available if required, but cannot be controlled by the texture
  1124. generation language.
  1125.  
  1126. Dithering(Value)
  1127. ~~~~~~~~~~~~~~~~
  1128. Sets Dithering0, Dithering1 and Dithering2 to be equal to <Value>.
  1129.  
  1130. DitheringOne(Value)
  1131. ~~~~~~~~~~~~~~~~~~~
  1132. Sets Dithering1 to be equal to <Value>.
  1133.  
  1134. DitheringTwo(Value)
  1135. ~~~~~~~~~~~~~~~~~~~
  1136. Sets Dithering2 to be equal to <Value>.
  1137.  
  1138.                     14 Processing commands
  1139.                     ======================
  1140.  
  1141. OneDimensionalProcess(X1,X2,Function,Type)
  1142. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1143. The section of the main one dimensional buffer defined by (X1,X2) is
  1144. processed according to "Function" and combined with its original self using
  1145. combination-type "Type".  "Function" may usefully contain commands such as
  1146. "OneDimensionalPoint(X)".
  1147.  
  1148.  
  1149. TwoDimensionalProcess(X1,Y1,X2,Y2,Function,Type)
  1150. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1151. The rectangle in the main two dimensional buffer defined by opposing corners
  1152. at (X1,Y1) and (X2,Y2) is processed according to "Function" and combined with
  1153. its original self using combination-type "Type".  "Function" may usefully
  1154. contain commands such as "TwoDimensionalPoint(X,Y)".
  1155.  
  1156. OneDimensionalFilter(Left,Centre,Right,Type)
  1157. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1158. Each point in the one dimensional buffer is processed by adding the values of
  1159. its two neighbours and itself (multiplied by one of three multipliers) and
  1160. dividing by &100 before combining it with its original self using
  1161. combination-type "Type".  The following diagram describes the position of the
  1162. relevant multipliers.
  1163.  
  1164.                 -------------
  1165.                 | L | C | R |
  1166.                 -------------
  1167.  
  1168. TwoDimensionalFilter(Top_Left,Top_Centre,Top_Right,
  1169.                      Middle_Left,Middle_Centre,Middle_Right,
  1170.                      Bottom_Left,Bottom_Centre,Bottom_Right,Type)
  1171. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1172. Each point in the two dimensional buffer is processed by adding the values of
  1173. its eight neighbours and itself (multiplied by a series of multipliers) and
  1174. dividing by &100 before combining it with its original self using
  1175. combination-type "Type".  The following diagram describes the position of the
  1176. relevant multipliers.
  1177.  
  1178.                   ----------------
  1179.                   | TL | TC | TR |
  1180.                   ----------------
  1181.                   | ML | MC | MR |
  1182.                   ----------------
  1183.                   | BL | BC | BR |
  1184.                   ----------------
  1185.  
  1186. OneDimensionalContrast(Value)
  1187. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1188. Multiplies the entire contents of the main one dimensional buffer by <Value>,
  1189. divides by &100 and then truncates any high bit "spillage".
  1190.  
  1191. TwoDimensionalContrast(Value)
  1192. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1193. Multiplies the entire contents of the main two dimensional buffer by <Value>,
  1194. divides by &100 and then truncates any high bit "spillage".
  1195.  
  1196. OneDimensionalFlood(Threshold,Multiplier,Value,Type)
  1197. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1198. If the contents of the main one dimensional buffer at any point is less than
  1199. <Threshold>, this command multiplies it by <Multiplier>, divides by &100 and
  1200. then combines it with <Value> using combination-type "Type".
  1201.  
  1202. TwoDimensionalFlood(Threshold,Multiplier,Value,Type)
  1203. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1204. If the contents of the main one dimensional buffer at any point is less than
  1205. <Threshold>, this command multiplies it by <Multiplier>, divides by &100 and
  1206. then combines it with <Value> using combination-type "Type".
  1207.  
  1208. OneDimensionalEqualization
  1209. ~~~~~~~~~~~~~~~~~~~~~~~~~~
  1210. This expands the range of the contents of the main one dimensional buffer
  1211. until it covers the range &0000-&FFFF by using linear scaling.
  1212.  
  1213. TwoDimensionalEqualization
  1214. ~~~~~~~~~~~~~~~~~~~~~~~~~~
  1215. This expands the range of the contents of the main two dimensional buffer
  1216. until it covers the range &0000-&FFFF by using linear scaling.
  1217.  
  1218. One of the problems with this command (and the one above) emerges when
  1219. textures using it are animated.  Because the height of the highest mountain
  1220. and the floor of the deepest valley (so to speak) determine the scaling
  1221. factor to be used, this will be a different factor for different animation
  1222. frames.  An especially high mountain will produce a "freak" low gain value. 
  1223. This will have the effect of making the rest of the texture appear lower than
  1224. it would normally be.  Depending on the colouring scheme used, this can
  1225. result in an unsightly flashing effect in the resultant animation.  There is
  1226. no simple fix for this, but truncating high mountains, and using a fixed gain
  1227. contrast command are both possible.
  1228.  
  1229. GenerateOneDimensionalDust(Threshold,Function,Type)
  1230. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1231. Processes the contents of the main one dimensional buffer by comparing it to
  1232. a bank of white noise and combining those values exceeded by some threshold
  1233. (<Threshold>) by the function (of X) "Function" using combination-type
  1234. "Type".
  1235.  
  1236. GenerateTwoDimensionalDust(Threshold,Function,Type)
  1237. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1238. Similar to above using the main two dimensional buffer.
  1239.  
  1240. TwoDimensionalInversion
  1241. ~~~~~~~~~~~~~~~~~~~~~~~
  1242. Inverts (EORs with &FFFF) the main two dimensional buffer.
  1243.  
  1244. OneDimensionalInversion
  1245. ~~~~~~~~~~~~~~~~~~~~~~~
  1246. Inverts (EORs with &FFFF) the main one dimensional buffer.
  1247.  
  1248. TwoDimensionalClear
  1249. ~~~~~~~~~~~~~~~~~~~
  1250. Clears the main two dimensional buffer with zeros.
  1251.  
  1252. OneDimensionalClear
  1253. ~~~~~~~~~~~~~~~~~~~
  1254. Clears the main one dimensional buffer with zeros.
  1255.  
  1256. DefineSolidBlock(Block_Description)
  1257. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1258. This command defines a solid block of texture in three dimensions.  Its
  1259. single parameter, "Block_Description" is a function of X,Y, and Z.  This
  1260. function usually refers to the various buffers using the
  1261. "TwoDimensionalPoint" commands.
  1262.  
  1263. Sculpture(Path_of_X,Path_of_Y,Path_of_Z)
  1264. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1265. This command sculpts a solid shape from the solid block of texture described
  1266. in the last "DefineSolidBlock" command.  The parameters, "Path_of_X",
  1267. "Path_of_Y", "Path_of_Z", define a mapping between X and Y and the three
  1268. dimensional space.  They are all functions of X and Y.  The resulting shape
  1269. is stored in the main two dimensional buffer.
  1270.  
  1271. Resize(XFactor,YFactor)
  1272. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1273. Resizes the texture by XFactor and YFactor.
  1274. Actually performs something similar to:
  1275. "TwoDimensionalShift(&8000,&8000,Overwrite)"
  1276. "TwoDimensionalProcess(0,0,XFactor,YFactor,TwoDimensionalPoint(
  1277.    Combine(Multiplication,&40000 DIV XFactor,LogicalShiftRight(X,&6)),
  1278.    Combine(Multiplication,&40000 DIV YFactor,LogicalShiftRight(Y,&6))),
  1279.    Overwrite)".
  1280. "TwoDimensionalShift(&8000,&8000,Overwrite)"
  1281.  
  1282.                      15 Linear segment commands
  1283.                      ==========================
  1284.  
  1285. LinearField(H1,H2)
  1286. ~~~~~~~~~~~~~~~~~~
  1287. Creates a linear field over the entire domain of the main one dimensional
  1288. buffer.  It ranges from H1 ay X = 0 to H2 at X = &FFFF. *
  1289.  
  1290. LinearFieldSegment(H1,H2,X1,X2,Type)
  1291. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1292. Creates a linear field over the domain (X = X1 to X = X2) of the main one
  1293. dimensional buffer.  It ranges from Y = H1 at X = X1 to Y = H2 at X = X2. *
  1294.  
  1295. * Note that by virtue of its nature, this command and the previous one may
  1296.   destroy the ability of textures using it to tessellate.
  1297.  
  1298. Rectangle(I,X1,Y1,X2,Y2,Type)
  1299. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1300. Simply creates a rectangle in the main two dimensional buffer.  Of "height"
  1301. <I> and opposing corners at (X1,Y1) and (X2,Y2), the rectangle is combined
  1302. with the existing pattern using combination-type "Type".
  1303.  
  1304.                         16 Shifting commands
  1305.                         ====================
  1306.  
  1307. OneDimensionalShift(Delta_X,Type)
  1308. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1309. The main one dimensional buffer is shifted by <Delta_X> and combined with its
  1310. original self using combination-type "Type".
  1311.  
  1312. TwoDimensionalShift(Delta_X,Delta_Y,Type)
  1313. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1314. The main two dimensional buffer is shifted by (<Delta_X>,<Delta_Y>) and
  1315. combined with its original self using combination-type "Type".
  1316.  
  1317.                          17 Rotation commands
  1318.                          ====================
  1319.  
  1320. QuickRotate(Theta,Type)
  1321. ~~~~~~~~~~~~~~~~~~
  1322. The main two dimensional buffer is rotated by <Theta> rounded to the nearest
  1323. multiple of 90 degrees and combined with its original self using
  1324. combination-type "Type".  Usually <Theta> is one of "Zero", "Ninety",
  1325. "OneHundredAndEighty" and "TwoHundredAndSeventy".
  1326.  
  1327. Rotate(Theta,Type)
  1328. ~~~~~~~~~~~~~~~~~~
  1329. The main two dimensional buffer is rotated by <Theta> rounded to the nearest
  1330. multiple of 1/3 of a degree and combined with its original self using
  1331. combination-type "Type". *
  1332.  
  1333. SlowRotate(Theta,Type)
  1334. ~~~~~~~~~~~~~~~~~~~~~~
  1335. Same as Rotate but with sub-pixel anti-aliasing. *
  1336.  
  1337. RotateAbout(Theta,X,Y,Type)
  1338. ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1339. Similar to Rotate, but the rotation is about an arbitrary point.  This is not
  1340. equivalent to a Shift, Rotate and Shift because of the location of the
  1341. introduced discontinuities. * #
  1342.  
  1343. SlowRotateAbout(Theta,X,Y,Type)
  1344. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1345. Same as RotateAbout but with sub-pixel anti-aliasing. *
  1346.  
  1347. * Note that by virtue of the nature of its action, this command may destroy
  1348.   the ability of the texture to tessellate unless <Theta> is one of "Zero",
  1349.   "Ninety", "OneHundredAndEighty" and "TwoHundredAndSeventy" (in which case
  1350.   "QuickRotate" should be used).  The discontinuities are introduced at what
  1351.   would normally turn into the edges of the sprite.  However, further
  1352.   processing may alter their location.  The command is also a bit quick and
  1353.   dirty in that no anti-aliasing techniques are used to smooth the rotation. 
  1354.   If multiple rotations are used then this might become a problem, though it
  1355.   may also produce some interesting effects as the number of iterations
  1356.   reaches 100.
  1357.  
  1358. # Note that there is no QuickRotateAbout as this can be accomplished with a
  1359.   QuickRotate and a TwoDimensionalShift.
  1360.  
  1361.                       18 Loops
  1362.                       ========
  1363. Repeat
  1364. ~~~~~~
  1365. Sets up a "Repeat"-type loop.
  1366.  
  1367. Until(Condition)
  1368. ~~~~~~~~~~~~~~~~
  1369. Loops to the matching "Repeat" until <Condition> is non-zero.
  1370.  
  1371. For(Number_of_times_to_loop)
  1372. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1373. Sets up a "For"-type loop to be executed <Number_of_times_to_loop> times.
  1374.  
  1375. Next
  1376. ~~~~
  1377. Loops to the matching "For" for the specified number of times.
  1378.  
  1379.                   19 Buffer manipulation commands
  1380.                   ===============================
  1381.  
  1382. OneDimensionalStoreBufferOne
  1383. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1384. Stores the contents of the main one dimensional buffer in the first one
  1385. dimensional buffer, overwriting its contents.
  1386.  
  1387. OneDimensionalStoreBufferTwo
  1388. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1389. Stores the contents of the main one dimensional buffer in the second one
  1390. dimensional buffer, overwriting its contents.
  1391.  
  1392. OneDimensionalSwapBufferOne
  1393. ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1394. Swaps the contents of the main one dimensional buffer with the contents of
  1395. the first one dimensional buffer.
  1396.  
  1397. OneDimensionalSwapBufferTwo
  1398. ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1399. Swaps the contents of the main one dimensional buffer with the contents of
  1400. the second one dimensional buffer.
  1401.  
  1402. OneDimensionalMaskBufferOne(Type)
  1403. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1404. Combines the contents of the main one dimensional buffer with the contents of
  1405. the first one dimensional buffer using combination-type "Type".
  1406.  
  1407. TwoDimensionalStore
  1408. ~~~~~~~~~~~~~~~~~~~
  1409. Stores the contents of the main two dimensional buffer in the first two
  1410. dimensional buffer, overwriting its contents. *
  1411.  
  1412. TwoDimensionalSwap
  1413. ~~~~~~~~~~~~~~~~~~
  1414. Swaps the contents of the main two dimensional buffer with the contents of
  1415. the first two dimensional buffer. *
  1416.  
  1417. TwoDimensionalMask(Type)
  1418. ~~~~~~~~~~~~~~~~~~~~~~~~
  1419. Combines the contents of the main two dimensional buffer with the contents of
  1420. the first two dimensional buffer using combination-type "Type". *
  1421.  
  1422. * Note that the memory used in manipulating the first two dimensional buffer
  1423.   is not allocated by default, and this will cause the process of texture
  1424.   generation to use more memory than normal.  This is only important in
  1425.   if textures are to be generated in low-memory environments.
  1426.   
  1427.                      20 Wavey and Distorting commands
  1428.                      ================================
  1429.  
  1430. VerticalDistortion(Type)
  1431. ~~~~~~~~~~~~~~~~~~~~~~~~
  1432. Applies a series of vertical displacements to the contents of the main two
  1433. dimensional buffer according to the contents of the main one dimensional
  1434. buffer.  The maximum displacement is twice the dimensions of the main two
  1435. dimensional buffer.  Combination-type "Type" is used.
  1436.  
  1437. HorizontalDistortion(Type)
  1438. ~~~~~~~~~~~~~~~~~~~~~~~~~~
  1439. See "VerticalDistortion" which is similar.
  1440.  
  1441. HorizontalWaveWarp(Type)
  1442. ~~~~~~~~~~~~~~~~~~~~~~~~
  1443. Applies a "shaped smear" of waves to the contents of the main two dimensional
  1444. buffer whose horizontal displacements vary according to the contents of the
  1445. main one dimensional buffer.  The exact form of the smear is controlled by
  1446. the first one dimensional buffer.  The maximum amplitude of the waves is
  1447. twice the dimensions of the main two dimensional buffer.  Combination-type
  1448. "Type" is used.
  1449.  
  1450. VerticalWaveWarp(Type)
  1451. ~~~~~~~~~~~~~~~~~~~~~
  1452. See "HorizontalWaveWarp" which is similar.
  1453.  
  1454. HorizontalWaves(Type)
  1455. ~~~~~~~~~~~~~~~~~~~~~
  1456. Applies a "smear" of waves to the contents of the main two dimensional
  1457. buffer.  The exact form of the smear is controlled by the main one
  1458. dimensional buffer.  The maximum amplitude of the waves is twice the
  1459. dimensions of the main two dimensional buffer.  Combination-type "Type" is
  1460. used.
  1461.  
  1462. VerticalWaves(Type)
  1463. ~~~~~~~~~~~~~~~~~~~
  1464. See "HorizontalWaves" which is similar.
  1465.  
  1466. GenerateOneDimensionalDust(Threshold,Function,Type)
  1467. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1468. Processes the contents of the main one dimensional buffer by comparing it to
  1469. a bank of white noise and combining those values exceeded by some threshold
  1470. (<Threshold>) by the function (of X) "Function" using combination-type
  1471. "Type".
  1472.  
  1473. GenerateTwoDimensionalDust(Threshold,Function,Type)
  1474. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1475. Similar to above using the main two dimensional buffer.
  1476.  
  1477. TwoDimensionalInversion
  1478. ~~~~~~~~~~~~~~~~~~~~~~~
  1479. Inverts (EORs with &FFFF) the main two dimensional buffer.
  1480.  
  1481. OneDimensionalInversion
  1482. ~~~~~~~~~~~~~~~~~~~~~~~
  1483. Inverts (EORs with &FFFF) the main one dimensional buffer.
  1484.  
  1485.                   21 Colour related commands
  1486.                   ==========================
  1487.  
  1488. StartColourDefinition
  1489. ~~~~~~~~~~~~~~~~~~~~~
  1490. This should occur at the start of every palette definition.  It is a marker
  1491. used by the front end to manipulate texture texts.
  1492.  
  1493. EndColourDefinition
  1494. ~~~~~~~~~~~~~~~~~~~
  1495. This should occur at the end of every palette definition.  It is a marker
  1496. used by the front end to manipulate texture texts.
  1497.  
  1498. CreateColoursUsingRGBData
  1499. ~~~~~~~~~~~~~~~~~~~~~~~~~
  1500. This command and the one that follows it sets up a field of 24 bit RGB values
  1501. describing the palette which will be used in any "MakeSprite" or
  1502. "AddToSprite" commands.
  1503.  
  1504. The three one-dimensional buffers are used to supply the colour components,
  1505. with buffer two containing the red component, buffer two containing the
  1506. green component, and the main buffer containing the blue component.
  1507.  
  1508. CreateColoursUsingHSVData
  1509. ~~~~~~~~~~~~~~~~~~~~~~~~~
  1510. The three one-dimensional buffers are used to supply the colour components,
  1511. with buffer two containing the "hue" component, buffer two containing the
  1512. "saturation" component, and the main buffer containing the "value"
  1513. component.
  1514.  
  1515. CreateColoursUsingCIEData
  1516. ~~~~~~~~~~~~~~~~~~~~~~~~~
  1517. The three one-dimensional buffers are used to supply the colour components,
  1518. with buffer two containing the "C" component, buffer two containing the
  1519. "I" component, and the main buffer containing the "E" component.
  1520.  
  1521.              22 Mirroring, Flipping and Shearing commands
  1522.              ============================================
  1523.         
  1524. Caution should be exercised when using the leading-diagonal and
  1525. trailing-diagonal versions of the mirror and flip commands as they may
  1526. prevent the resulting texture from tessellating correctly.  The shear
  1527. commands may also appear to produce different effects at different
  1528. resolutions unless the absolute size of their parameter is kept quite small.
  1529.  
  1530. The following commands all combine the main two dimensional buffer with its
  1531. mirror image in the specified axis before combining it with its original self
  1532. using combination-type "Type".
  1533.  
  1534. HorizontalMirror(Type)
  1535. ~~~~~~~~~~~~~~~~~~~~~~
  1536. VerticalMirror(Type)
  1537. ~~~~~~~~~~~~~~~~~~~~
  1538. LeadingDiagonalMirror(Type)
  1539. ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1540. TrailingDiagonalMirror(Type)
  1541. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1542. The following "Flip" commands are similar to the "Mirror" commands.  However,
  1543. the result is no longer guaranteed to be symmetrical.  They take fractionally
  1544. longer to perform.
  1545.  
  1546. HorizontalFlip(Type)
  1547. ~~~~~~~~~~~~~~~~~~~~
  1548. VerticalFlip(Type)
  1549. ~~~~~~~~~~~~~~~~~~
  1550. LeadingDiagonalFlip(Type)
  1551. ~~~~~~~~~~~~~~~~~~~~~~~~~
  1552. TrailingDiagonalFlip(Type)
  1553. ~~~~~~~~~~~~~~~~~~~~~~~~~~
  1554. Shears combine a sheared image of the main two dimensional buffer with its
  1555. original self using combination-type "Type".  A shear of Size 1 produces a 45
  1556. degree shear; higher numbers may be thought of as representing  the effect of
  1557. repeated shears.
  1558.  
  1559. HorizontalShear(Size,Type)
  1560. ~~~~~~~~~~~~~~~~~~~~~~~~~~
  1561. VerticalShear(Size,Type)
  1562. ~~~~~~~~~~~~~~~~~~~~~~~~
  1563.                   23 Blobbing commands
  1564.                   ====================
  1565.  
  1566. Ripples(Intensity,Radius,X,Y,Type)
  1567. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1568. This produces a circular effect in the main two dimensional buffer.  The
  1569. effect is centred at (X,Y) and is of radius <Radius> and height <Intensity>. 
  1570. The effect is composed of concentric ripples modulated by the contents of the
  1571. main one dimensional buffer.
  1572.  
  1573. Radials(Intensity,Radius,X,Y,Type,TypeTwo)
  1574. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1575. This produces a near-circular effect in the main two dimensional buffer.  The
  1576. effect is centred at (X,Y) and is of radius <Radius> and height <Intensity>. 
  1577. The effect is composed of distorted ripples combined with radial lines
  1578. modulated by the contents of the one dimensional buffers.  The main one
  1579. dimensional buffer affects the distortion, the first buffer affects the
  1580. ripples and the second affects the radial lines and their distribution.
  1581. "Type" affects the way the radial lines are combined with the background and
  1582. "TypeTwo" affects the way the ripples are combined with the resultant.
  1583.  
  1584.                      24 Branching
  1585.                      ============
  1586.  
  1587. Define <DefinitionMarker>
  1588. ~~~~~~~~~~~~~~~~~~~~~~~~~
  1589. Places a marker in the program and gives it a name.  This name may contain
  1590. any characters, but top-bit-set (> &7F), low values (< &20), ")", and ","
  1591. should not be used for future compatibility.
  1592.  
  1593. Goto <DefinitionMarker>
  1594. ~~~~~~~~~~~~~~~~~~~~~~~
  1595. Jumps directly to the named marker.
  1596.  
  1597. Call <DefinitionMarker>
  1598. ~~~~~~~~~~~~~~~~~~~~~~~
  1599. Calls a routine at the named marker, setting up a return address.
  1600. Calls and Jumps may not currently be used as functions or as parameters to
  1601. functions.  They may be used as commands in conditional statements.
  1602.  
  1603. Return
  1604. ~~~~~~
  1605. Returns from the most recent call.
  1606.  
  1607.  
  1608.