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

  1. -- card: 4955 from stack: in
  2. -- bmap block id: 3159
  3. -- flags: 2000
  4. -- background id: 5839
  5. -- name: Trigonometric
  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: A003
  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 ("Asin[Bx + C] + D        ,Acos[Bx + C] + D,Atan[Bx + C] + D,Acsc[Bx + C] + D,Asec[Bx + C] + D,Acot[Bx + C] + D,(-,arcsin[x],arccos[x],arctan[x],arccsc[x],arcsec[x],arccot[x],",0,the mouseH, the mouseV )
  30.   if it is empty then exit to HyperCard
  31.   put it into choice
  32.   -- This section gets the multiplicative constants a,b,c, and d
  33.   if choice <= 6 then
  34.     put line choice of cd fld "trig look up" into func
  35.     put "A " & func & "(Bx + C) + D" 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.     ask "What is the constantΓǪC?" with 0
  45.     if it is empty then exit to HyperCard
  46.     put it into C
  47.     ask "What is the constantΓǪD?" with 0
  48.     if it is empty then exit to HyperCard
  49.     put it into D
  50.     hide btn id 3
  51.     -- This little piece handles the default situation
  52.     if a = 1 then
  53.       if b = 1 then
  54.         if c = 0 then
  55.           if d = 0 then
  56.             put line choice of cd fld "Trig Look Up" & "(x)" into fld "function"
  57.             exit to HyperCard
  58.           end if
  59.         end if
  60.       end if
  61.     end if
  62.     put A & "*" & line choice of cd fld "Trig Look Up" & "(" & B & "*x + " & C & ") + " & D into fld "function"
  63.   else
  64.     -- This handles the inverse functions
  65.     put line choice of cd fld "Trig Look Up" into fld "function"
  66.   end if
  67. end mouseDown
  68.  
  69.  
  70.  
  71. -- part 2 (field)
  72. -- low flags: 80
  73. -- high flags: 2002
  74. -- rect: left=40 top=71 right=241 bottom=92
  75. -- title width / last selected line: 0
  76. -- icon id / first selected line: 0 / 0
  77. -- text alignment: 65535
  78. -- font id: 3
  79. -- text size: 9
  80. -- style flags: 0
  81. -- line height: 12
  82. -- part name: Trig Look Up
  83.  
  84.  
  85. -- part 3 (button)
  86. -- low flags: 80
  87. -- high flags: C004
  88. -- rect: left=178 top=60 right=99 bottom=312
  89. -- title width / last selected line: 0
  90. -- icon id / first selected line: 0 / 0
  91. -- text alignment: 1
  92. -- font id: 0
  93. -- text size: 12
  94. -- style flags: 0
  95. -- line height: 16
  96. -- part name: A cot(Bx + C) + D
  97.  
  98.  
  99. -- part contents for background part 4
  100. ----- text -----
  101. Trigonometric Function Editor
  102.  
  103. -- part contents for background part 2
  104. ----- text -----
  105. You can use this card to edit and write the trig 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. 
  106. If you'd like to read more, click this button -->   
  107.  
  108.  
  109. -- part contents for background part 3
  110. ----- text -----
  111. Trigonometric Functions
  112. Asin(Bx + C) + D, Acos(Bx + C) + D
  113.  
  114. -- part contents for background part 7
  115. ----- text -----
  116. Trig Edit Box
  117.  
  118. -- part contents for card part 2
  119. ----- text -----
  120. sin
  121. cos
  122. tan
  123. csc
  124. sec
  125. cot
  126.  
  127. asin(x)
  128. acos(x)
  129. atan(x)
  130. acsc(x)
  131. asec(x)
  132. acot(x)
  133.  
  134. -- part contents for background part 5
  135. ----- text -----
  136. The Trigonometric functions are a family of functions that are periodic.  A function is periodic if it starts repeating itself after a while.  Since the trigonometric functions ( trig for short ) are based upon the circle they repeat themselves every full circle.  
  137.  
  138. A whole circle can be divided into smaller parts.  For instance there are exactly 360 degrees in a circle.  Other measures prove to be of use also.  One such measure is the
  139. radian measure.  In a full circle there are 2 ╧Ç radians.  The number
  140. ╧Ç, in fact, is the ratio of the cirlce's circumfrence to its diameter
  141. is approximately equal to 3.141592653589793238.
  142.  
  143. The trig functions which you generate here take an angle as
  144. their argument.  The argument is the little "x" in the 
  145. parentheses.  The functions in this stack compute the angles
  146. while assuming they are measured in radians.  
  147.  
  148. Sine and Cosine are the major functions.  As shown in the
  149. picture, sine and cosine are the lengths of the triangle legs
  150. formed when an angle is drawn upon a circle that has a 
  151. radius of 1.  That kind of circle is called the Unit Circle.
  152.  
  153. The other trig functions are Tangent, Secant, Cosecant, and
  154. Cotangent.  Also included on this card are all of the inverse trig
  155. functions.  Instead of taking an angle and giving back a length, they
  156. take a length and spit back an angle.  On the left are the definitions of the
  157. other trig functions.  Click anywhere to dismiss this help.
  158.  
  159. -- part contents for background part 1
  160. ----- text -----
  161. 3*cot(1*x + .5) + -3