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"}]; λ = x; Show[Graphics3D[{Line[{{0, 0, -λ}, {0, 0, λ}}], Line[{{0, -λ, 0}, {0, λ, 0}}], Line[{{-40, 0, 0}, {40, 0, 0}}]}, ViewCenter -> {1, 1, 1}]] Print["Finish λ=", λ]; ]]}]} }]] ***** >>>>>>>>>>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"}]; λ = x; MVShow3D[Graphics3D[{Line[{{0, 0, -λ}, {0, 0, λ}}], Line[{{0, -λ, 0}, { 0, λ, 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 λ=", λ]; ]]}]} }]] >>>>>>>>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]]