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

  1. -- card: 8816 from stack: in
  2. -- bmap block id: 2324
  3. -- flags: 2000
  4. -- background id: 5839
  5. -- name: Logarithmic
  6. ----- HyperTalk script -----
  7. on idle
  8.   hide btn id 3
  9.   pass idle
  10. end idle
  11.  
  12.  
  13.  
  14. -- part 1 (button)
  15. -- low flags: 00
  16. -- high flags: 8003
  17. -- rect: left=410 top=51 right=108 bottom=493
  18. -- title width / last selected line: 0
  19. -- icon id / first selected line: 9986 / 9986
  20. -- text alignment: 1
  21. -- font id: 0
  22. -- text size: 12
  23. -- style flags: 0
  24. -- line height: 16
  25. -- part name: Function Editor
  26. ----- HyperTalk script -----
  27. on mouseDown
  28.   -- This is the Pop Up Menu XFCN
  29.   get popupmenu ("A ln [Bx]    ,A log [Bx],",0, the mouseH, the mouseV )
  30.   put "ln,log" into func
  31.   if it is empty then exit to HyperCard
  32.   put it into choice
  33.   show btn id 3
  34.   if choice is 1 then
  35.     put "A " & item 1 of func & "[Bx]" into You
  36.     set the name of cd btn id 3 to You
  37.     show btn id 3
  38.     ask "What is the constantΓǪA?" with 1
  39.     if it is empty then exit to HyperCard
  40.     put it into A
  41.     ask "What is the constantΓǪB?" with 1
  42.     if it is empty then exit to HyperCard
  43.     put it into B
  44.   else
  45.     put "A " & item 2 of func & "[Bx]" into You
  46.     set the name of cd btn id 3 to You
  47.     show btn id 3
  48.     ask "What is the constantΓǪA?" with 1
  49.     if it is empty then exit to HyperCard
  50.     put it into A
  51.     ask "What is the constantΓǪB?" with 1
  52.     if it is empty then exit to HyperCard
  53.     put it into B
  54.   end if
  55.   hide btn id 3
  56.   put A && "*" && item choice of func && "(" & B && "* x)" into fld "function"
  57. end mouseDown
  58.  
  59.  
  60. -- part 3 (button)
  61. -- low flags: 80
  62. -- high flags: C004
  63. -- rect: left=188 top=62 right=93 bottom=283
  64. -- title width / last selected line: 0
  65. -- icon id / first selected line: 0 / 0
  66. -- text alignment: 1
  67. -- font id: 0
  68. -- text size: 12
  69. -- style flags: 0
  70. -- line height: 16
  71. -- part name: A ln[Bx]
  72.  
  73.  
  74. -- part contents for background part 4
  75. ----- text -----
  76. Logarithmic Function Editor
  77.  
  78. -- part contents for background part 2
  79. ----- text -----
  80. You can use this card to edit and write the log function you wish to be graphed.  Use the "Function Editor" button or enter your equation directly below.  Use the "Graph Equation" button to actually graph your work. 
  81. If you'd like to read more, click this button -->   
  82.  
  83. -- part contents for background part 7
  84. ----- text -----
  85. Log Edit Box
  86.  
  87. -- part contents for background part 3
  88. ----- text -----
  89. Logarithmic Functions
  90. Alog(Bx), Aln(Bx)
  91.  
  92. -- part contents for background part 5
  93. ----- text -----
  94. A Logarithm can be thought of as the inside out of an exponential.  In mathematical language the logarithm is said to be the inverse of the exponential.  Of course the exponential is also the inverse of the logarithm.  Here's how it works: 
  95.  
  96. Suppose we look at 10 squared.  The mac would understand this as 10^2.  People understand it as 10 X 10.  Of course the answer is 100.  What we have done is taken ten and multiplied it by itself two times.  The result is one-hundred.  We could also look at the number 100 and ask how many times ten must be multiplied by itself to get 100.  The answer is 2.  Ten must be multiplied by itself 3 times to get 1,000.  It must be multiplied by itself 6 times to get 1,000,000.  These results are better seen with the numbers than with these words.  Take a look below:
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108. This log(x) is based on the number 10.  Another common logarithim is based on the number e.  it is symbolized as ln(x).  See the help section on the Exponential card for an explanation of that number.
  109.  
  110. One important thing to know about logarithims is that they can only work on positive numbers.  Zero and negative numbers are not "legal" numbers.  Click anywhere to dismiss this help section.
  111.  
  112. -- part contents for background part 1
  113. ----- text -----
  114. 1 * ln (1 * x )