Grasshopper

algorithmic modeling for Rhino

Dear Mohamed Zaghloul

 

First ,thank you very much for the plugin, 

I have some questions just for beginners of mantis.I used mathematica some years ago for parts of a project and want to continue now...

But just in general, whenever I try to use your Mathematica Equation Scripts it always opens an empty mathematica script window...but for grasshopper or rhino nothing will happen. The output of the Mathematica Solution is also zero(null)

 

And the second thing how would you in general import any mathematica notebook into grasshopper... with your tools.

I always did the plotdxf or plotstl command in mathematica and so I could put the output (if it is geometry in 3d)  in any application i want.

 

Thank you very much

christoph 

 

 

 

Views: 1378

Replies to This Discussion

Hi christoph

Firstly, Mantis tool is based on Mathematica "Kernel", so you can't use all of the mathematica commands specially the plot functions -> for example:

if you want to plot a 3d parametric equation such as

Enneper's minimal surface

ParametricPlot3D[{u - u^3/3 + u v^2, -v - u^2 v + v^3/3,   u^2 - v^2}, {u, -2, 2}, {v, -2, 2}]

with Mantis

you will compute the equation to get the x&y&z coordinates to link it with xyz of pointsin grasshopper which will be previewed in rhino viewport

such as

N[Table[{u - u^3/3 + u v^2, -v - u^2 v + v^3/3,u^2 - v^2}, {u, -2, 2}, {v, -2, 2}]]

put the previous equation into a panel component and link it with Mathematica Solution component in Mantis tools 

the output is a string of coordinates of points such as {{{x,y,z},{x1,y1,z1},.........}}}

then, convert the string into doubles "with the same order" in Mantis 0.4" within the next 2 weeks i will release a component will facilitate the conversion but for Mantis 0.3 i made some simple steps with string replace component

Secondly, you can't export a dxf or 3d files from mathematica buy using mantis while you can get xyz coordinates of any 3d object vertices into grasshopper then export it from rhino

***you can import any 3d object into mathematica to make any editing on it with ending the import command line with ;

Import["ExampleData/747.3ds.gz"];

because if you didn't end this line with ; the standard mathematica kernel can't enable visualizing these models but it can compute all of the 3d data without seeing the output as image

Import["ExampleData/747.3ds.gz", "VertexData"] 

Import["ExampleData/747.3ds.gz", "PolygonData"]

and if you are good in using mathematica language you will see its powerful potentials which enables the user to compute complicated and complex equations and steps in a very fast way.

At last,for any notebook file-> you can copy and past most of the equation as previous or save the files as *.m initialization files and then call it easily such as

Graphics`Polyhedra`;

or 

Needs["Graphics`Polyhedra`"];

then write your commands which are depended on the initialization file.

Best Regards

M.Zaghloul

Dear Mohamed Zaghloul

 

Thank you for your quick reply and for the great help. everything works fine and I am now experimenting with some mathematica functions.

thanks a lot for your help

Would you have any .gh do help me start because it is fairly complicated to figure out which grasshopper component I am suppose to use. I read the tutorial provided with the install. I get the principle but It doesn't work with what I tried. Thank you for your help.

Best Regards.

Here is what I started. Thank you for your help

Attachments:

Does Mathematica have to be open ?

No

1- You didn't use a boolean toggle [True] in your file

2- you try to call an equation that will return an image not a list of points

3- You use Table so [PlotPoints , PlotRange ....] are not a table command options

the paramlawson:= > the delayed function has to be attached to the other panel that attached to the mathematica equation component

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service