# Can someone share with me the logic behind grasshopper code

brick wall 2.gh (16.9 KB)
Hi guys, I’m quite new to grasshopper and I’m testing out some code on my own… I think what I find it hard is to understand the logic behind it, eg. which component can be connected to which, which can’t. I haven’t been able to figure that logic myself - what I usually do is to take someone’s grasshopper and modify it but I would wish to one day set up my own code (if that makes any sense). If someone here, have been in the same situation and have gotten into some place more advance, would you care to can enlighten me please? I am currently testing out a code which I followed on youtube, the code use a graph (Sin Summation to be specific) to create the curve on my rectangle, just wondering is there a way of inputting image that translate to vector point by any chance onto the rectangle? I tried messing around with it and do it on my own using IMG connected to vector but it doesn’t seem to work. Thank you.

Not everything in Grasshopper is logical, and sometimes the naming is odd, but all in all its a mature and well-designed system. Once you have some background knowledge, things make perfect sense. Please consider that Grasshopper is essentially a form of programming. It makes it easier for non-programmers, but you can’t evade the fact that you are likely missing basic knowledge. If you want to understand how things work, you should learn it with a different perspective.

These are the hardest things to master:
General programming knowledge (conditional branching, types, null, floating point, collections, algorithms…)
Grasshoppers Data-Management (List, Trees, Sets, Flatten, Graft etc)
Basic Math (Vectors, Transforms, Geometrical types especially what are Parametric equations, how do Nurbs and Meshes work)

Best is to understand what each component does. What is the in- and what is the output? Why? Once you do that, things become much easier. It also helps if you directly start to code.

But also be aware that it takes a lot of effort. If you are not having fun playing with it and you see no real benefit, then leave it.

1 Like

“Grasshoppers Data-Management (List, Trees, Sets, Flatten, Graft etc)
Basic Math (Vectors, Transforms, Geometrical types especially what are Parametric equations, how do Nurbs and Meshes work)”

Thank you for the explanation, it’s helpful to digress it this way. Care to share where is the best place to start understanding what you listed above? Is youtube and here the best place to learn more about the basic knowledge? Thanks in advance!

In my oppinion this is the best starting point of all:

This covers most of the 3 topics.

2 Likes