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

  1. -- card: 9042 from stack: in
  2. -- bmap block id: 9888
  3. -- flags: 2000
  4. -- background id: 5839
  5. -- name: Exponential
  6. ----- HyperTalk script -----
  7. on idle
  8.   hide btn "variable helper"
  9.   pass idle
  10. end idle
  11.  
  12.  
  13.  
  14. -- part 1 (button)
  15. -- low flags: 00
  16. -- high flags: A003
  17. -- rect: left=411 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 sets up the exponent root table
  29.   put "exp(" into line 2 of table
  30.   put 10 into line three of table
  31.   -- This is the Pop Up Menu XFCN
  32.   get popupmenu ("^A ,^B ,^C ,^D ,",0, the mouseH, the mouseV )
  33.   if it is empty then exit to HyperCard
  34.   put it into choice
  35.   get choice + 272
  36.   -- This sets the helper button so people can remember the variables
  37.   show btn "Variable helper"
  38.   set the icon of btn "variable helper" to it
  39.   ask "What is the multiplicative constant..b ?" with 1
  40.   if it is empty then exit to HyperCard
  41.   put it into b
  42.   put line choice of table into root
  43.   if root is empty then
  44.     ask "what is the rootΓǪa ?"
  45.     if it is empty then exit to HyperCard
  46.     put it into root
  47.   end if
  48.   if choice is 2 then
  49.     put b & " * " & "exp(x)" into fld function
  50.   else
  51.     if choice is 4 then
  52.       ask "What is the constantΓǪc ?"
  53.       put b & " * " & root & "^(" & it & " * x)" into fld function
  54.     else
  55.       put b & " * " & root & "^x" into fld function
  56.     end if
  57.   end if
  58.   hide btn "Variable helper"
  59. end mouseDown
  60.  
  61.  
  62. -- part 2 (button)
  63. -- low flags: 80
  64. -- high flags: 4004
  65. -- rect: left=205 top=60 right=98 bottom=302
  66. -- title width / last selected line: 0
  67. -- icon id / first selected line: 274 / 274
  68. -- text alignment: 1
  69. -- font id: 0
  70. -- text size: 12
  71. -- style flags: 0
  72. -- line height: 16
  73. -- part name: Variable helper
  74.  
  75.  
  76. -- part contents for background part 4
  77. ----- text -----
  78. Exponential Function Editor
  79.  
  80. -- part contents for background part 2
  81. ----- text -----
  82. Use this card to form the exponential functions that you'd like to see graphed.  You can use the function editor to change the general form of the exponential to what you want by setting the values of the variables.  
  83. If you'd like to read more, click this button -->   
  84.  
  85. -- part contents for background part 7
  86. ----- text -----
  87. Exponential Edit Box
  88.  
  89. -- part contents for background part 3
  90. ----- text -----
  91. Exponential Functions
  92. Aexp(bx)
  93.  
  94. -- part contents for background part 5
  95. ----- text -----
  96. In a very basic sense an exponent is a superscripted number above and to the right of another number.  The symbol that this stack uses to internally represent an exponent is the ^.
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104. An exponential function is a function that returns the value of some number to the x power.  For example 
  105. f(x) = 10^x  would return 10 raised to whatever x was.  Using that example f(1) = 10, f(2) = 100, 
  106. f(3) = 1000 etc.  An important thing to realize is that x doesn't have to be a counting number.  It could be a number like 1/7 or -4.23.  
  107.  
  108. In the pull down menu there are some premade functions for you.  Two of the forms will require that you supply the values of the rootΓǪa.  The other two forms have already suppled the root of the exponential 
  109.  
  110.  
  111.  
  112. function.  These numbers are common forms of exponentials and they are 10 and e.  The number e is an irrational number.  Such a number can be represented as a non-repeating, non-ending decimal. The number e is approximately equal to 2.718281828459045235.  
  113.  
  114. Exponentials are an integral part of many branches of science and mathematics.  They are often used to compute things like radioactive decay, growth of bacteria, and charge in a circuit.
  115.                                                                                                 Click any where to dismiss this help section.
  116.  
  117. -- part contents for background part 1
  118. ----- text -----
  119. .125 * exp(x)