algorithmic modeling for Rhino
Thanks LD
I should have been more specific, I really meant like a slider, where I can input any -/+ value range domain, I don't really want to pick from 200 or more possible Filter combinations.
The main reason for my question: I need both -/+ of equal value, for mirroring geometry purposes.
Why not using "construct domain" you feed B with positive value and A with negative value ? Value from slider.
Thanks LD and DR:
Unfortunately in my .GH, B is already receiving input from another comp. I think at this point its best to attached my .GH You can see a very small value change can have a huge change in the overall mirrored geometry output.
Thanks LD, that works!
I think the misunderstanding was totally at my end :) Also Thanks for opening another can of worms. I'm not very familiar writing math expressions used with Eval.
Writing a math expression for Eval, how do I differentiates between & and + ?
for example:
if((abs(X)<0.5*PI-0.5)&&(abs(Y)<0.5*PI-0.5)&&(abs(Z)<0.5*PI-0.5),(1)* ((cos(X) + cos(Y) + cos(Z))*(cos(X + sin(X)/3.3)+ cos(Y + sin(Y)/3.3) + cos(Z + sin(Z)/3.3))) -4.4*pow(sin(6*(Z+4.5*sin(PI/8*Z)))-sin(6*(X+4.5*sin(PI/8*X)))*sin(6*(Y+4.5*sin(PI/8*Y))), 4)-1.4,1)-4.8
In C-style languages, the plus sign is used for string concatenation and the ampersand is the boolean AND operator. In Basic-style languages the ampersand is used for string concatenation and the "And" keyword is used for the boolean AND operator.
Grasshopper expressions are (very) loosely based on VBScript syntax rules and thus the Ampersand is for concatenation. && doesn't exist and is not a legal construct.
I'd also recommend breaking up that expression into several smaller ones, because this is simply unreadable. I'm not really sure what this is supposed to do, but something like the attached makes this equation a lot more readable:
Thanks DR
The math equation I referenced above, I believe comes from Houdini users, and Houdini, uses the Python scripting language. http://www.z-way.org/script-and-gizmo/houdini/isosurface/isocubes offers example of Iso surfaces done in Houdini. the && may simply translate to & in VB.
I have translated a number of these equations using a VB/GH template.
Interestingly some of these examples also include a "noise" function in the equation. Which is specific to the Houdini API
Also some lengthy ISO equation are quite happy using the VB construct.
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by