Grasshopper

algorithmic modeling for Rhino

Hi there,

Just a short question, I've managed to free some time to get started in programming. 

I'd like to learn coding mainly for 3D modelling but also prototyping with Arduino for this I'd like to hear from you what you think the best resource is?

I'm willing to pay if it's worth it.

Would it be best to start learning out of GH? or straight in?

If I get started in python on codeacademy are those skill directly applicable to GH scripting?

Similarly will learning how to write C for Arduino be transferable to GH? 

Many Thanks,

Charles

Ps: I think ideally I'd like a few good books.

Views: 1529

Replies to This Discussion

The thing you have to remember is that arduino and Rhino/GH are completely different things, so what you can code in rhino, will probably not work in arduino and vice versa. 

However I find the syntax in Arduino very similar to that of c# in GH, which means you can read and understand code in both GH and arduino - in my opinion a big plus. This is a benefit you will not have if you start using python because the syntax are very different. I used to write everything in VB.net, and then I switched to c# by doing processing tutorials, so learning a syntax that is similar to other languages is a big plus in my opinion. 

So my advice would be to learn arduino + c#, becuase their syntax's are similar(not the same), and skip python all together, because it would be like learning a completely different language. 

Thanks for clarifying, confirms my original though of purchasing an arduino kit to get started.

Can I also ask the pros and cons of C# and python within rhino?

C# : vast stuff/resources around, quite "strict", the standard: kinda like a BMW M3.

P: appears easier, quite "free", the underdog: kinda like a Lotus Elise.

How to go to hell (and stay there - C#) in just 123 easy steps:

Step 1: get the cookies

The bible PlanA: C# In depth (Jon Skeet).

The bible PlanB: C# Step by step (John Sharp).

The bible PlanC: C# 5.0 (J/B Albahari) > my favorite

The reference: C# Language specs  ECMA-334

The candidates:

C# Fundamentals (Nakov/Kolev & Co)

C# Head First (Stellman/Greene)

C# Language (Jones)

Step 2: read the cookies (computer OFF)

Step 3: re-read the cookies (computer OFF)

...

Step 121: open computer

Step 122: get the 30 steps to heaven (i.e. hell)

Step 123: shut down computer > change planet

May The Force (the Dark Option) be with you.

Awesome thanks Peter, I went for both Jon Skeet's and J/B Albarhari's book.

ps: thanks again for your help on my node project, had my final presentation this morning pictures to follow soon :)

Appears that the Dark Side is calling Charles ... but have in mind that long is the Path (and hilly), not to mention the no return ticket thing.

PS: All that parametric stuff is 99% brain (via code or via the visual thingy) and 1% geometry ... so make a giant break from geometry matters and think ... er ... other things. Also have in mind that the more you get involved with real-life AEC type of projects (up to final level of study) the less the parametric thing has any meaning/usage. I mean imagine delivering 600 A3 drawings for something: all of a sudden someone has another (bright) idea (especially related with budget): can you roll-back things and do-it-again? Not in a million years, I'm afraid.

PS: Forgot to post the V5 for that "get-lines-do-nodes" thingy (that does a variety of checks: case invalid/wrong geo). 

Just to clarify one thing - The reason for why the transition for me were easy to make from processing to c# was that I already new about the different rhino functions - so for me it was simply a matter of learning a different syntax. 

So I am not saying you will al of a sudden master c# code in Rhino because you know how to code in arduino. You will just understand the code - and then have to go from there.

Does that make sense?

Anders makes a valid point about pythons ability for being cross platform, which is a major plus - but if you are a windows person - then I would go with c#(since you also want to get into arduino).

There's quite a few threads already on this subject. This thread provides a quite nice overview specific to GH. In addition to Jens' and Peters notes, I find it important to note that there's more to it than just syntax. Specifically I would highlight two major differences:

1) C# is statically typed, Python is dynamically typed. See this thread. "Generally" this means that Python will be more terse (easier to read, faster to write) which might increase productivity, at the expense of being slower to run than C# and potentially harder to debug on a large projects.

2) C# is tied to Windows /.NET, Python is multiplatform. The Rhino/Grasshopper SDK's are highly .NET-based and thus play very well with C#. That said, the version of Python that is used in Rhino is called IronPython. This is the .NET implementation of Python which enables you to use the .NET framework.

Ultimately it all depends on what you need to do and how your brain is wired. If you're building a larger project like Kangaroo I would probably recommend C#. If you're developing a design model in the context of an architecture project, where quick turnaround and responding to changes is key, I would probably recommend Python. Perhaps check out a few introductory tutorials (Youtube has loads), I bet one language will immediately seem more intuitive to you than the other. One shouldn't forget that it's also about enjoying coding. If your brain is getting in the way of this, perhaps consider another language in which to express yourself :)

Edit, a few fairly objective opinion pieces on the subject:
http://www.quora.com/How-does-Python-compare-to-C/answer/Alex-Yakun...
http://www.codemag.com/Article/1407051
http://onstartups.com/tabid/3339/bid/128/Python-vs-C-Business-and-T...

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