home *** CD-ROM | disk | FTP | other *** search
/ Otherware / Otherware_1_SB_Development.iso / mac / misc / math / mathgrap.sit / MathGrapher / card_13330.txt < prev    next >
Encoding:
Text File  |  1989-07-28  |  4.2 KB  |  136 lines

  1. -- card: 13330 from stack: in
  2. -- bmap block id: 0
  3. -- flags: 0000
  4. -- background id: 10000
  5. -- name: 
  6.  
  7.  
  8. -- part 1 (button)
  9. -- low flags: 00
  10. -- high flags: 8003
  11. -- rect: left=257 top=167 right=190 bottom=345
  12. -- title width / last selected line: 0
  13. -- icon id / first selected line: 0 / 0
  14. -- text alignment: 1
  15. -- font id: 0
  16. -- text size: 12
  17. -- style flags: 0
  18. -- line height: 16
  19. -- part name: Show me!
  20. ----- HyperTalk script -----
  21. on mouseUp
  22.   push card
  23.   -- Card 1
  24.   go to card "Graph paper"
  25.   wait for 20 ticks
  26.   repeat 5 times
  27.     set the hilite of btn "Options" of card "Graph paper" to false
  28.     wait for 10 ticks
  29.     set the hilite of btn "Options" of card "Graph paper" to true
  30.   end repeat
  31.   -- Card 2
  32.   visual effect scroll up
  33.   go to card "Graph Options"
  34.   put the loc of the msg into msgloc
  35.   set the loc of the msg to 5,163
  36.   put "These buttons let you specify the graph's precision."
  37.   wait for 90 ticks
  38.   -- Flash lineDensity buttons
  39.   repeat 2 times
  40.     repeat with s = 29 to 38
  41.       set the hilite of btn id s to not the hilite of btn id s
  42.       wait for 10 ticks
  43.       set the hilite of btn id s to not the hilite of btn id s
  44.     end repeat
  45.   end repeat
  46.   put "These buttons let you set size of the data points."
  47.   wait for 90 ticks
  48.   -- Flash the dataBrush buttons
  49.   repeat 2 times
  50.     repeat with s = 16 to 23
  51.       set the hilite of btn id s to not the hilite of btn id s
  52.       wait for 10 ticks
  53.       set the hilite of btn id s to not the hilite of btn id s
  54.     end repeat
  55.   end repeat
  56.   -- Do field flashing
  57.   put "These fields let you set the Axis Scale."
  58.   put "9,10,12,13" into hemlock
  59.   repeat 2 times
  60.     repeat with d = 1 to 4
  61.       get item d of hemlock
  62.       set the style of cd fld id it to transparent
  63.       wait for 10 ticks
  64.       set the style of cd fld id it to shadow
  65.     end repeat
  66.   end repeat
  67.   wait for 60 ticks
  68.   hide the msg
  69.   set the loc of the msg to msgloc
  70.   lock screen
  71.   pop card
  72.   unlock screen with venetian blinds
  73. end mouseUp
  74.  
  75.  
  76.  
  77. -- part 2 (button)
  78. -- low flags: 00
  79. -- high flags: 8003
  80. -- rect: left=354 top=167 right=191 bottom=464
  81. -- title width / last selected line: 0
  82. -- icon id / first selected line: 0 / 0
  83. -- text alignment: 1
  84. -- font id: 0
  85. -- text size: 12
  86. -- style flags: 0
  87. -- line height: 16
  88. -- part name: Experts Only╔
  89. ----- HyperTalk script -----
  90. on mouseUp
  91.   show cd fld 1
  92. end mouseUp
  93.  
  94.  
  95.  
  96. -- part 3 (field)
  97. -- low flags: 81
  98. -- high flags: 2004
  99. -- rect: left=45 top=60 right=278 bottom=475
  100. -- title width / last selected line: 0
  101. -- icon id / first selected line: 0 / 0
  102. -- text alignment: 0
  103. -- font id: 2
  104. -- text size: 12
  105. -- style flags: 256
  106. -- line height: 16
  107. -- part name: 
  108. ----- HyperTalk script -----
  109. on MouseLeave
  110.   hide me
  111. end MouseLeave
  112.  
  113. on MouseUp
  114.   hide me
  115. end MouseUp
  116.  
  117.  
  118.  
  119. -- part contents for background part 13
  120. ----- text -----
  121. Help Card 7
  122.  
  123. -- part contents for background part 2
  124. ----- text -----
  125.      The next thing you may want to do is choose the graphing options that you want.  You can choose the size and the shape of the data points, the density of the graph, and the scale of the X and the Y axes.  It is useful to note that by placing the X and the Y axes in the right place and scaling the axes to the proper size you can "zoom" in on any part of the coordinate plane.
  126.  
  127. GRAPHING
  128.      At this point you have written a function, edited it into a standard form,  set all the graph options for your graph, and moved the axes to the best position for your function.
  129.      You are now ready to plot your function.
  130.      
  131.  
  132. -- part contents for card part 3
  133. ----- text -----
  134.      There is one feature of the plotting mechanism that experienced users of HyperCard may want to know about.  This stack uses the painting tools to plot the data points of your functions.  In effect it's taking a paint brush and dabbing it on the the right spots.  With the options card you can set the size of the paint brush.  
  135.      I assumed that most people wanted the data points in black, but if you prefer you can set the pattern to something else besides "black".  If the pattern is not black you will be warned before plotting your function.
  136.      You can create great effects with this.  Try plotting a function with a large black circle, and then plotting the same function with a smaller grey circle.  Pretty neat.