Grasshopper

algorithmic modeling for Rhino

I'm looking for a clearly written basic guide and reference.
Preferably with more of the stuff relevant to programming for Rhino/GH and not too much about web applications.

Does anyone have any particular favourites ?

Views: 2693

Replies to This Discussion

Reference wise, its really best to use MSDN. Any book would basically have to copy that and more to have a comparable reference, so you might as well just use that. I believe that you can have this install with Visual Studio Express, which is something that I highly recommend doing.

As far as a basic guide, I think most of the beginners books that are out there are going to cover the topics that are going to be used within Rhino/GH fairly well. On one hand, the books out there are all pretty decent, but its more that programming with GH doesn't really require using all of the features of dot NET. As long as you get things about syntax, flow statements, data types, an introduction to OOP, and coverage of using collections, they you'll be fine in regards to programming in GH.

The one that I have here, which is useful but not a stand out, is Beginning VB.NET. I've liked Apress recently, so their book Beginning VB 2008 might be worth a look. I have the O'Reily book VBscript in a nutshell, which is leans more towards reference with a good introduction. Although I can't say with certainly, their VB 2005 in a nutshell book seams to be along the same lines.

Also, I've yet to find a book that is very relevant to Rhino/GH or doesn't have a bunch of stuff that winds up going largely unused in the context of Rhino/GH. Its not that those topics are useless (they might be if you choose to take your programming in a more "typical" direction), but within Rhino/GH they just don't get much face time. The topics that are useful will always require some translation as well, since the examples use some generic kind of issue to demonstrate the topic at hand.

Lastly, I've gotten more mileage out of books that are more specific than the general ones, so if there are some specific issue that you think you might want to explore you might want to see if there's a book out there that's more useful. Since I think OOP is a important concept to grasp to program well with the SDK, I'd take a look at Beginning Object Oriented Programming as its been a very useful book for me.
Thanks for the advice Damien, I'll check those out.
Hi guys,

Thanks for the advices.
Damien, could i ask you what is object oriented programming in couple words ?

Since Rhino now works with VB.net which one whould we select from this list:
http://www.amazon.com/s/ref=nb_ss?url=search-alias%3Dstripbooks&...

?

thanks a lot

arthur
OOP in a few words....hmmm... i'm not the best, but I'll give it a shot

When you get in your car and turn the key, what happens? The answer is a hell of a lot happens, but all you need to know is that the car is on and its ready to go. If you have no idea about all of the stuff that happens when you turn that key, can you still start the car? The answer is yes. So by abstracting the action of starting a car to turning a key, anyone can do it, and the process of starting the car doesn't get mucked up because someone wants to do it differently (ie everyone starts the car in the same way). Even better, you can step into almost any car (except maybe a race car or something), and as long as you have the key you can turn it on in exactly the same way (even of the low level process of starting the car changes drastically from car to car).

This example shows three important aspects of object oriented thinking. Abstraction - performing something quite complex through a simple action. Encapsulation - keeping the complex backend separate from the front end access. Polymorphisim - dealing with different objects through the same interface. There other important concepts, such as inheritance and hierarchy, that are important within OOP as well, but many of them can be explain through examples such as this one. Ultimately, we actually deal with OOP concepts quite a lot during our day to day interactions, its just that most of us haven't thought about them in this sort of context before.

In the context of Rhino, the whole SDK is built on top of these principles of object orientation, so understanding the principles can go a long way to navigating around the SDK. Each object has a hierarchy of relationships and understanding how that hierarchy relates to what an object can do and what you can do with an object is important.

In regards to your list, the first one on there (Beginning Object Oriented Programming) I have and really like. It explains a lot, not only about the concepts of OOP, but how to go about creating them yourself, both in regards to coding and design. This maybe a bit much for just working with GH, but if you'd like to start programming fully fledged plugins, its certainly information worth having. Even with relatively simple plugins, I've found benefits in adding an object oriented structure to them.

The second book (beginning c# 3.0...intro to oop) seams pretty good, and is an interesting mix between a starting generic book and a OOP specific book. Part III is going into writing and structuring your own classes, which isn't really needed for GH, but is still a good section to have. Once you get to Part IV, you probably won't use too much of that.

Either of those two should be good, and I'd steer away from some of the others on that list. Anything relating to C++ is going to throw in a lot of stuff that may confuse you, and keeping things within the language that you're using is always more helpful, so some of the java and ASP.Net things may be better left alone. I should note that the first book does have a C# version if you're looking for that (Apress does good about offering dotNET books in both VB.Net and C#). I'm not sure if the second book from Wrox does or not.

Two language agnostic (sort of) books about OOP that came up while searching were The Object Oriented Thought Process and OOP Demystified. The first one seams better in regards to both its discussion and presenting it in a language agnostic way.
Wow, i am always impressed at how helpful everyone is on this website.
Thanks a lot guys.
Just a quick question:
the book is called Beginning Object-Oriented Programming with VB 2005
but Grasshopper uses VB.net no?
Is there any difference between these two languages or just that one came after... will that be a problem in reading the book and applying it on Rhino?
Cheers
VB 2005 is VB.NET. As long as you don't see a book reference VB 6.0 or VBA, then you're probably dealing with .NET. I think 2003 would have been the equivalent of version 1 of the dotNET framework, 2005 would be ver 2.0 and 2008 would be 3.0 or 3.5. Currently Rhino only supports version 2.0 of the dotNET framework, but this is something you don't really have to worry about.
Thanks again Damien,

How about this one book that seems really specific:

http://www.amazon.co.uk/Object-Oriented-Programming-Visual-Basic-NE...

Sorry to ask so many questions but i came accross it while on ...
That looks like it has a good coverage of a number of important aspects of OOP. I had to go to the O'Reilly site to see the contents (which is probably why I didn't see pick it from Amazon), but it still looks good. It doesn't seam to have as much emphasis on the design aspect as a few of the other books, but unless you're writing your own class structure (which is probably not going to be the case if all you're doing is working with GH) then that isn't as much of an issue. Once you get to the sections on Reflection and Remoting, that's likely to not be of much use.
Arthur,

when you start looking into this, remember that "Type", "Class" and "Object" are different words for the same thing. I remember that confused the hell out of me at first.

For example, there is a class in Rhino called ON_Circle (the "ON" prefix is short for OpenNurbs). This class maintains all the data (data = "members") required to define a circle (i.e. the plane and the radius), so it's very easy to pass circles back and forth between functions, because circles can be represented by a single type. ON_Circle also provides a bunch of functions (functions = "methods") which you can use to find stuff out about the circle. Circumference for example.

So ON_Circle is a Class and a Type. The words are used interchangeably. But ON_Circle is only the definition of a circle. The platonic circle, so to speak. You can create an array with 50 thousand unique circles inside of it. Each of these is what we call an "object", or "instance" of the circle class.

--
David Rutten
david@mcneel.com
Poprad, Slovakia
this discussion is really helpful. Thanks.
This is the first and basic step to learn VB.NET :) Nice explanation.

the explanation is helpful. thanks.

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service