From the course: Learning Grasshopper

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

How to control lists with logic and dispatch in Grasshopper

How to control lists with logic and dispatch in Grasshopper

From the course: Learning Grasshopper

Start my 1-month free trial

How to control lists with logic and dispatch in Grasshopper

- [Narrator] In this video, we'll look at using conditional statement output along with the dispatch component, to control data flow in a Grasshopper definition. In addition to mathematical functions, Grasshopper can also evaluate conditional statements. These can be thought of simply as yes or no questions. For example, is the temperature below freezing. You might be familiar with the concept of if-then-else statements. Conditionals are the backbone of this type of logic. For example, if the temperature's below freezing then put on a coat or else stay inside. Let's take a look at a simple conditional statement in Grasshopper, that measures the value of a number slider. So in our example file, we're using the Evaluate component and we've attached an expression of x>5. We're feeding that with a floating point number slider into the x input of evaluate. And rather than making a numerical output this conditional expression…

Contents