(*^ ::[ frontEndVersion = "Microsoft Windows Mathematica Notebook Front End Version 2.2"; microsoftWindowsStandardFontEncoding; fontset = title, "Times", 24, L0, center, nohscroll, bold; fontset = subtitle, "Times", 18, L0, center, nohscroll, bold; fontset = subsubtitle, "Times", 14, L0, center, nohscroll, italic; fontset = section, "Times", 18, L0, nohscroll, bold, grayBox; fontset = subsection, "Times", 14, L0, nohscroll, bold, blackBox; fontset = subsubsection, "Times", 13, L0, nohscroll, B32896; fontset = text, "Times", 12, L0, nohscroll, cellOutline; fontset = smalltext, "Times", 10, L0, nohscroll; fontset = input, "Courier", 12, L-4, nowordwrap, bold; fontset = output, "Courier", 12, L-4, nowordwrap; fontset = message, "Courier", 12, L-4, nowordwrap, R32896; fontset = print, "Courier", 12, L-4, nowordwrap; fontset = info, "Courier", 12, L-4, nowordwrap, B32896; fontset = postscript, "Courier", 12, L0, nowordwrap; fontset = name, "Geneva", 10, L0, nohscroll, italic; fontset = header, "Times", 12, L0; fontset = footer, "Times", 12, L0, center; fontset = help, "Times", 10, L0, nohscroll; fontset = clipboard, "Times", 12, L0, nohscroll; fontset = completions, "Times", 12, L0, nohscroll; fontset = graphics, "Courier New", 10, L0, nowordwrap, nohscroll; fontset = special1, "Times", 12, L0, nohscroll; fontset = special2, "Times", 12, L0, nohscroll; fontset = special3, "Times", 12, L0, nohscroll; fontset = special4, "Times", 12, L0, nohscroll; fontset = special5, "Times", 12, L0, nohscroll; fontset = leftheader, "Times", 12, L2; fontset = leftfooter, "Times", 12, L2; fontset = reserved1, "Courier New", 10, L0, nowordwrap, nohscroll;] :[font = title; inactive; preserveAspect; nohscroll; center; ] MathLive Professional :[font = subsubsection; inactive; preserveAspect; nohscroll; ] Welcome to MathLive Professional. This documentation is a complete tutorial course in using MathLive Professional. MathLive Professional is a new product and you should register your purchase now to ensure your eligibility to forthcoming upgrades. This documentation is ready print on A4 or similar sized paper. :[font = title; inactive; preserveAspect; startGroup; nohscroll; center; ] Using MathLive for the first time :[font = section; inactive; preserveAspect; startGroup; Cclosed; nohscroll; ] Starting and stopping MathLive :[font = subsubsection; inactive; preserveAspect; nohscroll; ] This section uses a very simple example to generate a graphic in Mathlive and uses the MathLive menu/mouse commands. :[font = subsubsection; inactive; preserveAspect; startGroup; Cclosed; nohscroll; ] First we load the Live package which contains the MathLive definitions. :[font = input; preserveAspect; endGroup; nowordwrap; ] Needs["MathLive`MathLive`"]; :[font = subsubsection; inactive; preserveAspect; startGroup; Cclosed; nohscroll; ] We can start MathLive directly from Mathematica, (to connect to MathLive when it is already running - use ConnectLive[] ) :[font = input; preserveAspect; startGroup; Cclosed; nowordwrap; ] LaunchLive[]; :[font = print; inactive; formatted; output; endGroup; endGroup; nowordwrap; ] Connected to MathLive Professional for Windows ;[o] Connected to MathLive Professional for Windows :[font = subsubsection; inactive; preserveAspect; startGroup; Cclosed; nohscroll; ] Let us make a simple 3D graphic object :[font = input; preserveAspect; endGroup; nowordwrap; ] aSurface = Plot3D[ Cos[x] Sin[y] , {x,-2,2} , {y,-2,2} , ColorFunction-> Hue ]; :[font = subsubsection; inactive; preserveAspect; startGroup; Cclosed; nohscroll; ] which we can send to MathLive with :[font = input; preserveAspect; endGroup; nowordwrap; ] Live[ aSurface ]; :[font = subsubsection; inactive; preserveAspect; startGroup; Cclosed; nohscroll; ] To finish we can use CloseLive[]. This will simultaneously close the application and close the open connection to MathLive. :[font = input; preserveAspect; endGroup; nowordwrap; ] CloseLive[] :[font = subsubsection; inactive; preserveAspect; startGroup; Cclosed; nohscroll; ] In the sections which follow it is assumed that you have loaded the MathLive package and launched MathLive using the two statements :[font = input; preserveAspect; endGroup; endGroup; nowordwrap; ] Needs["MathLive`MathLive`"]; LaunchLive[]; :[font = section; inactive; preserveAspect; startGroup; Cclosed; nohscroll; ] Resetting Live :[font = subsubsection; inactive; preserveAspect; startGroup; Cclosed; nohscroll; ] To reset MathLive use the following :[font = input; preserveAspect; endGroup; nowordwrap; ] ResetLive[] :[font = subsubsection; inactive; preserveAspect; nohscroll; ] This command resets the model and camera's orientation and location and destroys any objects in the default model. It also turns on the default model's bounding box and makes the camera icon visible. If you have created any user-defined models you will need to reset these yourself. :[font = subsubsection; inactive; preserveAspect; startGroup; Cclosed; nohscroll; ] Alternatively, If you have inadvertently moved the model's bounding box and or camera you can reset these individually using the following commands :[font = input; preserveAspect; endGroup; nowordwrap; ] Live [Change [Camera ["Camera"], Euler->Reset]] :[font = subsubsection; inactive; preserveAspect; startGroup; Cclosed; nohscroll; ] and to reset the model orientation type :[font = input; preserveAspect; endGroup; nowordwrap; ] Live [Change [Model3D ["Default`"], Euler->Reset]] :[font = subsubsection; inactive; preserveAspect; startGroup; Cclosed; nohscroll; ] To move the model back to its original location use :[font = input; preserveAspect; endGroup; nowordwrap; ] Live [Change [Model3D ["Default`"], Location->{0,0,0} ]] :[font = subsubsection; inactive; preserveAspect; startGroup; Cclosed; nohscroll; ] To move the camera back to its original location use :[font = input; preserveAspect; endGroup; nowordwrap; ] Live [Change [Camera ["Camera"], Location->{0,-4,0} ]] :[font = subsubsection; inactive; preserveAspect; endGroup; nohscroll; ] Useful Tip: To destroy objects in the default model click on the model bounding box whilst holding down the Command key. This will also reset the default model range. :[font = section; inactive; preserveAspect; startGroup; Cclosed; nohscroll; ] Creating Objects :[font = subsubsection; inactive; preserveAspect; nohscroll; ] This section creates objects in Mathlive in a variety of ways and introduces the idea of named objects. :[font = subsubsection; inactive; preserveAspect; nohscroll; ] Objects created in MathLive always appear within a model context. The model is a special object which allows arbitrarily large or small objects to appear at a reasonable size. The apparent size of an object is determined by the current model range. The model range is set automatically when new objects are created but it can also be set manually. :[font = subsection; inactive; preserveAspect; startGroup; Cclosed; nohscroll; ] Sending Graphics3D to MathLive :[font = subsubsection; inactive; preserveAspect; startGroup; Cclosed; nohscroll; ] Suppose we have created some graphics in Mathematica :[font = input; preserveAspect; endGroup; nowordwrap; ] myFirstSurface = Plot3D[ Cos[x] Sin[y] , {x,-4,4} , {y,-4,4} ]; mySecondSurface = Plot3D[ Sqrt[x^2 + y^2], {x, 0,4} , {y, 0,4} ]; :[font = subsubsection; inactive; preserveAspect; startGroup; Cclosed; nohscroll; ] We can send these graphics objects using the following : :[font = input; preserveAspect; endGroup; endGroup; nowordwrap; ] Live[ myFirstSurface ]; Live[ mySecondSurface ]; :[font = subsection; inactive; preserveAspect; startGroup; Cclosed; nohscroll; ] Creating named objects in MathLive :[font = subsubsection; inactive; preserveAspect; startGroup; Cclosed; nohscroll; ] Alternatively, as in this example, we can "Create" a second set of "Object3D" objects using the same graphics objects. :[font = input; preserveAspect; endGroup; nowordwrap; ] Live[ Create[ Object3D["Cosine"] , myFirstSurface ]]; Live[ Create[ Object3D["Sqrt"] , mySecondSurface ]]; :[font = subsubsection; inactive; preserveAspect; endGroup; nohscroll; ] Note that the Create command allows us to specify a name for each of the objects. In this example the Mathematica object myFirstSurface has been called 'Cosine' and the object mySecondSurface 'Sqrt'. Why bother to name objects? Primarily because we can change the properties of an object by using its name. :[font = subsection; inactive; preserveAspect; startGroup; Cclosed; nohscroll; ] Setting the Display output of the 3D Plot functions :[font = subsubsection; inactive; preserveAspect; startGroup; Cclosed; nohscroll; ] Plot3D sends its output to the "DisplayFunction" which is normally set to $DisplayFunction which is normally set to Display[$Display, #1] &. This will display graphics in the notebook. This behavior is not always useful. Sometimes we might wish to suppress the graphics output completely, send it to MathLive, the notebook or to both. The MathLive package has a function called SetDisplay[] which allows you to do this. It will automatically set $DisplayFunction. :[font = input; preserveAspect; startGroup; Cclosed; nowordwrap; ] (* To display graphics in Live and the Notebook*) SetDisplay[ NoteBook -> On, Live -> On ] :[font = output; inactive; formatted; output; endGroup; nowordwrap; ] (Live[#1]; Display[$Display, #1]) & ;[o] (Live[#1]; Display[$Display, #1]) & :[font = input; preserveAspect; startGroup; Cclosed; nowordwrap; ] (* To display graphics in the Notebook*) SetDisplay[ NoteBook -> On, Live -> Off ] :[font = output; inactive; formatted; output; endGroup; nowordwrap; ] Display[$Display, #1] & ;[o] Display[$Display, #1] & :[font = input; preserveAspect; startGroup; Cclosed; nowordwrap; ] (* To display graphics in MathLive and the Notebook*) SetDisplay[ NoteBook -> Off, Live -> Off ] :[font = output; inactive; formatted; output; endGroup; endGroup; nowordwrap; ] Identity ;[o] Identity :[font = subsubsection; inactive; preserveAspect; startGroup; Cclosed; nohscroll; ] In the following example, the graphics objects are created directly in MathLive, note that no objects are displayed within the notebook. :[font = input; preserveAspect; endGroup; nowordwrap; ] SetDisplay[ NoteBook -> Off, Live -> On ]; ParametricPlot3D[{Sin[u] Cos[v],Sin[u] Sin[v], Cos[u],Hue[u/ Pi]} , {u,0,Pi} , {v,0,2Pi} ]; (* Graphics are produced in Live *) :[font = subsubsection; inactive; preserveAspect; startGroup; Cclosed; nohscroll; ] The default behaviour can always be over-ridden by using the DisplayFunction rule. In the example, we set the default behaviour to produce no graphical output, but we can over-ride the default behaviour with an explicit display function. :[font = input; preserveAspect; endGroup; endGroup; endGroup; nowordwrap; ] (* Default is no graphics *) SetDisplay[ NoteBook -> Off, Live -> Off ]; ParametricPlot3D[{Sin[u] Cos[v],Sin[u] Sin[v], Cos[u],Hue[v/ Pi]} , {u,0,Pi} , {v,0,2Pi} , DisplayFunction -> Live ]; (* Graphics are produced in Live *) :[font = section; inactive; preserveAspect; startGroup; Cclosed; nohscroll; ] Moving Objects :[font = subsubsection; inactive; preserveAspect; startGroup; Cclosed; nohscroll; ] This section demonstrates how objects may be moved. First, let's create an object - a cube that starts at {0,0,0} and is 5 units wide in each direction. The yellow wireframe is the model and the red box our graphics object, in this case a simple cuboid. :[font = input; preserveAspect; endGroup; nowordwrap; ] boxGraphics = Graphics3D[ Cuboid[{0,0,0},{5,5,5}] ]; Live[ Create[ Object3D["Box"] , boxGraphics ] ]; :[font = subsubsection; inactive; preserveAspect; startGroup; Cclosed; nohscroll; ] We can move this object within MathLive, 5 units to the right along the X axis. :[font = input; preserveAspect; endGroup; nowordwrap; ] Live[ Change[ Object3D["Box"] , Location -> {5,0,0} ] ]; :[font = subsubsection; inactive; preserveAspect; startGroup; Cclosed; nohscroll; ] We can move this object away from us along the Z axis. :[font = input; preserveAspect; endGroup; nowordwrap; ] Live[ Change[ Object3D["Box"] , Location -> {5,5,0} ] ]; :[font = subsubsection; inactive; preserveAspect; nohscroll; ] Location produces an absolute movement of the object and is not relative to the object's current location. The distance that the object 'appears' to move is entirely dependent upon the scale of the model. If we had made an object of size 100 units, a move of 5 units would be very small. :[font = subsubsection; inactive; preserveAspect; startGroup; Cclosed; nohscroll; ] To move an object relative to its current position we can use Translate which in this instance moves the object 5 units to the right along the Y axis.. :[font = input; preserveAspect; endGroup; nowordwrap; ] Live[ Translate[Object3D["Box"] , {0,5,0} ] ]; :[font = subsubsection; inactive; preserveAspect; startGroup; Cclosed; nohscroll; ] There are in fact two methods to set the absolute location of an object :[font = input; preserveAspect; endGroup; nowordwrap; ] Live[ Locate[Object3D["Box"] , {0,5,0} ] ]; :[font = subsubsection; inactive; preserveAspect; startGroup; Cclosed; nohscroll; ] or equivalently, :[font = input; preserveAspect; endGroup; nowordwrap; ] Live[ Change[Object3D["Box"] , Location-> {0,5,0} ] ]; :[font = subsubsection; inactive; preserveAspect; startGroup; Cclosed; nohscroll; ] The second version allows further attributes to be changed at the same time. For example : :[font = input; preserveAspect; endGroup; nowordwrap; ] Live[ Change[Object3D["Box"] , Location-> {0,10,0} , Color -> RGBColor[1,1,1] , RenderMode -> WireFrame ] ]; :[font = subsubsection; inactive; preserveAspect; nohscroll; backColorRed = 65535; backColorGreen = 65535; backColorBlue = 65535; fontColorRed = 0; fontColorGreen = 0; fontColorBlue = 0; plain; fontName = "Times"; fontSize = 13; ] Important :[font = subsubsection; inactive; preserveAspect; endGroup; nohscroll; ] All object movements are scaled by the current model scale. Model ( and normally camera) positions are not scaled by the model's scale. Each object has its own frame of reference. Objects are moved and rotated by specifying the relationship between the object and its parent. :[font = section; inactive; preserveAspect; endGroup; nohscroll; ] For further information, advice or suggestions please contact- :[font = text; inactive; preserveAspect; nohscroll; cellOutline; backColorRed = 65535; backColorGreen = 65535; backColorBlue = 65535; fontColorRed = 0; fontColorGreen = 0; fontColorBlue = 0; plain; fontName = "Times"; fontSize = 12; ] Email: support@milohedge.com Post: Milo Hedge Ltd, The Oxford Centre for Innovation, Mill Street, Oxford, OX2 0JX WWW: http://www.milohedge.com/mathlive/ ^*)