algorithmic modeling for Rhino
hello!
I have a list of vectors (x,y,z) i.e. (1.88,7.43,0.0)
and i want to make them operate as variables in this function:
f() = ( ((x)e-1) , ((y)e-1) , ((z)e-1) )
i always get a syntax error because i have never known how to write correctly functions on grasshopper
could someone please explain me the syntax rules?
thanks in advanced,
gabriel
Tags:
The Grasshopper expression language is based on VBScript. It has a bunch of added operators and symbols specifically for 3D operations.
I believe the expression you're looking for is:
{p.x * e - 1, p.y * e - 1, p.z * e - 1}
Where p is a variable of type point (or vector). The curly brackets are used to create a new vector. If you only put two numbers in between curly brackets you'll create a Complex number instead. It's also possible to use the multiplier operator directly on vectors:
(p * e) - {1,1,1}
If you multiply a vector/point by a number it amounts to multiplying all coordinates with that number.
--
David Rutten
david@mcneel.com
Poprad, Slovakia
The Script component use proper VB.NET and C# code. The Expression and Evaluate components use Grasshopper expression language. You'll find all four of them in the Math Tab, Script panel.
--
David Rutten
david@mcneel.com
Poprad, Slovakia
Here's the implementation in the GH Function Component.
wow thank you so much ! i was trying without any success!
gabriel
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