Saturday, August 3, 2013

Vector Display Tutorial

The first exercise was to create a vector that points to the positive "Y" direction and has a length equal to "5" units. 
Knowing a vector is a direction and magnitude we need to start in a point defined in space, for this example we will use point (0,0,0) 
Now to get point (0,0,0) We need to define that point in grasshopper, so we use either a panel [command: panel] or a number slider [command: type in any number
We will define these sliders as 0 to get the coordinate (0,0,0), label X, Y, and Z to keep the definition readable for when the definition gets larger and you need to reference back to this point for easier access. 
Next we create a vector with three input points X,Y,Z 
To do this we need to create our own vector, and this is simple because we already have the anchor point to the vector. Now we just need to actually define the vector based off those coordinates. to do this we need the vectorXYZ component This can be found under; top menu bar, Vector --> Vector --> VectorXYZ  or [Command: Vector XYZ
Input:
XYZ

Output:
V: Vector
L: Length

We now have a vector  point but no magnitude and at this point should not be visible in the rhino screen, this is normal. 
To display this vector point we need a vector display, to do this we need the vector display component 
to get this component go to;  top menu bar, Vector --> Vector --> Vector Display or [CommandVector Display] 
Input:
A: Anchor
V: Vector

To view your anchor point plug in your Vec: V to VDis: A

Your point should now be visible

Next we have to create a magnitude and direction for this vector anchor point
To do this copy and paste your number sliders and Vector XYZ components, then take the output of the Vec: V and and plug this into the input VDis:V 

You should now have a Vector with a magnitude in the X,Y,Z coordinates, to change this vector, you can now move any of the sliders to now have a changing vector which is an integral part in parametric design within grasshopper

Below are two examples of different vector configurations, to get multiple vectors copy and paste the whole single definition.













1 comment: