wiki.ksteinfe.net
Personal tools
 

Rhinoscript:basic vectors

From ksteinfeWiki

Contents

Overview

What's a Vector?

Recall from our discussion of points that a the data structure of a point is the familiar 1d array, consisting of three double numbers, and corresponding to the x-coordinate, the y-coordinate, and the z-coordinate of a position in space. Also recall that a the data structure of a point in monkeybrainland doesn't necessarily correspond to a point object in Rhino.

2578937588_6769963b7d_o.jpg

The data structure of a vector is exactly the same - three double numbers which denote a position in space, as we see below.

2578937662_2153eaa8f3_o.jpg

Because points and vectors share exactly the same data structures, they can be treated as essentially the same thing, at least from the point of view of the computer.

To us, however, they're very different. Where points are absolute, denoting an absolute position in space, vectors are relative: they denote a direction relative to an implied origin.


Example: Vectors as Tangents

TODO: 2579022006_95d0b2932f_o.jpg

2578189923_ea747270dc_o.jpg

2578189943_40a2d1eb21_o.jpg

Magnitude

TODO: Vectors can also describe magnitude.