Grasshopper

algorithmic modeling for Rhino

dear all,

 

i would like to ask / propose something.

Is there a particular reason why ghp uses radians ? given that in the design world of non experts ,people usually go for degrees, isn't it a counter-intuitive workflow?

 

thanks

 

Views: 1235

Replies to This Discussion

Is there a particular reason why ghp uses radians ? Yes. All programming languages (bar a few) are written using radians as the norm. Much easier to follow suit.

 

isn't it a counter-intuitive workflow? No, you just need to get used to it

 

There are numerous ways for you to keep on working in Degrees in GH if this is your preference.

you can write: 

30º (to get º type alt+0186)

30<d>

30<deg>

30<degrees>

and these will all be converted into Radians in the component where an angle is required.

 

Also there is now a Radians component that will convert an input into radians and Degrees that will do the opposite. These are found on the Math tab>Trig panel. 

that is awesome Danny, never knew about those shorthands!

Here's the complete list of "placeholders" and what will be converted. I saved this fom an old post of David's.

 

'Operators      

code.Replace("**", "┴")      

code.Replace("<cross>", "┴")      

code.Replace("<crossproduct>", "┴")      

code.Replace("<outer>", "┴")

code.Replace("<d>", "°")      

code.Replace("<deg>", "°")      

code.Replace("<degrees>", "°")

code.Replace("<2>", "²")      

code.Replace("<square>", "²")      

code.Replace("<3>", "³")      

code.Replace("<cube>", "³")

code.Replace("<project>", "↓")      

code.Replace("<pull>", "↓")      

code.Replace("<push>", "↑")    

code.Replace("<dist>", "↔")      

code.Replace("<distance>", "↔")

code.Replace("!=", "≠")      

code.Replace("<>", "≠")      

code.Replace("<=", "≤")      

code.Replace("=<", "≤")      

code.Replace(">=", "≥")      

code.Replace("=>", "≥")

code.Replace("<almost>", "≈")      

code.Replace("<almostequal>", "≈")      

code.Replace("<approx>", "≈", )      

code.Replace("<approximately>", "≈")      

code.Replace("<similar>", "≈")      

code.Replace("~", "≈")

'Functions      

code.Replace("<sum>", "∑")      

code.Replace("<sumtotal>", "∑")      

code.Replace("<summate>", "∑")

code.Replace("<prod>", "∏")      

code.Replace("<product>", "∏")

code.Replace("<average>", "Ā")      

code.Replace("<mean>", "Ā")

code.Replace("<hmean>", "Ū")      

code.Replace("<harmonic>", "Ū")      

code.Replace("<harmonicmean>", "Ū")

code.Replace("<gmean>", "Ġ")      

code.Replace("<geometric>", "Ġ")      

code.Replace("<geometricmean>", "Ġ")

'constants      

code.Replace("<pi>", "π")      

code.Replace("<phi>", "φ")      

code.Replace("<inf>", "∞")      

code.Replace("<infinity>", "∞")

code.Replace("<1/2>", "½")      

code.Replace("<0.5>", "½")      

code.Replace("<half>", "½")

code.Replace("<1/4>", "¼")      

code.Replace("<0.25>", "¼")      

code.Replace("<quarter>", "¼")

code.Replace("<3/4>", "¾")      

code.Replace("<0.75>", "¾")      

code.Replace("<threequarters>", "¾")

code.Replace("<1/3>", "⅓")      

code.Replace("<third>", "⅓")

code.Replace("<2/3>", "⅔")      

code.Replace("<twothirds>", "⅔")

 

Mind officially blown.

thank you danny, thank you all

 

your comments were very helpful. I made a custom translation from rads to degs, but its good to know that there are plenty opportunities of interchanging the two  - until i get used to rads , that is. :)

 

 

No need for a custom translation......

I agree with Danny. you need to get used to it. Any way, in the Engendering World, we all talk about RADS. Think about it for few days and you would love it... SIN, COS, TAN etc... PI 1/2 PI etc...

Danny what are these "placeholders"? And how to create them? By typing these particular codes you provided into the "function" component or "VB script" component?

You can type these into any Grasshopper Expression. "Expressions" are the one-line instructions that are used inside the Function components and on some parameter types. When you use the Expression Editor window, then you typically don't need the placeholders as there are buttons that do the same thing, but if you enter Expressions directly in menus, then they're useful to have:

 

 

then press Enter, and the placeholders will be replaced with actual symbols:

 

--

David Rutten

david@mcneel.com

Poprad, Slovakia

Thank you for the reply David.

I understood you the way of typing "Expressions" into "Expression Editor window" and directly in the menu.

 

But I am still a little bit confused about its purpose.

For example, how can I distinguish the "Dispatch" component and the "Function IF" (inside the "Expression Editor")

What do you mean by "distinguish"? Dispatch and the If() function do something quite different. Dispatch breaks apart a data-stream based on a boolean pattern, whereas If() is a piece of conditional logic. Function components only every have a single output parameter, so there's no way they can do the same things as Dispatch.

 

I think I'm probably confused regarding your question.

 

--

David Rutten

david@mcneel.com

Poprad, Slovakia

 

Its problem with my knowledge of programming and Grasshopper. Not with you.

By "distinguish" I meant "to differ", "differentiate".

 

Do not worry David, I am not thinking of arguing you. I am not competent to say anything to you.

 

This is what I was thinking about, when it comes the similar usage of "Dispatch" component and the "Function IF" (inside the "Expression Editor") - using Dispatch as "Function IF".

I set the "function" component to x<12

http://imageshack.us/f/849/11878420.jpg/

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service