Grasshopper

algorithmic modeling for Rhino

Hello.

I am familiar with the grasshopper and using nodes to model but using c# is confusing me.

I have no coding experience, and I would like help in c#.

My assignment is for a computational methods course in architecture

I don't want anyone to do it for me. I would just like an explanation on how to do these things as I'm really struggling with this.

Thanks

Views: 619

Attachments:

Replies to This Discussion

Here is the Rhino file as well

Attachments:

Also, Petras has a nice set of basic c# components and instruction manual to basics of c# with GH for components: http://petrasvestartas.com/C-for-Grasshopper
And you will be needing this: http://developer.rhino3d.com/api/RhinoCommonWin/html/N_Rhino.htm

I agree with David, those questions are super basic - so basic that it would be impossible to help without just giving you the answer (many are one liners, one loop, or common math). Did they not give any initial lecture?

So this involves some very basic C# language constructs such as variables, constructors and loops. Without understanding any of these subjects it is not really possible to write C# code beyond some very simple arithmetic. I hope your school hasn't just given you this assignment without a rigorous set of lectures or instructions. If they indeed didn't, they are shirking their responsibility. If they did and you didn't attend, you are shirking yours. If they did and it was unintelligible, you'll need to come to some sort of arrangement with your teachers.

  1. A for loop going from 10 to -10 with a decrement operation. I'm not entirely clear what they mean by 'print'. I'm guessing the use of the Print() method, which would mean you do not actually have to build a collection of all the numbers, just putting a call to Print(i) inside the loop will do.
  2. The Point3d constructor.
  3. Some RhinoCommon vector maths, you can use arithmetic operators (+, -, and *) on points and numbers directly.
  4. A combination of skills displayed in (1) and (3). You'll need a for loop which counts the number of steps, a conversion from this integral step count to a normalised interpolation parameter, and finally some vector maths to linearly interpolate the two end-points (hint: it'll be (1-t)*a + t*b where t is the parameter and a and b are the points).
  5. Just adding more complexity to 4, this assignment requires you understand how get/set properties work in C#. Up to now all you needed were constructors, operators and some list/array building.
  6. Some basic maths using the System.Math class. Or maybe your instructors want you to write an if...then...else structure.
  7. Definitely an if...then structure required here.
  8. A quadruple whammy of collection building, looping, operators and conditionals. If you can do this you can do anything.

I'm more than happy to help out, but you need to ask more specific questions that somehow relate to Rhino/Grasshopper. There are better places online to learn the absolute fundamentals of C#.

As David said.

In the mean time get N8

Attachments:

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