Grasshopper

algorithmic modeling for Rhino

When I experiment with various domain range values, like as those listed in the 4 panel examples, instead of plugging in each separately, is there a way to setup One slider that would allow me to change both values on the fly? .....TIA!

Views: 9002

Replies to This Discussion

Hello

you can use "stream filter" with "value list"

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.

Attachments:

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.

Attachments:

I don't understand, I was speaking of B from construct domain. Instead of VB you could use a component. 

Attachments:

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:

Attachments:

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.

Attachments:

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