Changes

Jump to: navigation, search

FSOSS 2010/processing.js/vectors

252 bytes added, 07:05, 28 October 2010
no edit summary
<li>Graphically -> add head to tail</li>
<li>Algebraically -> add components [3, 3] + [1, 2] = [4, 5]</li>
<li>PVector.add(v1, v2);</li> <li>vec.add(v);</li></ul> <b>Subtraction</b><ul> <li>Graphically -> flip the direction of one vector, then add</li> <li>Algebraically -> subtract components [3, 3] - [1, 2] = [2, 1]</li> <li>PVector.sub(v1, v2);</li> <li>vec.sub(v);</li>
</ul>
<li>Graphically -> stretch or shrink</li>
<li>Algebraically -> multiply components by scalar [1,3] * 2 = [2, 6]</li>
<li>PVector.mult(float);</li>
</ul>
1
edit

Navigation menu