Grasshopper

algorithmic modeling for Rhino

extract mathematical equation out of parametric model in grasshopper ?

Hello everyone!! ive been searching and wondering for a while : is there any plugin or an easy way to extract equation out of model (automatically trace all the steps that had been made in process of modeling and represent it as mathematical formula )? for example if make a box of 3 variables: X, Y and Z its easy to calculate that volume (V) will be V = X * Y * Z, but things get hard when you have a parametric model of house with hundreds of variables and complicated geometry.  So lately ive been doing it old school - on paper, so i can run it on my website as product price calculator. Still its very problematic this way and not very precise when it gets to curved surfaces. So if anybody knows the better way, that will be great ! 

Views: 1063

Replies to This Discussion

Hmm ... kinda like "extracting" source code from a compiled thingy that one, he he.

1M Q: Jokes apart: WHY? just sample your zillions of Breps/Meshes/Whatever into some collection (or many) and calculate Volume(s), weight(s), price(s), cat(s), dog(s) ... whatever.

Post some stuff of yours and will see what fruits we can get out of them.

1M Q: Are you "in general" after AEC BIM matters? (BOM, CPE and the likes)

1: The thing is i don't want GH to calculate anything. What i want to achieve is to translate parametric model made from scratch in GH (doesn't matter a box or a stadium) into mathematical formula so i can use it to replicate the process of calculating inside another environment : in my case i need it to make a calculator in JS for website. 

2: I design wooden stairs in GH , i plan to lunch website in days for those, and i want it to be interactive in case of calculations at list (as i dont even dream of replicating visual part of the process that GH does) so that clients can input desired parameters of stairs and get the price.  

3. As i mentioned before, i was able to replicate formula on my own at this stage, but after stairs i intend to do some parametric housing, and for that matter itll be great to have some sort of plugin to do this job or some other method that perhaps already exists  - and thats what im looking for.  Is there a way?

But what does mathematical formula in this context mean? What sort of variables are you looking for? What should the result be? Who/what is going to evaluate this formula?

f(x[,y[,z[,...]]]), f:(R[,R[,...]]) -> (?)

Indeed appears impossible (at least for humans). Enter Plan B.


here i made two examples/ the easy one and the hard one (for me at list). So lets agree that second example can take me a lot of brain work to replicate the formula, while its already exists inside the GH components code. and what im looking for is a way of extracting it.

Attachments:

FOR EXAMPLE: the way GH calculates addition of lengths of voronoi diagram with existent parameters of point locations and the dimensions of bounding rectangle. as u can see in second jpg i included.

It's not a formula, it's an algorithm. And you cannot extract the algorithm that is embedded within a component, for several reasons:

  • It may be against the license agreement (it certainly is for native components).
  • The components tend to be compiled code, so if you want to extract them, that'll require disassembly. Unless the component assembly has been obfuscated, this is actually possible and typically you can generate VB, C# and IL code from an assembly, and maybe even more languages depending on the disassembler you're using. What language/notation do you need the algorithm in?
  • The component may rely on other assemblies, some of which may be 'unmanaged'. This is true for most native components that do geometric stuff. They all rely on the Rhino SDK, which is written in C++ and cannot be easily disassembled, and certainly not into readable code.

Algorithm! thanks for notice.  

So there is no easy way. Thats sad, i dont know if anyone could use such a thing, but i think interaction with internet sounds reasonable to me. The way of translating GH logic into algorithm and then to JavaScript for example. That would be a great add to GH. 

Im not a great programmer nether mathematician, but i intend to try to figure something out how to make the process easier , tracing algorithm while workflow. 

If i come with something useful ill post it here for those who may benefit of such thing. 

Thanks for your replies!

RSS

About

Translate

Search

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service