Welcome.red 12 KB

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