Grasshopper

algorithmic modeling for Rhino

Hey to everybody

I wrote I programm in processing, now I want to port the functionallity to a grasshoper patch. But i stuck in Matrix Multipliaktion:

x = (3.037 *a   -1.25 *b + 0.239 * b);
y = (0.42 * a + 2.325 * b -1.2440 * b);
z = (-0.689 * a + 0.2 * b + 7.45 * b);

How I can do... ist there a simple Block taht can do that. ?

Thanks

raphael

Views: 945

Replies to This Discussion

If you just want to use a formula you can break it down over the Fx2 components.

(Right click on an input to change its name from x to a)

Otherwise you can use a VB.NET component to write a script to handle this

Or you could use the trnsform matrix..

...and I'm sure the last variable is meant to read c, not b. Otherwise you could just add up the coeffs.

thanks for the help ! excactl ywhat I need !

hey i Just put my expressin in the "F3x" Block I rename the Input r,g,b and the output x

I put the formula: x= 3.037*r-1.25*g+0.239*b inside put rhino gives my message

"Syntax error: Unknown variable encountered: x" 

I try different exprissions but nothing worked?

don't put "x=" as that is implied by F="Your Equation"

mmh okay I changed to 3.037*r-1.25*g+0.239*b

and now is working !

Thanks

do I need a Input of "F"  actully I need only the output x ?

no. sorry you misunderstand. Don't put F=

Just have your equation

You're not the first to think like this and I doubt you'll be the last. Would it be more straight forward if David implemented something like this:

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