Welcome_iPad.red 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234
  1. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  2. % WELCOME TO iCAS
  3. %
  4. % The core of iCAS is based on REDUCE, a powerful CAS system with comparable capabilities
  5. % to Maple and Mathematica with a track record spanning over 40 years in academic and research
  6. % institutions. iCAS brings all the capabilities of REDUCE and the embedded gnuplot plotting
  7. % engine to your iPad. Best of all, iCAS is entirely self-contained and runs natively on your iPad
  8. % so no internet connection is required to harness its power.
  9. %
  10. % This file is written as a short tutorial to walk you through some simple examples to become
  11. % familiar with the app and help you get started.
  12. %
  13. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  14. % BASIC USAGE
  15. %
  16. % Enter the desired command or operation and press return to execute the command or operation.
  17. % Try it by tapping to the right of the semicolon on the line below and then tapping return.
  18. 6 * 7;
  19. % If fancy output is enabled, the results can be viewed in a typeset format by tapping a translucent
  20. % button that appears on the upper right hand corner of this view when there is fancy output or
  21. % iCAS detects LaTeX content. The output view can be zoomed using the standard pinch gestures.
  22. %
  23. % Fancy output can be globally enabled with the "Create Fancy Output" option or on a case by case
  24. % basis using the fancy switch. If fancy output is enabled and the "Automatically Show" option is
  25. % enabled, iCAS will automatically show the rendered fancy output when it is generated.
  26. %
  27. % Execute the following lines (i.e. place the cursor to the right of the semicolon and tap the return
  28. % key) to see the difference between plain and fancy output.
  29. df(x^x,x);
  30. on fancy;
  31. df(x^x,x);
  32. % Notice the pseudo-LaTeX output format and the "TeX" translucent button that appeared on the
  33. % top right of the window. Tapping the "TeX" button generates a typeset version of the file that
  34. % can be optionally emailed as a LaTeX source file for publishing, presentation, and/or sharing with
  35. % colleagues.
  36. %
  37. % Fancy output works best with a line length of 80 or more. iCAS sets the linelength to the optimal
  38. % width for plain output when a CAS session is started based on the font style and size settings.
  39. % Therefore, we recommend setting the linelength to 80 when using fancy output. iCAS provides a
  40. % convenience command called fancy_output that sets the fancy switch and sets the linelength to 80
  41. % characters. Note that turning the fancy switch off does not affect the linelength so you may need
  42. % to set the linelength to an appropriate value after using fancy output. The linelength is reset when
  43. % a new CAS session is initiated (e.g. by using either the "bye" or "quit" command).
  44. %
  45. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  46. % KEYBOARD USAGE
  47. %
  48. % By default, iCAS uses the system keyboard. A user configurable macro keyboard and a
  49. % numerical keyboard are also optionally available. The enabled keyboards and the default
  50. % keyboard can be configured in the app Settings. The app Settings can be accessed either through the
  51. % global Settings app or by tapping the Settings button on the top right corner of the screen.
  52. %
  53. % To switch between the enabled keyboards, use a horizontal swipe gesture in the text area when a
  54. % keyboard is active.
  55. %
  56. % By default, tapping a button other than the "CLEAR" or "BATCH" buttons on the macro
  57. % keyboard causes the active keyboard to automatically switch to the system keyboard to allow
  58. % entry of variables, parameters, arguments, etc. This behavior can be enabled/disabled using the
  59. % "Auto Hide Macros" setting.
  60. %
  61. % Tap the clear line below to active the keyboard and swipe from right to left to reveal the macro
  62. % keyboard. Now tap the "integral" button.
  63. % Now double tap "function" and replace it with some function of x, say x, to keep it quick and
  64. % simple. Then execute the line. Unless you've disabled fancy output, iCAS will have output a
  65. % pseudo-LaTeX output that you can view by tapping the "TeX" button at the top right. Go ahead
  66. % and tap it to see the output in the LaTeX viewer.
  67. %
  68. % Tapping return on the system keyboard can be configured to automatically switch to the macro
  69. % keyboard to enable the entry of other CAS commands. This is controlled by the "Return Shows
  70. % Macros" setting.
  71. %
  72. % To edit the contents of a macro button, tap and hold down the button for 1 second or longer.
  73. %
  74. % Instances of \n in macros get automatically converted into new lines. This makes it possible to
  75. % create macros with text spanning multiple lines.
  76. %
  77. % Assigning \r to a macro button turns that button into a silent return key. That is, it inserts a
  78. % new line character without processing the contents of the line.
  79. %
  80. % Assigning \b to a macro button turns that button into a backspace/delete key.
  81. %
  82. % Assigning \c to a macro button turns that button into a clear key.
  83. %
  84. % Assigning \cb to a macro button turns that button into a clear batch output key. The macro has
  85. % no effect if there is no batch output.
  86. %
  87. % The cursor placement within a macro can be optionally specified by including \^ in the macro where
  88. % the cursor should be after the macro is inserted. For example, the macro “(\^)” will cause the
  89. % cursor to be placed between the two parentheses.
  90. %
  91. % The macro buttons can be optionally labelled by including the desired label surrounded by the #
  92. % character in the macro text. For example, if a macro contains #LABEL#, the button will display
  93. % LABEL in a larger font instead of the actual contents of the macro.
  94. %
  95. % The following labels (in uppercase) are automatically displayed with the mathematical symbol for
  96. % the corresponding CAS operator/constant: DF, E, I, INFINITY, INT, PI, PROD, and SUM.
  97. %
  98. % The default integral, derivative, pi, and infinity buttons are examples that utilize these features.
  99. %
  100. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  101. % PLOTTING
  102. %
  103. % iCAS includes a full implementation of gnuplot that can be accessed in CAS mode using the
  104. % gnuplot package or directly in plot mode (more on modes later). By default, iCAS loads the
  105. % gnuplot package so unless you changed the "Always Load gnuplot" setting, it should already be
  106. % loaded.
  107. %
  108. % By default, iCAS automatically shows newly generated or updated plots. This behavior can be
  109. % disabled in the global settings.
  110. %
  111. % Plots can be magnified using the standard pinch gestures. iCAS supports landscape orientations
  112. % in all its views so plots can be viewed in either portrait or landscape orientations. Execute the
  113. % line below to see plotting in action and use the pinch gesture to zoom in/out and swipe gestures
  114. % to pan around the plot while zoomed in.
  115. plot(sin(x));
  116. % Unless specified, iCAS uses the title "iCAS Plot" and the file name "CASPlot" for plot files. The
  117. % default plot title can be changed in the global settings and can also be set on a per plot basis.
  118. % Execute the below line to see an example.
  119. plot(cos(x), title="cos(x)", output="cos(x)");
  120. % Plot files can be accessed by tapping the "folder" button on the right side of the menu bar. Go
  121. % ahead and tap the button now.
  122. %
  123. % The files organizer picker has four wheels. One for text files such as this one, one for plot files,
  124. % one for REDUCE inout files, and one for macro keyboard files. Aim the left picker wheel to view the
  125. % corresponding files. Files can be deleted, mailed, or viewed/selected with the buttons above the
  126. % picker wheels.
  127. %
  128. % The displayed contents can be emailed, copied, or printed by tapping the "send" button button on
  129. % the right side of the bottom toolbar. Text files are emailed using the active font style. The
  130. % font style, font size, and colors can be configured using the styles panel revealed by tapping the
  131. % "styles" button on the left of the bottom toolbar. The available font styles are "Helvetica", "Times",
  132. % and "Courier". Although not the prettiest, Courier can be optimal as it is the closest to a monospace
  133. % font on iOS devices.
  134. %
  135. % Plots can be emailed in SVG format which is a resolution independent format supported by major
  136. % major browsers including Safari and FireFox.
  137. %
  138. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  139. % OPERATION MODES
  140. %
  141. % iCAS supports three operation modes.
  142. %
  143. % • CAS Mode
  144. % • Plot Mode
  145. % • Text Editor Mode
  146. %
  147. % By default, the application's color theme changes to indicate the active mode. This color feedback
  148. % behavior can be disabled in the app Settings, if desired.
  149. %
  150. % In CAS mode (the current mode unless you've changed the mode with the mode controls switch
  151. % in the middle of the toolbar), iCAS behaves as a terminal interface to the CAS engine.
  152. %
  153. % In Plot mode, iCAS behaves as a direct terminal interface to the gnuplot engine. Go ahead and
  154. % dismiss the keyboard and tap the "plot" mode button (the button with a graph) to switch to Plot
  155. % mode. Then execute each of the following lines in sequence. This is an example straight from the
  156. % gnuplot demonstration samples web page.
  157. set output "3D Log"
  158. set title "3D Log"
  159. set samples 30; set isosamples 30
  160. set hidden3d
  161. set pm3d
  162. set surface
  163. set view 50,220
  164. set xrange [-2:2]
  165. set yrange [-2:2]
  166. splot log(x*x*y*y)
  167. % As you can see, iCAS accepts gnuplot commands directly.
  168. %
  169. % In Text Editor mode, iCAS behaves as a plain text editor. Pressing return does not invoke either
  170. % CAS or plot operations. This mode is useful for general-purpose text editing, to create input files
  171. % for batch execution (described below), to create/preview LaTeX documents, etc.
  172. %
  173. % The active file is automatically saved when the application is quit/placed in the background or
  174. % when a new file is opened.
  175. %
  176. % There may be times when you need to abort the active CAS session. To abort a CAS session that is
  177. % idle, simply use the REDUCE "bye" or "quit" command. A new session will be automatically
  178. % restarted. To abort a CAS session that is busy, tap the "Abort" button that replaces the
  179. % "Settings" button while iCAS is busy. Set the mode to CAS mode using the mode buttons and go
  180. % ahead and abort the CAS session using the following example that intentionally invokes a very long
  181. % for-loop.
  182. for i:=0:10000000 do j:=i;
  183. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  184. % BATCH OPERATION
  185. %
  186. % In addition to the interactive operation that we've just used, iCAS supports batch execution of
  187. % entire file contents. That is, iCAS can process the entire contents of the active file either in CAS
  188. % mode or Plot mode. To do so, use the special "BATCH" macro keyboard button. Unlike
  189. % interactive results which are output at the current cursor location, CAS mode batch execution
  190. % results are appended to the end of the file surrounded by "%%% Begin Batch Results" and
  191. % "%%% End Batch Results" so they can be easily located with a quick search.
  192. %
  193. % Plot mode results are of course the creation of plot files. Note that plot files are not
  194. % automatically shown when they are generated in batch mode. To view batch generated plot
  195. % files, please use the files picker.
  196. %
  197. % Now, this file contains interactive output from the examples that we've run so if you process this
  198. % file in batch mode, it will result in errors. Therefore, please try batch execution using one of the
  199. % example files.
  200. %
  201. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  202. % FOR MORE INFORMATION
  203. %
  204. % We hope that you found this tutorial helpful. You'll find more examples for various areas in the
  205. % files picker. You will also find more information in the iCAS FAQ at the following URL.
  206. %
  207. % http://alsoftiphone.com/iCAS/faq
  208. %
  209. % Last but not least, if you have any questions or feedback, please don't hesitate to contact us at
  210. % support@alsoftiphone.com. You can quickly do so by either tapping the "i" button on the bottom
  211. % right corner and then tapping the "Feedback" button or by tapping the "Contact Support" button at
  212. % the bottom of the app Settings.
  213. %
  214. % We hope that you will find iCAS a useful companion for your computation needs.
  215. %
  216. % Best Regards,
  217. % AL Software
  218. %
  219. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%