<?xml version="1.0" encoding="UTF-8"?>
<Worksheet>
<Version major="11" minor="1"/>
<Label-Scheme value="2" prefix=""/>
<View-Properties presentation="false"></View-Properties>
<MapleNet-Properties warnlevel="3" longdelim="true" plotoptions="" echo="1" errorcursor="false" elisiontermsthreshold="10000" elisiontermsbefore="100" errorbreak="1" prettyprint="3" prompt="&gt; " latexwidth="6.0" useclientjvm="true" ansi="false" screenheight="25" labelwidth="20" plotdevice="inline" typesetting="standard" displayprecision="-1" indentamount="4" elisiondigitsthreshold="10000" quiet="false" plotoutput="terminal" rtablesize="10" preplot="" showassumed="0" plotdriver="openviz" elisiontermsafter="100" labelling="true" postplot="" screenwidth="79" elisiondigitsbefore="100" elisiondigitsafter="100" verboseproc="1" imaginaryunit="I" ShowLabels="true"/>
<Styles><Font name="Heading 4" background="[255,255,255]" bold="false" executable="false" family="Serif" foreground="[0,0,0]" italic="true" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Ordered List 5" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Ordered List 1" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Text Output" background="[255,255,255]" bold="false" executable="false" family="Monospaced" foreground="[0,0,255]" italic="false" opaque="false" readonly="true" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Bullet Item" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Equation Label" background="[255,255,255]" bold="true" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Author" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Text" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Diagnostic" background="[255,255,255]" bold="false" executable="false" family="Monospaced" foreground="[40,120,40]" italic="false" opaque="false" readonly="true" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Heading 2" background="[255,255,255]" bold="true" executable="false" family="Serif" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="16" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Page Number" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="10" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Ordered List 3" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Maple Plot" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Normal" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Maple Input" background="[255,255,255]" bold="true" executable="true" family="Monospaced" foreground="[255,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Annotation Title" background="[255,255,255]" bold="true" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="18" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="2D Output" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,255]" italic="false" opaque="false" readonly="true" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="2D Inert Output" background="[255,255,255]" bold="false" executable="true" family="Times New Roman" foreground="[144,144,144]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Dictionary Hyperlink" background="[255,255,255]" bold="false" executable="false" family="Serif" foreground="[147,0,15]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="true" placeholder="false"/>
<Font name="Dash Item" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Heading 3" background="[255,255,255]" bold="true" executable="false" family="Serif" foreground="[0,0,0]" italic="true" opaque="false" readonly="false" size="14" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Ordered List 4" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Maple Output" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="List Item" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="2D Input" background="[255,255,255]" bold="false" executable="true" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Line Printed Output" background="[255,255,255]" bold="false" executable="false" family="Monospaced" foreground="[0,0,255]" italic="false" opaque="false" readonly="true" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Maple Input Placeholder" background="[255,255,255]" bold="true" executable="true" family="Monospaced" foreground="[200,0,200]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="true"/>
<Font name="2D Math" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Error" background="[255,255,255]" bold="false" executable="false" family="Monospaced" foreground="[255,0,255]" italic="false" opaque="false" readonly="true" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Warning" background="[255,255,255]" bold="false" executable="false" family="Monospaced" foreground="[0,0,255]" italic="false" opaque="false" readonly="true" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Heading 1" background="[255,255,255]" bold="true" executable="false" family="Serif" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="18" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Annotation Text" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Title" background="[255,255,255]" bold="true" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="18" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Ordered List 2" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Hyperlink" background="[255,255,255]" bold="false" executable="false" family="Serif" foreground="[0,128,128]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="true" placeholder="false"/>
<Layout name="Ordered List 5" alignment="left" bullet="ROMAN" firstindent="0" leftmargin="144" rightmargin="0" linespacing="0.0" spaceabove="3" spacebelow="3" linebreak="space" pagebreak-before="false" initial="-1" bulletsuffix=""/>
<Layout name="Heading 4" alignment="left" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="0" spacebelow="0" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Text Output" alignment="left" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="0" spacebelow="0" linebreak="newline" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Ordered List 1" alignment="left" bullet="numeric" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="3" spacebelow="3" linebreak="space" pagebreak-before="false" initial="-1" bulletsuffix=""/>
<Layout name="Annotation Title" alignment="centred" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="12" spacebelow="12" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Bullet Item" alignment="left" bullet="dot" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="3" spacebelow="3" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Author" alignment="centred" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="8" spacebelow="8" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Dash Item" alignment="left" bullet="dash" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="3" spacebelow="3" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Heading 3" alignment="left" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="0" spacebelow="0" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Diagnostic" alignment="left" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="0" spacebelow="0" linebreak="any" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Ordered List 4" alignment="left" bullet="ALPHABETIC" firstindent="0" leftmargin="108" rightmargin="0" linespacing="0.0" spaceabove="3" spacebelow="3" linebreak="space" pagebreak-before="false" initial="-1" bulletsuffix=""/>
<Layout name="Maple Output" alignment="centred" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.3" spaceabove="0" spacebelow="0" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Line Printed Output" alignment="left" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="0" spacebelow="0" linebreak="any" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="List Item" alignment="left" bullet="indent" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="3" spacebelow="3" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Heading 2" alignment="left" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="8" spacebelow="2" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Ordered List 3" alignment="left" bullet="roman" firstindent="0" leftmargin="72" rightmargin="0" linespacing="0.0" spaceabove="3" spacebelow="3" linebreak="space" pagebreak-before="false" initial="-1" bulletsuffix=""/>
<Layout name="Error" alignment="left" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="0" spacebelow="0" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Maple Plot" alignment="centred" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="0" spacebelow="0" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Warning" alignment="left" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="0" spacebelow="0" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Heading 1" alignment="left" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="8" spacebelow="4" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Title" alignment="centred" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="12" spacebelow="12" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Ordered List 2" alignment="left" bullet="alphabetic" firstindent="0" leftmargin="36" rightmargin="0" linespacing="0.0" spaceabove="3" spacebelow="3" linebreak="space" pagebreak-before="false" initial="-1" bulletsuffix=""/>
<Layout name="Normal" alignment="left" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="0" spacebelow="0" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Pencil-style name="Pencil 3" pen-color="[0,0,0]" pen-height="3.0" pen-width="3.0" pen-opacity="1.0"/>
<Pencil-style name="Pencil 1" pen-color="[0,0,0]" pen-height="1.0" pen-width="1.0" pen-opacity="1.0"/>
<Pencil-style name="Pencil 5" pen-color="[255,0,0]" pen-height="5.0" pen-width="5.0" pen-opacity="1.0"/>
<Pencil-style name="Pencil 2" pen-color="[0,0,255]" pen-height="1.0" pen-width="1.0" pen-opacity="1.0"/>
<Pencil-style name="Pencil 4" pen-color="[0,0,255]" pen-height="3.0" pen-width="3.0" pen-opacity="1.0"/>
<Highlighter-style name="Highlighter 2" pen-color="[255,204,0]" pen-height="14.0" pen-width="14.0" pen-opacity="0.8"/>
<Highlighter-style name="Highlighter 4" pen-color="[0,255,255]" pen-height="32.0" pen-width="32.0" pen-opacity="0.8"/>
<Highlighter-style name="Highlighter 3" pen-color="[51,255,0]" pen-height="24.0" pen-width="24.0" pen-opacity="0.8"/>
<Highlighter-style name="Highlighter 1" pen-color="[255,153,255]" pen-height="12.0" pen-width="8.0" pen-opacity="0.8"/>
<Highlighter-style name="Highlighter 5" pen-color="[255,255,0]" pen-height="48.0" pen-width="48.0" pen-opacity="0.8"/>
</Styles>
<Task-table>
    <Task-category name="&lt;default&gt;">
    </Task-category>
</Task-table>
<Annotation-table>
    <Annotation-category name="&lt;default&gt;">
    </Annotation-category>
</Annotation-table>
<Task>
</Task>
<Group labelreference="L27" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">restart:
randomize():</Text-field>
</Input>
</Group>
<Group labelreference="L29" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">with(Maplets[Tools]): with(Maplets[Elements]): with(plots):with(student):with(StringTools):
StartEngine();</Text-field>
</Input>
</Group>
<Group labelreference="L49" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">QSurfaces:= Maplet(onstartup = RunWindow(MAIN),
  Window[MAIN](title=&quot;Quadric Surfaces&quot;,
    [halign=none,
       [ Button(&quot;New Question&quot;, Evaluate(function = &quot;askNQ&quot;)),
         HorizontalGlue(),
         Button(&quot;Quit&quot;, Shutdown())
       ],
       [ border=true,
         caption=&quot;Consider the quadric equation:&quot;, 
         MathMLViewer[EQN](width=500, height=60, background=white)
       ],
       [ border=true,
         caption=&quot;Write the equation in standard form:&quot;, 
         TextField[stdform](width=60),
         Button(&quot;Check&quot;, Evaluate(function = &quot;check_std&quot;)),
         Button(&quot;Show&quot;, Evaluate(function = &quot;show_std&quot;))
       ],
       [ border=true,
         caption=&quot;Identify the type of quadric surface:&quot;,
         RadioButton[RB1](&quot;Sphere&quot;,group=BG1),
         RadioButton[RB2](&quot;Ellipsoid&quot;,group=BG1),
         RadioButton[RB3](&quot;Hyperboloid&quot;,group=BG1),
         RadioButton[RB4](&quot;Cone&quot;,group=BG1),
         RadioButton[RB5](&quot;Paraboloid&quot;,group=BG1),
         RadioButton[RB6](&quot;Cylinder&quot;,group=BG1),
         HorizontalGlue(),
         Button(&quot;Check&quot;, Evaluate(function = &quot;check_shape&quot;)),
         Button(&quot;Show&quot;, Evaluate(function = &quot;show_shape&quot;))
        ],
        BoxColumn[typecol]( border=true, halign=none, valign=none, inset=0, spacing=0, 
         caption=&quot;Properties of the surface:&quot;,
          [ # Sphere
            Label[Lspcenter](&quot;Center:  [p,q,r] =&quot;, visible=false),
            TextField[CenterS](&quot;[       ]&quot;,width=10, visible=false),
            HorizontalGlue(),
            Label[Lspradius](&quot;Radius:  R =&quot;, visible=false),
            TextField[RadiusSp](width=5, visible=false),
            HorizontalGlue(),
            Button[Bspcheck](&quot;Check&quot;, Evaluate(function = &quot;check_sphere&quot;), visible=false),
            Button[Bspshow](&quot;Show&quot;, Evaluate(function = &quot;show_sphere&quot;), visible=false)
          ],
          [ # Ellipsoid
            Label[Lelcenter](&quot;Center:  [p,q,r] =&quot;,visible=false),
            TextField[CenterE](&quot;[       ]&quot;,width=10, visible=false),
            HorizontalGlue(),
            Label[Lelrada](&quot;Radii:  a =&quot;,visible=false),
            TextField[RadiusEa](width=5, visible=false),
            Label[Lelradb](&quot;b =&quot;, visible=false),
            TextField[RadiusEb](width=5, visible=false),
            Label[Lelradc](&quot;c =&quot;, visible=false),
            TextField[RadiusEc](width=5, visible=false),
            HorizontalGlue(),
            Button[Bellcheck](&quot;Check&quot;, Evaluate(function = &quot;check_ellipsoid&quot;), visible=false),
            Button[Bellshow](&quot;Show&quot;, Evaluate(function = &quot;show_ellipsoid&quot;), visible=false)  
          ],
          [ # Hyperboloid
            Label[Lhycenter](&quot;Center:  [p,q,r] =&quot;,visible=false),
            TextField[CenterH](&quot;[       ]&quot;,width=10, visible=false),
            HorizontalGlue(),
            Label[Lhyaxis](&quot;Axis:&quot;, visible=false),
            RadioButton[HyAxisx](&quot;x&quot;,group=Axis, visible=false),
            RadioButton[HyAxisy](&quot;y&quot;,group=Axis, visible=false),
            RadioButton[HyAxisz](&quot;z&quot;,group=Axis, visible=false),
            HorizontalGlue(),
            Label[Lhysheets](&quot;Sheets:&quot;, visible=false),
            RadioButton[onesheet](&quot;1&quot;,group=Sheet, visible=false),
            RadioButton[twosheet](&quot;2&quot;,group=Sheet, visible=false),
            HorizontalGlue(),
            Button[Bhycheck](&quot;Check&quot;, Evaluate(function = &quot;check_hyperboloid&quot;), visible=false),
            Button[Bhyshow](&quot;Show&quot;, Evaluate(function = &quot;show_hyperboloid&quot;), visible=false) 
          ],
          [ # Cone
            Label[Lcovert](&quot;Vertex:  [p,q,r] =&quot;,visible=false),
            TextField[VertexC](&quot;[       ]&quot;,width=10, visible=false),
            HorizontalGlue(),
            Label[Lcoaxis](&quot;Axis:&quot;,visible=false), 
            RadioButton[CoAxisx](&quot;x-axis&quot;,group=Axis, visible=false),
            RadioButton[CoAxisy](&quot;y-axis&quot;,group=Axis, visible=false),
            RadioButton[CoAxisz](&quot;z-axis&quot;,group=Axis, visible=false),
            HorizontalGlue(),
            Button[Bcocheck](&quot;Check&quot;, Evaluate(function = &quot;check_cone&quot;), visible=false),
            Button[Bcoshow](&quot;Show&quot;, Evaluate(function = &quot;show_cone&quot;), visible=false)
          ],
          BoxColumn( valign=none, inset=0, spacing=0, 
            [ # Paraboloid
              Label[Lparaaxis](&quot;Axis:&quot;, visible=false), 
              RadioButton[Paraaxisx](&quot;x&quot;,group=Axis, visible=false),
              RadioButton[Paraaxisy](&quot;y&quot;,group=Axis, visible=false),
              RadioButton[Paraaxisz](&quot;z&quot;,group=Axis, visible=false),
              HorizontalGlue(),
              Label[Lparatype](&quot;Type:&quot;, visible=false),
              RadioButton[RBP1](&quot;Elliptic  &quot;,group=BGP, visible=false),
              RadioButton[RBP2](&quot;Hyperbolic&quot;,group=BGP, visible=false),
              HorizontalGlue(),
              HorizontalGlue()
            ],
            [ 
            Label[Lvert](&quot;Vertex:  [p,q,r] =&quot;, visible=false),
            TextField[ParaVertex](&quot;[       ]&quot;,width=10, visible=false),
              HorizontalGlue(),
              Button[Bparacheck](&quot;Check&quot;, Evaluate(function = &quot;check_paraboloid&quot;), visible=false),
              Button[Bparashow](&quot;Show&quot;, Evaluate(function = &quot;show_paraboloid&quot;), visible=false)
            ]          
          ),
          BoxColumn( valign=none, inset=0, spacing=0, 
            [ # Cylinder
              Label[LAxiscyl](&quot;Axis:&quot;, visible=false),
              RadioButton[Cylaxisx](&quot;x&quot;,group=Axis, visible=false),
              RadioButton[Cylaxisy](&quot;y&quot;,group=Axis, visible=false),
              RadioButton[Cylaxisz](&quot;z&quot;,group=Axis, visible=false),
              HorizontalGlue(),
              Label[Lcyltype](&quot;Type:&quot;, visible=false),
              RadioButton[RBC1](&quot;Circular&quot;,group=BG2, visible=false), 
              RadioButton[RBC2](&quot;Elliptic&quot;,group=BG2, visible=false), 
              RadioButton[RBC3](&quot;Hyperbolic&quot;,group=BG2, visible=false),
              RadioButton[RBC4](&quot;Parabolic&quot;,group=BG2, visible=false),
              HorizontalGlue(),
              HorizontalGlue()
            ],
            [ 
              Label[Lcylcenter](&quot;Center or Vertex: (Axis coordinate is 0.)  [p,q,r] =&quot;, visible=false),
              TextField[Cylcenter](&quot;[       ]&quot;,width=10, visible=false),
              HorizontalGlue(),
              Button[Bcylcheck](&quot;Check&quot;, Evaluate(function = &quot;check_cylinder&quot;), visible=false),
              Button[Bcylshow](&quot;Show&quot;, Evaluate(function = &quot;show_cylinder&quot;), visible=false)
            ]          
          )
        ),
        [ 
          TextField[reply](width=10, editable=false, background=white)
        ],
        [
          &quot;Programmers: Shu Ho &amp; Amy Su.&quot;,
          HorizontalGlue(),
          &quot;Copyright 2008 P. Yasskin.&quot;
        ]
      ]   
  ),
  ButtonGroup[BG1](),
  ButtonGroup[BG2](),
  ButtonGroup[BGP](),
  ButtonGroup[Axis](),
  ButtonGroup[Sheet]()
):</Text-field>
</Input>
</Group>
<Group labelreference="L53" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"></Text-field>
</Input>
</Group>
<Group labelreference="L52" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">rand6:=rand(1..6):</Text-field>
</Input>
</Group>
<Group labelreference="L55" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">rand2:=rand(1..2):</Text-field>
</Input>
</Group>
<Group labelreference="L51" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">randm33:=rand(-3..3):</Text-field>
</Input>
</Group>
<Group labelreference="L50" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">rand3:=rand(1..3):</Text-field>
</Input>
</Group>
<Group labelreference="L56" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">rand3:=rand(1..3):</Text-field>
</Input>
</Group>
<Group labelreference="L58" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"></Text-field>
</Input>
</Group>
<Group labelreference="L33" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" linebreak="space" spaceabove="0" rightmargin="0" bullet="none" firstindent="0" bulletsuffix="" linespacing="0.0" pagebreak-before="false" leftmargin="0" alignment="left" initial="0" spacebelow="0">askNQ:=proc()
global probtype, subprobtype, stdfrm,axis,radlen, a,b,c,g,h,i;
local rgt, givenfrm;
probtype:=rand6();#rand6();
subprobtype:=rand2();
g:=randm33();
h:=randm33();
i:=randm33();
a:=rand3();
b:=rand3();
c:=rand3();
radlen:=rand6()^2;#radius length
rgt:=lcm(a^2,b^2,c^2);
axis:=rand3();

Set(stdform = &quot;&quot;);
Set(RB1=false);
Set(RB2=false);
Set(RB3=false);
Set(RB4=false);
Set(RB5=false);
Set(RB6=false);

if probtype=1 then # sphere
  stdfrm:=((x-g)^2)/radlen+((y-h)^2)/radlen+((z-i)^2)/radlen=1;
  givenfrm:=expand(stdfrm);

elif probtype=2 then # ellipse
  stdfrm:=(x-g)^2/a^2+(y-h)^2/b^2+(z-i)^2/c^2=1;
  givenfrm:=expand(stdfrm)*rgt;

elif probtype=3 then # hyperboloid
  if subprobtype=1 then #++- (zaxis) 1 sheet
    if axis=1 then
      stdfrm:=-(x-g)^2+(y-h)^2+(z-i)^2=1;
      givenfrm:=expand(stdfrm);
    elif axis=2 then
      stdfrm:=(x-g)^2-(y-h)^2+(z-i)^2=1;
      givenfrm:=expand(stdfrm);
    elif axis=3 then
      stdfrm:=(x-g)^2+(y-h)^2-(z-i)^2=1;
      givenfrm:=expand(stdfrm);
    end if;
  elif subprobtype=2 then #--+ (zaxis) 2 sheet
    if axis=1 then
      stdfrm:=(x-g)^2-(y-h)^2-(z-i)^2=1;
      givenfrm:=expand(stdfrm);
    elif axis=2 then
      stdfrm:=-(x-g)^2+(y-h)^2-(z-i)^2=1;
      givenfrm:=expand(stdfrm);
    elif axis=3 then
     stdfrm:= -(x-g)^2-(y-h)^2+(z-i)^2=1;
      givenfrm:=expand(stdfrm);
    end if;
  end if;

elif probtype=4 then # Cone (x-a)^2 + (y-b)^2 = (z-c)^2
  if axis = 1 then
    stdfrm:=(z-i)^2 + (y-h)^2 = (x-g)^2;
    givenfrm:=expand(stdfrm);
  elif axis = 2 then
    stdfrm:=(x-g)^2 + (z-i)^2 = (y-h)^2;
    givenfrm:=expand(stdfrm);
  elif axis = 3 then
    stdfrm:=(x-g)^2 + (y-h)^2 = (z-i)^2;
    givenfrm:=expand(stdfrm);
  end if;

elif probtype=5 then # Paraboloid
  if subprobtype=1 then #++/-- (Elliptic)z-i=c+(x-g)^2/a^2+(y-h)^2/b^2
    if axis=1 then
      stdfrm:=x-g=(z-i)^2/c^2+(y-h)^2/b^2;
      givenfrm:=expand(stdfrm);
    elif axis=2 then
      stdfrm:=y-h=(x-g)^2/a^2+(z-i)^2/c^2;
      givenfrm:=expand(stdfrm);
    elif axis=3 then
      stdfrm:=z-i=(x-g)^2/a^2+(y-h)^2/b^2;
      givenfrm:=expand(stdfrm);
    end if;
  elif subprobtype=2 then #+-/-+ (Saddle/Hyperbolic) z-i=c-(x-g)^2/a^2+(y-h)^2/b^2
    if axis=1 then
      stdfrm:=x-g=(z-i)^2/c^2+(y-h)^2/b^2;
      givenfrm:=expand(stdfrm);
    elif axis=2 then
      stdfrm:=y-h=(x-g)^2/a^2-(z-i)^2/c^2;
      givenfrm:=expand(stdfrm);
    elif axis=3 then
      stdfrm:=z-i=(x-g)^2/a^2+(y-h)^2/b^2;
      givenfrm:=expand(stdfrm);
    end if;
  end if;

elif probtype=6 then # Cylinder
  if subprobtype=1 then #(Circle)(x-g)^2+(y-h)^2=1;
    if axis=1 then
      stdfrm:=(z-i)^2+(y-h)^2=1;
      givenfrm:=expand(stdfrm);
      g:=0;
    elif axis=2 then
      stdfrm:=(x-g)^2+(z-i)^2=1;
      givenfrm:=expand(stdfrm);
      h:=0;
    elif axis=3 then
      stdfrm:=(x-g)^2+(y-h)^2=1;
      givenfrm:=expand(stdfrm);
      i:=0;
    end if;
  elif subprobtype=2 then #(Ellipse)(x-g)^2/a^2+(y-h)^2/b^2=1;
    if axis=1 then
      stdfrm:=(z-i)^2/c^2+(y-h)^2/b^2=1;
      givenfrm:=expand(stdfrm);
      g:=0;
    elif axis=2 then
      stdfrm:=(x-g)^2/a^2+(z-i)^2/c^2=1;
      givenfrm:=expand(stdfrm);
      h:=0;
    elif axis=3 then
      stdfrm:=(x-g)^2/a^2+(y-h)^2/b^2=1;
      givenfrm:=expand(stdfrm);
      i:=0;
    end if;
  end if;
end if;

Set(EQN = MathML[Export](givenfrm));
Set(reply=&quot;&quot;);

#HERE COMES THE MASSIVE LOADS OF VARIABLE FALSES!
#Spheres:
Set(Lspcenter(visible)=false);
Set(CenterS(visible)=false, CenterS=&quot;&quot;);
Set(Lspradius(visible)=false);
Set(RadiusSp(visible)=false, RadiusSp=&quot;&quot;);
Set(Bspcheck(visible)=false);
Set(Bspshow(visible)=false);

#Ellipsoid:
Set(CenterE(visible)=false, CenterE=&quot;&quot;);
Set(RadiusEa(visible)=false, RadiusEa=&quot;&quot;);
Set(RadiusEb(visible)=false, RadiusEb=&quot;&quot;);
Set(RadiusEc(visible)=false, RadiusEc=&quot;&quot;);
Set(Bellcheck(visible)=false);
Set(Bellshow(visible)=false);
Set(Lelcenter(visible)=false);
Set(Lelrada(visible)=false);
Set(Lelradb(visible)=false);
Set(Lelradc(visible)=false);

#Hyperboloid
Set(Lhycenter(visible)=false);
Set(CenterH(visible)=false, CenterH=&quot;&quot;);
Set(Lhyaxis(visible)=false);
Set(HyAxisx(visible)=false, HyAxisx=false);
Set(HyAxisy(visible)=false, HyAxisy=false);
Set(HyAxisz(visible)=false, HyAxisz=false);
Set(onesheet(visible)=false, onesheet=false);
Set(twosheet(visible)=false, twosheet=false);
Set(Bhycheck(visible)=false);
Set(Bhyshow(visible)=false);
Set(Lhysheets(visible)=false);

#Cone
Set(Lcovert (visible)=false);
Set(VertexC (visible)=false, VertexC=&quot;&quot;);
Set(Lcoaxis (visible)=false);
Set(CoAxisx (visible)=false, CoAxisx=false);
Set(CoAxisy (visible)=false, CoAxisy=false);
Set(CoAxisz (visible)=false, CoAxisz=false);
Set(Bcocheck (visible)=false);
Set(Bcoshow(visible)=false);

#Paraboloid
Set(RBP1  (visible)=false, RBP1=false);
Set(RBP2  (visible)=false, RBP2=false);
Set(Lvert  (visible)=false);
Set(ParaVertex  (visible)=false, ParaVertex=&quot;&quot;);
Set(Lparaaxis(visible)=false);
Set(Paraaxisx(visible)=false, Paraaxisx=false);
Set(Paraaxisy(visible)=false, Paraaxisy=false);
Set(Paraaxisz(visible)=false, Paraaxisz=false);
Set(Bparacheck  (visible)=false);
Set(Bparashow(visible)=false);
Set(Lparatype(visible)=false);

#Cylinder
Set(RBC1   (visible)=false, RBC1=false);
Set(RBC2  (visible)=false, RBC2=false);
Set(RBC3    (visible)=false, RBC3=false);
Set(RBC4   (visible)=false, RBC4=false);
Set(LAxiscyl    (visible)=false);
Set(Cylaxisx   (visible)=false, Cylaxisx=false);
Set(Cylaxisy   (visible)=false, Cylaxisy=false);
Set(Cylaxisz  (visible)=false, Cylaxisz=false);
Set(Lcylcenter   (visible)=false);
Set(Cylcenter (visible)=false, Cylcenter=&quot;&quot;);
Set(Bcylcheck   (visible)=false);
Set(Bcylshow   (visible)=false);
Set(Lcyltype   (visible)=false);

end proc:</Text-field>
</Input>
</Group>
<Group labelreference="L43" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">check_std:=proc()
global stdfrm;
local useranswer;
useranswer:= Get(stdform::equation):
if simplify(lhs(useranswer)-lhs(stdfrm))=0 and simplify(rhs(useranswer)-rhs(stdfrm))=0 then
  Set(reply =&quot;Good Job.&quot;)
else
  Set(reply = &quot;Try again.&quot;)
end if;
end proc:</Text-field>
</Input>
</Group>
<Group labelreference="L77" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">show_std:=proc()
global stdfrm;
Set(stdform = stdfrm);
Set(reply=&quot;Standard form shown.&quot;);
end proc:</Text-field>
</Input>
</Group>
<Group labelreference="L28" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">check_shape:=proc()
global probtype;
local usernum;
if Get(RB1::truefalse) then usernum:=1 end if:
if Get(RB2::truefalse) then usernum:=2 end if:
if Get(RB3::truefalse) then usernum:=3 end if:
if Get(RB4::truefalse) then usernum:=4 end if:
if Get(RB5::truefalse) then usernum:=5 end if:
if Get(RB6::truefalse) then usernum:=6 end if:

if usernum=probtype then
  Set(reply=&quot;Correct! Keep going.&quot;);
  
  #MASSIVE SEGMENT OF REPETITION OCCURS NOW!!
  if probtype=1 then
    Set(Lspcenter(visible)=true);
    Set(CenterS(visible)=true);
    Set(Lspradius(visible)=true);
    Set(RadiusSp(visible)=true);
    Set(Bspcheck(visible)=true);
    Set(Bspshow(visible)=true);
  elif probtype=2 then
    Set(CenterE(visible)=true);
    Set(RadiusEa(visible)=true);
    Set(RadiusEb(visible)=true);
    Set(RadiusEc(visible)=true);
    Set(Bellcheck(visible)=true);
    Set(Bellshow(visible)=true);
    Set(Lelcenter(visible)=true);
    Set(Lelrada(visible)=true);
    Set(Lelradb(visible)=true);
    Set(Lelradc(visible)=true);
  elif probtype=3 then
    Set(Lhycenter(visible)=true);
    Set(CenterH(visible)=true);
    Set(Lhyaxis(visible)=true);
    Set(HyAxisx(visible)=true);
    Set(HyAxisy(visible)=true);
    Set(HyAxisz(visible)=true);
    Set(onesheet(visible)=true);
    Set(twosheet(visible)=true);
    Set(Bhycheck(visible)=true);
    Set(Bhyshow(visible)=true);
    Set(Lhysheets(visible)=true);
  elif probtype=4 then
    Set(Lcovert(visible)=true);
    Set(VertexC(visible)=true);
    Set(Lcoaxis(visible)=true);
    Set(CoAxisx(visible)=true);
    Set(CoAxisy(visible)=true);
    Set(CoAxisz(visible)=true);
    Set(Bcocheck(visible)=true);
    Set(Bcoshow(visible)=true);
  elif probtype=5 then
    Set(RBP1 (visible)=true);
    Set(RBP2 (visible)=true);
    Set(Lvert (visible)=true);
    Set(ParaVertex (visible)=true);
    Set(Lparaaxis (visible)=true);
    Set(Paraaxisx (visible)=true);
    Set(Paraaxisy (visible)=true);
    Set(Paraaxisz (visible)=true);
    Set(Bparacheck (visible)=true);
    Set(Bparashow(visible)=true);
    Set(Lparatype(visible)=true);
  elif probtype=6 then
    Set(RBC1   (visible)=true);
    Set(RBC2  (visible)=true);
    Set(RBC3    (visible)=true);
    Set(RBC4   (visible)=true);
    Set(LAxiscyl    (visible)=true);
    Set(Cylaxisx   (visible)=true);
    Set(Cylaxisy   (visible)=true);
    Set(Cylaxisz  (visible)=true);
    Set(Lcylcenter   (visible)=true);
    Set(Cylcenter (visible)=true);
    Set(Bcylcheck   (visible)=true);
    Set(Bcylshow   (visible)=true);
    Set(Lcyltype   (visible)=true);
  end if;
else
  Set(reply=&quot;Incorrect. Try again.&quot;)
end if;
end proc:</Text-field>
</Input>
</Group>
<Group labelreference="L78" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">show_shape:=proc()
global probtype;
local usernum;
Set(reply=&quot;Try it yourself next time.&quot;);
  
  #MASSIVE SEGMENT OF REPETITION OCCURS NOW!!
  if probtype=1 then
    Set(RB1=true);
    Set(Lspcenter(visible)=true);
    Set(CenterS(visible)=true);
    Set(Lspradius(visible)=true);
    Set(RadiusSp(visible)=true);
    Set(Bspcheck(visible)=true);
    Set(Bspshow(visible)=true);
  elif probtype=2 then
    Set(RB2=true);
    Set(CenterE(visible)=true);
    Set(RadiusEa(visible)=true);
    Set(RadiusEb(visible)=true);
    Set(RadiusEc(visible)=true);
    Set(Bellcheck(visible)=true);
    Set(Bellshow(visible)=true);
    Set(Lelcenter(visible)=true);
    Set(Lelrada(visible)=true);
    Set(Lelradb(visible)=true);
    Set(Lelradc(visible)=true);
  elif probtype=3 then
    Set(RB3=true);
    Set(Lhycenter(visible)=true);
    Set(CenterH(visible)=true);
    Set(Lhyaxis(visible)=true);
    Set(HyAxisx(visible)=true);
    Set(HyAxisy(visible)=true);
    Set(HyAxisz(visible)=true);
    Set(onesheet(visible)=true);
    Set(twosheet(visible)=true);
    Set(Bhycheck(visible)=true);
    Set(Bhyshow(visible)=true);
    Set(Lhysheets(visible)=true);
  elif probtype=4 then
    Set(RB4=true);
    Set(Lcovert(visible)=true);
    Set(VertexC(visible)=true);
    Set(Lcoaxis(visible)=true);
    Set(CoAxisx(visible)=true);
    Set(CoAxisy(visible)=true);
    Set(CoAxisz(visible)=true);
    Set(Bcocheck(visible)=true);
    Set(Bcoshow(visible)=true);
  elif probtype=5 then
    Set(RB5=true);
    Set(RBP1 (visible)=true);
    Set(RBP2 (visible)=true);
    Set(Lvert (visible)=true);
    Set(ParaVertex (visible)=true);
    Set(Lparaaxis (visible)=true);
    Set(Paraaxisx (visible)=true);
    Set(Paraaxisy (visible)=true);
    Set(Paraaxisz (visible)=true);
    Set(Bparacheck (visible)=true);
    Set(Bparashow(visible)=true);
    Set(Lparatype(visible)=true);
  elif probtype=6 then
    Set(RB6=true);
    Set(RBC1   (visible)=true);
    Set(RBC2  (visible)=true);
    Set(RBC3    (visible)=true);
    Set(RBC4   (visible)=true);
    Set(LAxiscyl    (visible)=true);
    Set(Cylaxisx   (visible)=true);
    Set(Cylaxisy   (visible)=true);
    Set(Cylaxisz  (visible)=true);
    Set(Lcylcenter   (visible)=true);
    Set(Cylcenter (visible)=true);
    Set(Bcylcheck   (visible)=true);
    Set(Bcylshow   (visible)=true);
    Set(Lcyltype   (visible)=true);
  end if;

end proc:</Text-field>
</Input>
</Group>
<Group labelreference="L42" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">check_sphere:=proc()
global g, h, i, CenterS, RadiusSp, radlen;
local centerSp, radiusSp; #ghi
centerSp:= Get(CenterS::anything);
radiusSp:= Get(RadiusSp::integer);
if radiusSp - sqrt(radlen) = 0 and centerSp = [g,h,i] then 
  Set('reply' = &quot;Correct! Try another question.&quot;)
else
  Set('reply' = &quot;Try again.&quot;)
end if;
end proc:</Text-field>
</Input>
</Group>
<Group labelreference="L66" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">show_sphere:=proc()
global g,h,i, radlen;
Set(CenterS = [g,h,i]);
Set(RadiusSp =sqrt(radlen));
Set(reply = &quot;Answer has been unveiled.&quot;);
end proc:</Text-field>
</Input>
</Group>
<Group labelreference="L65" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">check_ellipsoid:=proc()
global g,h,i,a,b,c;
local centerEll, ellrada, ellradb, ellradc;
centerEll:=Get(CenterE::anything);
ellrada:=Get(RadiusEa::integer);
ellradb:=Get(RadiusEb::integer);
ellradc:=Get(RadiusEc::integer);
if centerEll = [g,h,i] and ellrada = a and ellradb = b and ellradc = c then
  Set(reply = &quot;You got it right!&quot;);
else
  Set(reply = &quot;Try again.&quot;);
end if;
end proc:</Text-field>
</Input>
</Group>
<Group labelreference="L64" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">show_ellipsoid:=proc()
global g,h,i,a,b,c;
Set(CenterE = [g,h,i]);
Set(RadiusEa = a);
Set(RadiusEb = b);
Set(RadiusEc = c);
Set(reply = &quot;The answer has been shown.&quot;);
end proc:</Text-field>
</Input>
</Group>
<Group labelreference="L63" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">check_hyperboloid:=proc()
global g, h, i, subprobtype, axis;
local centerHy, useraxis, usersheet;
centerHy:= Get(CenterH::anything);

if Get(HyAxisx  ::truefalse) then useraxis:=1 end if:
if Get(HyAxisy  ::truefalse) then useraxis:=2 end if:
if Get(HyAxisz  ::truefalse) then useraxis:=3 end if:

if Get(onesheet::truefalse) then usersheet:=1 end if:
if Get(twosheet::truefalse) then usersheet:=2 end if:

if centerHy = [g,h,i] and useraxis = axis and usersheet = subprobtype then 
  Set(reply = &quot;Good job&quot;);
else 
  Set(reply = &quot;Try again.&quot;);
end if;
end proc:</Text-field>
</Input>
</Group>
<Group labelreference="L36" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">show_hyperboloid:=proc()
global g, h, i, subprobtype, axis;
Set(CenterH = [g,h,i]);
if axis = 1 then
  Set(HyAxisx = true);
elif axis = 2 then
  Set(HyAxisy = true);
elif axis = 3 then
  Set(HyAxisz = true);
end if;
if subprobtype = 1 then
  Set(onesheet = true)
elif subprobtype = 2 then
  Set(twosheet = true)
end if;
end proc:</Text-field>
</Input>
</Group>
<Group labelreference="L73" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">check_cone:=proc()
global g,h,i, axis;
local uservertex, useraxis;
uservertex:=Get(VertexC::anything);
if Get(CoAxisx  ::truefalse) then useraxis:=1 end if:
if Get(CoAxisy  ::truefalse) then useraxis:=2 end if:
if Get(CoAxisz  ::truefalse) then useraxis:=3 end if:
if useraxis = axis and uservertex = [g,h,i] then
  Set(reply = &quot;Good job!&quot;);
else
  Set(reply = &quot;Try again.&quot;);
end if;
end proc:</Text-field>
</Input>
</Group>
<Group labelreference="L68" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">show_cone:=proc()
global g,h,i, axis;
Set(VertexC = [g,h,i]);
if axis = 1 then
  Set(CoAxisx = true);
elif axis = 2 then
  Set(CoAxisy = true);
elif axis = 3 then
  Set(CoAxisz = true);
end if;
end proc:</Text-field>
</Input>
</Group>
<Group labelreference="L75" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">check_paraboloid:=proc()
global g, h, i, subprobtype, axis;
local userVertex, useraxis, usertype;
userVertex:= Get(ParaVertex::anything);
if Get(Paraaxisx  ::truefalse) then useraxis:=1 end if:
if Get(Paraaxisy  ::truefalse) then useraxis:=2 end if:
if Get(Paraaxisz  ::truefalse) then useraxis:=3 end if:
if Get(RBP1::truefalse) then usertype:=1 end if:
if Get(RBP2::truefalse) then usertype:=2 end if:
if userVertex = [g,h,i] and useraxis = axis and usertype = subprobtype then 
  Set(reply = &quot;Good job&quot;);
else 
  Set(reply = &quot;Try again.&quot;);
end if;
end proc:</Text-field>
</Input>
</Group>
<Group labelreference="L69" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">show_paraboloid:=proc()
global g,h,i,axis;
Set(ParaVertex = [g,h,i]);
if axis = 1 then
  Set(Paraaxisx = true);
elif axis = 2 then
  Set(Paraaxisy = true);
elif axis = 3 then
  Set(Paraaxisz = true);
end if;
if subprobtype = 1 then
  Set(RBP1 = true)
elif subprobtype = 2 then
  Set(RBP2 = true)
end if;
end proc:</Text-field>
</Input>
</Group>
<Group labelreference="L74" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">check_cylinder:=proc()
global g,h,i,axis, subprobtype;
local usercenter, useraxis, usertype;
usercenter:=Get(Cylcenter::anything);
if Get(RBC1::truefalse) then usertype:=1 end if:
if Get(RBC2::truefalse) then usertype:=2 end if:
if Get(RBC3::truefalse) then usertype:=3 end if:
if Get(RBC4::truefalse) then usertype:=4 end if:

if Get(Cylaxisx::truefalse) then useraxis:=1 end if:
if Get(Cylaxisy::truefalse) then useraxis:=2 end if:
if Get(Cylaxisz::truefalse) then useraxis:=3 end if:
if useraxis = axis and usercenter = [g,h,i] and usertype = subprobtype then
  Set(reply = &quot;Good job!&quot;);
else
  Set(reply = &quot;Try again.&quot;);
end if;
end proc:</Text-field>
</Input>
</Group>
<Group labelreference="L70" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">show_cylinder:=proc()
global g,h,i, axis;
Set(Cylcenter = [g,h,i]);
if subprobtype = 1 then
  Set(RBC1 = true)
elif subprobtype = 2 then
  Set(RBC2 = true)
end if;
if axis = 1 then
  Set(Cylaxisx = true);
elif axis = 2 then
  Set(Cylaxisy = true);
elif axis = 3 then
  Set(Cylaxisz = true);
end if;
end proc:</Text-field>
</Input>
</Group>
<Group labelreference="L32" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">Maplets[Display]( QSurfaces );</Text-field>
</Input>
</Group>
<Group labelreference="L76" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"></Text-field>
</Input>
</Group>
</Worksheet>
