MathGroup Archive 2006

[Date Index] [Thread Index] [Author Index]

Search the Archive

RE: Packages--guikit and mathgl3d help!

  • To: mathgroup at smc.vnet.net
  • Subject: [mg67004] RE: Packages--guikit and mathgl3d help!
  • From: green_man_2004 at yahoo.com
  • Date: Tue, 6 Jun 2006 06:29:14 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

The Problem Is ! that they are not working at the same time such as placing  graphics3D[]  with MVShow3D[] in a script[] in guikit it does not work. But  using standart Show[] function of mathematica instead of MVShow3D[] gives the result exactly.

for example:
****
Needs["GUIKit`"]
<< Graphics`Graphics`
GUIRunModal[Widget["Frame", {"title" -> "Calc with Mathematica", {Widget["
        Label", {"text" -> "First argument:"}], WidgetAlign[], 
      Widget["TextField", {"text" -> "10
          ", "columns" -> "20", "horizontalAlignment" -> PropertyValue["
        RIGHT"]}, Name -> "FirstArgumentField"]}, {WidgetFill[], \
Widget["Button", {"text" -> "Compute", BindEvent["action", Script[
                {
            x} = ToExpression /@ PropertyValue[{{"FirstArgumentField"}, \
"text"}];
                &#955; = x;
Show[Graphics3D[{Line[{{0, 0, -&#955;}, {0, 0, &#955;}}], Line[{{0, -&#955;, 0}, {0, &#955;,
       0}}], Line[{{-40, 0, 0}, {40, 0, 0}}]}, ViewCenter -> {1, 1, 1}]]
                  Print["Finish    &#955;=", &#955;];
                
                ]]}]}
      }]]

***** >>>>>>>>>>this works

Needs["GUIKit`"]
Get["MathGL3d`OpenGLViewer`"];
<< Graphics`Graphics`
GUIRunModal[Widget["Frame", {"title" -> "Calc with Mathematica", {Widget["
        Label", {"text" -> "First argument:"}], WidgetAlign[], 
      Widget["TextField", {"text" -> "10
          ", "columns" -> "20", "horizontalAlignment" -> PropertyValue["
        RIGHT"]}, Name -> "FirstArgumentField"]}, {WidgetFill[], \
Widget["Button", {"text" -> "Compute", BindEvent["action", Script[
                {
            x} = ToExpression /@ PropertyValue[{{"FirstArgumentField"}, \
"text"}];
                &#955; = x;
MVShow3D[Graphics3D[{Line[{{0, 0, -&#955;}, {0, 0, &#955;}}], Line[{{0, -&#955;, 0}, {
      0, &#955;, 0}}], Line[{{-40, 0, 0}, {40, 0, 0}}]}, ViewCenter -> {1, 
          1, 1}], MVLineTubeSize -> 1, MVPolygonShading -> MVSmooth, \
MVTubeSegments -> 8, MVTubeAngle -> 30, MVPointSphereSize -> 0.01, 
                MVNewScene -> True]
                  Print["Finish    &#955;=", &#955;];
                
                ]]}]}
      }]]

>>>>>>>>but this does not work :(
thank you for your replies

Link to the forum page for this post:
http://www.mathematica-users.org/webMathematica/wiki/wiki.jsp?pageName=Special:Forum_ViewTopic&pid=10924#p10924
Posted through http://www.mathematica-users.org [[postId=10924]]



  • Prev by Date: Re: New Analytical Functions - Mathematica Verified
  • Next by Date: Re: Function argument
  • Previous by thread: Re: Packages--guikit and mathgl3d help!
  • Next by thread: Mathematica newbie questions