home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 8 / CDACTUAL8.iso / share / os2 / graficos / gle / loop.gle < prev    next >
Encoding:
Text File  |  1994-01-12  |  917 b   |  47 lines

  1. size 18 24 box        ! This is LOOP.GLE, shows programming examples
  2. set hei .3
  3. amove .3 .3 
  4. text loop.gle
  5.  
  6. amove 5 14
  7. set just center hei 1
  8. set font pldr hei 0.7
  9. text Subroutines, Loops
  10. set just left hei .7
  11. set hei .9
  12.  
  13. ! First define a single neuron
  14. sub neuron xx yy
  15.   amove xx yy 
  16.   begin scale .5 .5
  17.     curve  0  .4  .4  .4  .4 -.4  .4  .4  .4 -.8 -.4 -.8 -.4 .4
  18.     curve -.4 -.8 -.4  .4 -.4 -.4 -.4  .4  0  .4   
  19.     closepath
  20.   end scale
  21. end sub
  22.  
  23. ! Draw the neurons
  24. for xx = 0 to 1
  25.   for i = 1 to 6
  26.     @neuron xx*6+2 i*2+1.2
  27.   next i
  28. next xx
  29.  
  30. ! Draw the lines between them
  31. for i = 1 to 6
  32.   for j = 1 to 6
  33.     amove 3 i*2+1
  34.     aline 7.5 j*2+1
  35.   next j
  36. next i
  37.  
  38. !--------------------------------------------------------------------------
  39. include ziptext.gle
  40. set font pltr hei 1.2
  41. amove 12 1
  42. @ziptext "Hello"
  43. amove 10.5 4
  44. begin rotate 20
  45. @ziptext "Green trees"
  46. end rotate
  47.