# Quadratic Surface Identification from a Graph # P Yasskin, Jason Monschke and Austin Probe # ################################## #This maplet is intended to graphically display different quadratic surfaces with altered parameters and have students identify them. To that end it provides a basic function display window to show the appearance, equation and syntax of 8 basic quadratic surfaces. It also contains a stereo viewing element that can be utilized with 3D glassed, and a configuration window for the colors in this option. # # Header For All Maplets restart: with(Maplets[Elements]): with(Maplets[Tools]): with(plots): with(plottools): StartEngine(); randomize(): lightorange:="#FFB300": lightcyan:="#DDFFFF": lightblue:="#CFCFFF": lightgreen:="#CCFFCC": darkgreen:="#00C000": ColorBkgd:=wheat: ColorFooter:=lightcyan: ColorNewButton:=magenta: # or Make, Save, Enter Problem ColorReturnButton:=magenta: ColorCloseButton:=pink: # or Quit, Clear, Reset, Cancel ColorHintButton:=lightorange: # or Syntax ColorPrevButton:=turquoise: # or Update ColorEnterButton:=turquoise: ColorSimplifyButton:=turquoise: ColorCheckButton:=green: ColorShowButton:=lightorange: ColorPlotButton:=tan: ColorPlotButtonFrgd:=black: ColorTableBkgd:=lightgreen: ColorCalculatorBkgd:=gold: ColorMessage:=white: ColorMessageFrgd:=black: ColorInput:=turquoise: ColorInputFrgd:=black: ColorCorrect:=green: ColorCorrectFrgd:=black: ColorIncorrect:=red: ColorIncorrectFrgd:=white: ColorWarning:=yellow: ColorWarningFrgd:=black: ColorShow:=lightorange: ColorShowFrgd:=black: ColorHint:=lightorange: ColorHintFrgd:=black: # or Info, Syntax ColorDisable:=wheat: ColorDisableFrgd:=black: FontFooter:=Font("helvetica",10): FontSymbol:=Font("symbol",12): FontBig:=Font("times",24): LIBLogo:=cat(libname,"/M4C/M4C.png"): Logo:="M4C.png": #LIBLogo:=cat(libname,"/M4C/WebALT_logo.png"): #Logo:="WebALT_logo.png": # ################################## # # Template Translation Table For All Maplets TEXTLprogrammers:= "Programmers: D.B. Meade & P.B. Yasskin": TEXTLcopyright:= "@ Copyright: Maplets for Calculus 2008": #"@ Copyright: WebALT 2007-08": TEXTLversion:= "M4C 2008": TEXTBQuit:= "Quit": TEXTBClose:= "Close": TEXTBCheck:= "Check": TEXTBShow:= "Show": TEXTBShowAll:= "Show All Steps": TEXTBCheckAns:= "Check Answer": TEXTBShowAns:= "Show Answer": TEXTBInstructions:= "Instructions": TEXTBHint:= "Hint": TEXTBHints:= "Hints": TEXTBSyntax:= "Syntax": TEXTBHintSyntax:= "Hints and Syntax": TEXTBPrev:= "Preview": TEXTBUpdate:= "Update": TEXTBDerivation:= "Derivation": TEXTBNewProblem:= "New Problem": TEXTBNewFunction:= "New Function": TEXTBNewGraph:= "New Graph": TEXTBNewEquation:= "New Equation": TEXTBNewLimit:= "New Limit": TEXTBNewDerivative:= "New Derivative": TEXTBNewIntegral:= "New Integral": TEXTBNewSequence:= "New Sequence": TEXTBNewSeries:= "New Series": TEXTBNewDiffEq:= "New Differential Equation": TEXTBEnterProblem:= "Enter Problem": TEXTBEnterFunction:= "Enter Function": TEXTBEnterGraph:= "Enter Graph": TEXTBEnterEquation:= "Enter Equation": TEXTBEnterLimit:= "Enter Limit": TEXTBEnterDerivative:= "Enter Derivative": TEXTBEnterIntegral:= "Enter Integral": TEXTBEnterSequence:= "Enter Sequence": TEXTBEnterSeries:= "Enter Series": TEXTBEnterDiffEq:= "Enter Differential Equation": TEXTBMake:= "Modify or Make Your Own Problem": TEXTBUpdateClose:= "Update Problem and Close": #Eliminate TEXTBSaveClose:= "Save Problem and Close": #Use this one TEXTBAskQuestion:= "Ask Question": TEXTBNextQuestion:= "Next Question": TEXTBHowtoAnswer:= "How to Answer": TEXTBEnter:= "Enter": TEXTBOK:= "OK": TEXTBReturn:= "Return": TEXTBClear:= "Clear": TEXTBClearSelections:= "Clear Selections": TEXTBClearAll:= "Clear All Steps": TEXTBReset:= "Reset": TEXTBRestart:= "Restart": TEXTBCancel:= "Cancel": TEXTBPlot:= "Plot": TEXTBPlotIt:= "Plot It": TEXTBAnimate:= "Animate": TEXTBPlay:= "Play": TEXTBPause:= "Pause": TEXTBForward:= "Forward": TEXTBReverse:= "Reverse": TEXTBStep:= "Step": TEXTBUpdatePlot:= "Update Plot": TEXTBZoomIn:= "Zoom In": TEXTBZoomOut:= "Zoom Out": TEXTBPlotSetup:= "Plot Setup": TEXTBRefresh:= "Refresh": TEXTBSimplify:= "Simplify": TEXTBFactor:= "Factor": TEXTBExpand:= "Expand": TEXTBNormalize:= "Normalize": TEXTBRationalize:= "Rationalize": TEXTBSort:= "Sort": TEXTBDecimal:= "Decimal": TEXTBExact:= "Exact": TEXTCorrect:= " correct ": TEXTIncorrect:= "incorrect": TEXTWarning:= " warning ": TEXTShown:= " shown ": TEXTSlower:= "Slower": TEXTFaster:= "Faster": TEXTEnterFormula:= " Enter Formula:": TEXTEvaluate:= " Evaluate:": TEXTApproximate:= " Approximate:": TEXTand:= " and ": TEXTor:= " or ": TEXTThus:= " Thus ": TEXTSo:= " So ": TEXTType:= " Type ": TEXTfor:= " for ": TEXTorcheck:= " or check: ": TEXTvertical:= "vertical": TEXThorizontal:= "horizontal": TEXTCBDNE:= "does not exist": TEXTCB11scaling:= "1-1 scaling": TEXTCBDoNotShow:= "Do not show this window again.": TEXTRBNumeric:= "Numeric": TEXTRBSymbolic:= "Symbolic": TEXTRBTrue:= "True": TEXTRBFalse:= "False": TEXTRBT:= "T": TEXTRBF:= "F": TEXTRBPlot1:= "Plot # 1": TEXTRBPlot2:= "Plot # 2": TEXTRBPlot3:= "Plot # 3": TEXTRBconverge:= "converge": TEXTRBdiverge:= "diverge": TEXTRBconverges:= "converges": TEXTRBdiverges:= "diverges": TEXTtitlePROBLEM:= "Modify or Make Your Own Problem": TEXTtitlePREVIEW:= "Preview": TEXTtitleHINT:= "Hint": TEXTtitleSYNTAX:= "Syntax": TEXTCapGoal:= "Goal:": TEXTCapProbStat:= "Problem Statement:": TEXTCapSyntaxTutorial:= "Syntax Tutorial:": TEXTCapEnter:= "Enter:": TEXTCapTrueFalse:= "True or False?": TEXTCapCalculator:= "Calculator": TEXTCapPlot:= "Plot": TEXTCapLegend:= "Legend": TEXTCapEvaluate:= "Evaluate:": TEXTCapDataTable:= "Data Table": TEXTCapVis:= "Visualization": TEXTCapAnim:= "Animation": TEXTCapPreviewer:= "Previewer": TEXTCapHorRng:= "Horizontal Range:": TEXTCapVertRng:= "Vertical Range:": TEXTAnimWait:= " Please be patient while the animation is generated.": TEXTreplyNoCheck:= " You must enter an expression to be checked.": TEXTreplyNoPrev:= "You must enter an expression to be previewed.": TEXTreplyNoPlot:= " Please select a plot.": TEXTreplyNoSelection:= " Please select an answer.": DNEset:= {"", undefined, Undefined, UNDEFINED, divergent, Divergent, DIVERGENT, diverges, Diverges, DIVERGES, dne, DNE, doesnotexist, DoesNotExist}: great:=[ " Bullseye.", " Right on the mark.", " Great.", " That's absolutely right.", " Awesome. You're unstoppable.", " Correct.", " WOW, nailed that one.", " You got it!", " YES! Right on.", " Way to go.", " Don't stop now.", " I knew you could do it!", " Perfect. You're unstoppable.", " Radical Dude.", " Power house.", " Sweet! Keep on Rockin'.", " You rock!", " You got those mad skills.", " Awesome!", " Wowzers! That was great!", " Awesome man!", " Good job! You really know what you are doing.", " You're awesome kid.", " Tearing it up.", " Right on the money.", " High Five!!!!!", " Cool Beans.", " What a nerd!", " You're so money.", " You're a genious.", " You hit the nail on the head.", " Excellent!", " If I had a cookie, I'd give it to you.", " You're a winner.", " That's a winner.", " Whoop! Way to go.", " That's the way, ah ha ah ha, I like it.", " Oh yeah!", " You're the bomb!", " That was fantastic!", " Oh Snap!", " That's krunk!", NULL ]: nextgeneric:=[ " Keep it up.", " Keep going.", NULL ]: nextprob:=[ " On to the next problem.", " Try another problem.", " You're ready for another problem.", NULL ]: nextquest:=[ " On to the next question.", " Try another question.", " You're ready for another question.", NULL ]: nextpart:=[ " On to the next part.", " Try another part.", " You're ready for another part.", NULL ]: nextstep:=[ " On to the next step.", " Try another step.", " You're ready for another step.", NULL ]: nexteq:=[ " On to the next equation.", " Try another equation.", " Solve another equation.", " You're ready for another equation.", NULL ]: nextfn:=[ " On to the next quadratic surface.", " Try another quadratic surface.", " You're ready for another quadratic surface.", NULL ]: nextlim:=[ " On to the next limit.", " Try another limit.", " Compute another limit.", " You're ready for another limit.", " Find another limit.", NULL ]: nextderiv:=[ " On to the next derivative.", " Try another derivative.", " Compute another derivative.", " You're ready for another derivative.", " Differentiate another function", NULL ]: nextinteg:=[ " On to the next integral.", " Try another integral.", " Compute another integral.", " You're ready for another integral.", " Integrate another function", NULL ]: nextseq:=[ " On to the next sequence.", " Try another sequence.", " Find the limit of another sequence.", " You're ready for another sequence.", NULL ]: nextser:=[ " On to the next series.", " Try another series.", " Sum another series.", " You're ready for another series.", NULL ]: sorry:=[ " Sorry, that's not right.", " Nope, but don't give up.", " Not quite, it's a little off.", " Bummer, thought you would get it this time.", " Close, but no cigar.", " Slightly off.", " If you need help, please ask a human.", " I don't know where you went wrong.", " Sorry, killer problem.", " No, but don't blow it off.", " D'oh!", " That's whack.", " Yikes! Really close. You'll get it next time.", " Thought you would get it this time.", " Nice try, but your answer is wrong.", " Ask your neighbor for help.", " Brutal kid.", " That won't fly.", " So close and yet so far.", " So, that was just practice.", " Ooooh...close.", " A swing and a miss.", " Better luck next time.", " Oops.", " Tilt. Play again.", " I know you can do better.", " Sorry Charlie.", " Tisk, tisk. It's a tough one.", " It takes a lot of wrongs to make a right.", " Even Einstein didn't get everything right.", " Oh man, you were so close.", " Today's not your lucky day.", " Don't quit your day job.", " You're colder than a polar bear's toenail.", NULL ]: trygeneric:=[ " Fix your answer and check it again.", " Give it another try.", " Try again.", " Please try again.", NULL ]: tryhint:=[ " Try the hints and answer again.", " Read the hints and try again.", " Study the hints and answer again.", NULL ]: tryhelp:=[ " Try the Help menu and answer again.", " Look at the Help menu and try again.", NULL ]: showgeneric:=[ " OK That's just practice. But try doing it yourself.", " That's fine for practice. Try doing it yourself.", " Think about it and enter an answer yourself.", " Next time, compute an answer yourself.", " So that was practice. Try doing it yourself.", NULL ]: showhint:=[ " Next time, try the hints.", " Read the hints and enter an answer yourself.", NULL ]: showhelp:=[ " Next time, read the Help menu.", " Read the Help and enter an answer yourself.", NULL ]: # ################################## # # English Translation Table For Shift TEXTLasstprogrammer:= "Assistant Programmer: Jason Monschke and Austin Probe": TEXTtitleMAIN:= "Quadratic Surface Identification": TEXTtitleBASIC7:= "Basic 8 Quadratic Surfaces": TEXTconfig:= "Stereo Color Configuration": TEXTAlteredFunction:= "Show\nQuadratic Surface": TEXTBasicSurfaces:= "Show 8 Basic\nQuadratic Surfaces": TEXTleft:= "Left and\nNon-Stereo": TEXTright:= "Right": TEXTAnswereq:= "Enter the equation: ": TEXTGoal:= "Goal: Look at each graph and learn its basic shape:": TEXTstereo:= "Stereo": TEXTB1:= "Plot an Ellipsoid": TEXTB2:= "Plot a Hyperboloid of 1 sheet": TEXTB3:= "Plot a Hyperboloid of 2 sheets": TEXTB4:= "Plot an Elliptic Paraboloid": TEXTB5:= "Plot a Hyperbolic Paraboloid": TEXTB6:= "Plot a Cone": TEXTB7:= "Plot an Elliptic Cylinder": TEXTB8:= "Plot a Hyperbolic Cylinder": TEXTreply0:= " Click on Show 8 Basic Quadratic Surfaces to see the graphs of 8 basic quadratic surfaces.\n\n Click on Show Quadratic Surface to see one of the 8 basic quadratic surfaces with altered parameters.": TEXTreply1:= " This is the graph of one of the 8 basic quadratic surfaces with altered parameters. All parameters are integers between 1 and 3.\n\n Enter its equation below.": TEXTreply2:= " The new plot shows the ORIGINAL quadratic surface in BLUE and YOUR ANSWER in RED.\n\n Modify your answer and Check Your Answer again.": TEXTreply3:= "\n\n Click on Show Quadratic Surfaces for a new problem.": # ################################## # # Customize For Each Maplets nextlocal:=[ " On to the next plot.", " Try another plot.", " Analyze another plot.", " You're ready for another plot.", NULL ]: trylocal:=[ " Look at the sample plots and try again.", " Select the basic function and then shift it.", " Adding a positive number to x moves the function left. Try again.", " Adding a positive number to the function moves it up. Try again.", NULL ]: showlocal:=[ " Look at the sample plots and try it yourself.", " Select the basic function and then shift it.", " Try doing it yourself. Adding a positive number to x moves the function left.", " Try doing it yourself. Adding a positive number to the function moves it up.", NULL ]: nexts1:=[ #Keep what is appropriate. This is for all but the last check. op(nextgeneric), op(nextprob), op(nextquest), op(nextpart), op(nextstep), op(nextlocal), NULL ]: nexts2:=[ #Keep what is appropriate. This is for the last check. op(nextgeneric), op(nextprob), op(nextquest), #op(nexteq), op(nextfn), #op(nextlim), #op(nextderiv), #op(nextinteg), #op(nextseq), #op(nextser), op(nextlocal), NULL ]: trys:=[ #Keep what is appropriate. op(trygeneric), op(tryhint), op(tryhelp), op(trylocal), NULL ]: shows:=[ #Keep what is appropriate. op(showgeneric), op(showhint), op(showhelp), op(showlocal), NULL ]: randgreat:=rand(1..nops(great)): randnext1:=rand(1..nops(nexts1)): randnext2:=rand(1..nops(nexts2)): randsorry:=rand(1..nops(sorry)): randtry:=rand(1..nops(trys)): randshow:=rand(1..nops(shows)): # ################################## func:=[ [(x-x_shift)^2-(y-y_shift)^2-(z-z_shift)^2=1],[ -(x-x_shift)^2+(y-y_shift)^2+(z-z_shift)^2=1],[ (x-x_shift)-(y-y_shift)^2-(z-z_shift)^2=0],[ (z-z_shift)-Radius=1/(x_radius^2)*(x-x_shift)^2-1/(y_radius^2)*(y-y_shift)^2],[ (z-z_shift)-Radius=1/(x_radius^2)*(x-x_shift)^2+1/(y_radius^2)*(y-y_shift)^2],[ 1/(x_radius^2)*(x-x_shift)^2+1/(y_radius^2)*(y-y_shift)^2+1/(z_radius^2)*(z-z_shift)^2=1],[ 1/(x_radius^2)*(x-x_shift)^2+1/(y_radius^2)*(y-y_shift)^2=Radius^2],[ 1/(x_radius^2)*(x-x_shift)^2-1/(y_radius^2)*(y-y_shift)^2=Radius^2] ]: randfunc:=rand(1..nops(func)): xshift:=rand(-3..3): yshift:=rand(-3..3): zshift:=rand(-3..3): xradius:=rand(1..3): yradius:=rand(1..3): zradius:=rand(1..3): radius:=rand(1..3): RR:=0: GR:=1: BR:=1: RL:=1: GL:=0: BL:=0: RandGen:=proc() global hshift, vshift, answer, x, func, randfunc, rand3,plotfunc,xshift,yshift,zshift,xradius,yradius,zradius,radius,x_shift,y_shift,z_shift,x_radius,y_radius,z_radius,Radius; x_shift:=xshift(): y_shift:=yshift(): z_shift:=zshift(): x_radius:=xradius(): y_radius:=yradius(): z_radius:=zradius(): Radius:=radius(): end proc: New_Shifted_Graph:=proc() global hshift, vshift, answer, x, func, randfunc, rand3,plotfunc,xshift,yshift,zshift,xradius,yradius,zradius,radius,x_shift,y_shift,z_shift,x_radius,y_radius,z_radius,Radius; local p1; options `Copyright 2002-07, Philip B. Yasskin and Douglas Meade, Maplets for Calculus`; RandGen(); plotfunc:=func[randfunc()]; p1:=implicitplot3d(plotfunc, x=(-7+x_shift)..(7+x_shift), y=(-7+y_shift)..(7+y_shift),z=(-7+z_shift)..(7+z_shift),transparency=.7, scaling=constrained,axes=normal, color=blue,style=patchnogrid , numpoints=15000): Set(PL1=plots[display](p1)): Set(reply=TEXTreply1, reply(background)=ColorMessage, reply(foreground)=ColorMessageFrgd): Set(TF1=""): Set(Bcheck(enabled)=true, Bcheck(background)=ColorCheckButton); Set(Bshow(enabled)=true, Bshow(background)=ColorShowButton); end proc: Check_Answer:=proc() global hshift, vshift, answer, x, func, randfunc, rand3,plotfunc,xshift,yshift,zshift,xradius,yradius,zradius,radius,x_shift,y_shift,z_shift,x_radius,y_radius,z_radius,Radius, great, randgreat, sorry, randsorry; local user_answer, p1, p2; options `Copyright 2002-07, Philip B. Yasskin and Douglas Meade, Maplets for Calculus`; if Get(TF1)="" then Set(reply=TEXTreplyNoCheck, reply(background)=ColorWarning, reply(foreground)= ColorWarningFrgd); return; end if; user_answer:=Get(TF1::equation, corrections=true, update=true): if simplify(normal(abs(rhs(plotfunc[1])-lhs(plotfunc[1])) - abs(rhs(user_answer)-lhs(user_answer))))<> 0 then p1:=implicitplot3d(plotfunc, x=(-7+x_shift)..(7+x_shift), y=(-7+y_shift)..(7+y_shift),z=(-7+z_shift)..(7+z_shift),transparency=.7, scaling=constrained,axes=normal, color=blue,style=patchnogrid , numpoints=5000): p2:=implicitplot3d(user_answer, x=(-7+x_shift)..(7+x_shift), y=(-7+y_shift)..(7+y_shift),z=(-7+z_shift)..(7+z_shift),transparency=.7, scaling=constrained,axes=normal, color=red,style=patchnogrid , numpoints=15000): Set(PL1=plots[display]( p1,p2 )): Set(reply=cat(sorry[randsorry()], TEXTreply2), reply(background)=ColorIncorrect, reply(foreground)=ColorIncorrectFrgd): else p1:=implicitplot3d(user_answer, x=(-7+x_shift)..(7+x_shift), y=(-7+y_shift)..(7+y_shift),z=(-7+z_shift)..(7+z_shift),transparency=.7, scaling=constrained,axes=normal, color=green,style=patchnogrid , numpoints=15000): Set(PL1=plots[display]( p1 )): Set(reply=cat(great[randgreat()], nexts2[randnext2()], TEXTreply3), reply(background)=ColorCorrect, reply(foreground)=ColorCorrectFrgd): end if; end proc: Show_Answer:=proc() global plotfunc, x; options `Copyright 2002-07, Philip B. Yasskin and Douglas Meade, Maplets for Calculus`; Set(TF1=plotfunc[1]): Set(reply=shows[randshow()], reply(background)=ColorShow, reply(foreground)=ColorShowFrgd): end proc: StereoPlot:=proc(eq) global RR,GR,BR,RL,GL,BL; local p1, p2, p4,CBS: CBS:=Get(CBStereo::truefalse): if CBS=true then p1:=implicitplot3d(eq, x=-5..5,y=-5..5,z=-5..5, color=COLOR(RGB, RL,GL,BL), style=wireframe, scaling=constrained, light=[60,30,1,0,0], grid=[15,15,15], axes=normal); p2:=implicitplot3d(eq, x=-5..5,y=-5..5,z=-5..5, color=COLOR(RGB, RR,GR,BR), style=wireframe, scaling=constrained, light=[60,30,1,0,0], grid=[15,15,15]); Set(PL2=display([rotate(p2,0,0,Pi/72),p1])): elif CBS=false then p1:=implicitplot3d(eq, x=-5..5,y=-5..5,z=-5..5, color=COLOR(RGB, RL,GL,BL), style=patchnogrid,transparency=.5, scaling=constrained, grid=[15,15,15], axes=normal); Set(PL2=display(p1)): end if: end proc: leftcolor:=proc() global RL,GL,BL;local Red,Green,Blue; options `Copyright 2006, Philip B. Yasskin and Douglas Meade, Maplets for Calculus`; Red:=Get(SL1); RL:=(Red/100.0); Green:=Get(SL2); GL:=(Green/100.0); Blue:=Get(SL3); BL:=(Blue/100.0); Set(lcol=plot3d(0,x=-10..10,y=-10..10 ,style=patchnogrid, color=[RL,GL,BL])); end proc: rightcolor:=proc() global RR,GR,BR;local Red,Green,Blue; options `Copyright 2006, Philip B. Yasskin and Douglas Meade, Maplets for Calculus`; Red:=Get(SR1); RR:=(Red/100.0); Green:=Get(SR2); GR:=(Green/100.0); Blue:=Get(SR3); BR:=(Blue/100.0); Set(rcol=plot3d(0,x=-10..10,y=-10..10 ,style=patchnogrid, color=[RR,GR,BR])); end proc: Shift_Function:=Maplet(onstartup=RunWindow(MAIN), Window[MAIN]( title=TEXTtitleMAIN, defaultbutton=Bcheck, [ halign=none, inset=0, spacing=0, background=ColorBkgd, [ halign=none, inset=0, spacing=0, background=ColorBkgd, [ halign=none, inset=0, background=ColorBkgd, Button(TEXTAlteredFunction, width=150, Evaluate(function="New_Shifted_Graph"), background=ColorNewButton), Button(TEXTBasicSurfaces, height=50, width=150, onclick=RunWindow(BASIC7), background=ColorHintButton) ], [ halign=none, inset=0, spacing=0, background=ColorBkgd, border=true, caption=TEXTCapPlot, [ halign=none, inset=0, spacing=0, background=ColorPlotButton, border=true, Plotter[PL1](plot3d(0, x=-5..5,y=-5..5,style=patchnogrid,transparency=1,axes=normal, tickmarks=[[$-5..5],[$-5..5],[$-5..5]]), width=400, height=400) ] ] ], BoxRow( background=ColorBkgd, inset=0, border=true, TextBox[reply](TEXTreply0, width=50, height=5, editable=false, background=ColorMessage), Label(Image(Logo)), Label(Image(LIBLogo)) ), BoxRow( background=ColorBkgd, HorizontalGlue(), TEXTAnswereq, TextField[TF1](width=20, background=ColorInput), HorizontalGlue() ), BoxRow( background=ColorBkgd, inset=0, spacing=0, border=true, HorizontalGlue(), Button[Bcheck](TEXTBCheckAns, Evaluate(function="Check_Answer"), enabled=false, background=ColorDisable), HorizontalGlue(), Button[Bshow](TEXTBShowAns, Evaluate(function="Show_Answer"), enabled=false, background=ColorDisable), HorizontalGlue(), Button(TEXTBQuit, Shutdown(), background=ColorCloseButton), HorizontalGlue() ), BoxColumn( halign=none, background=ColorFooter, inset=0, spacing=0, [ background=ColorFooter, inset=0, spacing=0, Label(TEXTLprogrammers, font=FontFooter), " ", HorizontalGlue(), Label(TEXTLcopyright, font=FontFooter), " ", HorizontalGlue(), Label(TEXTLversion, font=FontFooter) ], [ background=ColorFooter, inset=0, spacing=0, Label(TEXTLasstprogrammer, font=FontFooter), HorizontalGlue() ] ) ]), Window[BASIC7]( title=TEXTtitleBASIC7, [ halign=none, background=ColorBkgd, inset=0, spacing=0, [ background=ColorBkgd, inset=10, TEXTGoal, HorizontalGlue(), CheckBox[CBStereo](TEXTstereo,value = false, background=ColorBkgd), Button("Configuration", RunWindow(Config), background=ColorCloseButton), Button(TEXTBClose, CloseWindow(BASIC7), background=ColorCloseButton) ], [ halign=none, background=ColorBkgd, inset=0, [ background=ColorBkgd, inset=0, spacing=0, border=true, caption=TEXTtitleBASIC7, Button(TEXTB1, width=300, onclick=A1, background=ColorPlotButton, foreground=ColorPlotButtonFrgd), Button(TEXTB2, width=300, onclick=A2, background=ColorPlotButton, foreground=ColorPlotButtonFrgd), Button(TEXTB3, width=300, onclick=A3, background=ColorPlotButton, foreground=ColorPlotButtonFrgd), Button(TEXTB4, width=300, onclick=A4, background=ColorPlotButton, foreground=ColorPlotButtonFrgd), Button(TEXTB5, width=300, onclick=A5, background=ColorPlotButton, foreground=ColorPlotButtonFrgd), Button(TEXTB6, width=300, onclick=A6, background=ColorPlotButton, foreground=ColorPlotButtonFrgd), Button(TEXTB7, width=300, onclick=A7, background=ColorPlotButton, foreground=ColorPlotButtonFrgd), Button(TEXTB8, width=300, onclick=A8, background=ColorPlotButton, foreground=ColorPlotButtonFrgd) ], [ halign=none, inset=0, spacing=0, background=ColorBkgd, border=true, caption=TEXTCapPlot, [ halign=none, inset=0, spacing=0, background=ColorPlotButton, border=true, Plotter[PL2](plot3d(0, x=-5..5,y=-5..5,style=patchnogrid,transparency=1,axes=normal, tickmarks=[[$-5..5],[$-5..5],[$-5..5]]), width=275, height=275) ] ] ], [ background=ColorBkgd, inset=0, border=true, caption=TEXTCapSyntaxTutorial, " ", TEXTType, TextField[function](editable=false, width=20, background=ColorMessage), TEXTfor, MathMLViewer[MML](width=200, height=55), " ", Label(Image(Logo)), Label(Image(LIBLogo)) ], BoxColumn( halign=none, background=ColorFooter, inset=0, spacing=0, [ background=ColorFooter, inset=0, spacing=0, Label(TEXTLprogrammers, font=FontFooter), " ", HorizontalGlue(), Label(TEXTLcopyright, font=FontFooter), " ", HorizontalGlue(), Label(TEXTLversion, font=FontFooter) ], [ background=ColorFooter, inset=0, spacing=0, Label(TEXTLasstprogrammer, font=FontFooter), HorizontalGlue() ] ) ]), Window[Config](title=TEXTconfig, [ halign=none, background=ColorBkgd, border=true, [TEXTleft,Plotter[lcol](width=200,value =plot3d(0,x=-10..10,y=-10..10 ,style=patchnogrid, color=red), height=200),TEXTright,Plotter[rcol](width=200, height=200,value =plot3d(0,x=-10..10,y=-10..10 ,style=patchnogrid, color=cyan))], [ "R",halign=none, background=ColorBkgd, HorizontalGlue(), Slider[SL1](0..100, 100, 'showticks', 'majorticks'=20, 'minorticks'=10, 'snapticks'=false,Evaluate(function= "leftcolor"))," ", Slider[SR1](0..100, 00, 'showticks', 'majorticks'=20, 'minorticks'=10, 'snapticks'=false,Evaluate(function= "rightcolor")) ], [ "G",halign=none, background=ColorBkgd, HorizontalGlue(), Slider[SL2](0..100, 00, 'showticks', 'majorticks'=20, 'minorticks'=10, 'snapticks'=false,Evaluate(function= "leftcolor"))," ", Slider[SR2](0..100, 100, 'showticks', 'majorticks'=20, 'minorticks'=10, 'snapticks'=false,Evaluate(function= "rightcolor")) ], [ "B",halign=none, background=ColorBkgd, HorizontalGlue(), Slider[SL3](0..100, 00, 'showticks', 'majorticks'=20, 'minorticks'=10, 'snapticks'=false,Evaluate(function= "leftcolor"))," ", Slider[SR3](0..100, 100, 'showticks', 'majorticks'=20, 'minorticks'=10, 'snapticks'=false,Evaluate(function= "rightcolor")) ], Button(TEXTBClose, CloseWindow(Config), background=ColorCloseButton) ]), #Close Window Window[Hintmain](title=TEXTtitleSYNTAX, [ background=ColorBkgd, border=true, TextBox(TEXTHintmain, width=75, height=8, editable=false, background=ColorHint, foreground=ColorHintFrgd), Button(TEXTBClose, CloseWindow(Hintmain), background=ColorCloseButton) ]), #Close Window) ButtonGroup[BGrngright]() , Action[A1](Evaluate(function="StereoPlot(1/9*x^2+1/16*y^2+1/4*z^2=1)"), SetOption(function="1/9*x^2+1/16*y^2+1/4*z^2=1"), SetOption(MML(value)=MathML[Export](` `*1/9*x^2+1/16*y^2+1/4*z^2=1))), Action[A2](Evaluate(function="StereoPlot(-x^2+y^2+z^2=1)"), SetOption(function="-x^2+y^2+z^2=1"), SetOption(MML(value)=MathML[Export](` `&*(-(x^2))+y^2+z^2=1))), Action[A3](Evaluate(function="StereoPlot(x^2-y^2-z^2=1)"), SetOption(function="x^2-y^2-z^2=1"), SetOption(MML(value)=MathML[Export](` `*x^2-y^2-z^2=1))), Action[A4](Evaluate(function="StereoPlot(x-y^2-z^2=0)"), SetOption(function="x-y^2-z^2=0"), SetOption(MML(value)=MathML[Export](` `*x-y^2-z^2=0))), Action[A5](Evaluate(function="StereoPlot(x-y^2+z^2=0)"), SetOption(function="x-y^2+z^2=0"), SetOption(MML(value)=MathML[Export](` `*x-y^2+z^2=0))), Action[A6](Evaluate(function="StereoPlot(x^2-y^2=z^2)"), SetOption(function="x^2-y^2=z^2"), SetOption(MML(value)=MathML[Export](` `*x^2-y^2=z^2))), Action[A7](Evaluate(function="StereoPlot(1/9*x^2+1/16*y^2=1)"), SetOption(function="1/9*x^2+1/16*y^2=1"), SetOption(MML(value)=MathML[Export](` `*1/9*x^2+1/16*y^2=1))), Action[A8](Evaluate(function="StereoPlot(1/9*x^2-1/4*y^2=-1)"), SetOption(function="1/9*x^2-1/4*y^2=-1"), SetOption(MML(value)=MathML[Export](` `*1/9*x^2-1/4*y^2=-1))) ): Maplets[Display]( Shift_Function ):