190 likes | 429 Vues
Creating a Mathematica Demonstration from Scratch. Software Requirements. To Create Mathematica Version 8 To View Mathematica is not needed CDF Player browser plug-in I’ve tested IE / Chrome / Safari / Firefox. Manipulate. Manipulate[expression , { u,u min ,u max ,du }]
E N D
Software Requirements • To Create • Mathematica Version 8 • To View • Mathematica is not needed • CDF Player browser plug-in • I’ve tested IE / Chrome / Safari / Firefox
Manipulate • Manipulate[expression , {u,umin,umax,du}] • Add as many parameters as you want • {u,umin,umax},{v,vmin,vmax},… • Add label and initial value • {{u,uinitial,”label”}, umin,umax}
ControlType • The control for a parameter is decided by Mathematica by the context, but this can be overridden • Slider, Slider2D • PopupMenu • {{u,uinitial,”label”}, umin,umax},ControlType->PopupMenu • SetterBar • {{u,uinitial,”label”},{u_v1,u_v2,…}},ControlType->SetterBar
Control, Delimiter & Grid • Control • Designates the parameter as a control • Control[{{u,u_initial,”label”},u_min,u_max}] • Delimiter • Inserts Horizontal Line between controls • Grid • Helps to organize your controls • Grid[{a11,a12,…},{a21,a22,…},…}]
Save Definitions • Will save anything that has been defined outside the scope of the Manipulate command into the Manipulate Command
ImageSize • Plot option • ImageSize-> Full
Putting on the Web • Authoring to the Wolfram Demonstrations Project • Embedding in a Webpage • Save As CDF • Html needed • <embed src=“yourfile.cdf” width=“xxx” height=“xxx”> • Deploy • Standalone • Just creates the cdf file • Embed in HTML • Creates code to copy and paste to your html file
Resources • http://reference.wolfram.com/mathematica/tutorial/IntroductionToManipulate.cdf • http://reference.wolfram.com/mathematica/howto/CreateAComputableDocumentFormatFile.cdf • http://staff.jccc.edu/rgrondahl/tangentlines.html