In order to us percept colour, we need a mechanism in our eye that can deal and distinguish light of different spectral qualities. The two structures in our eye responsible for that are called rod cells and cone cells. 1,023 more words

## Tags » Processing

#### Vectors in Processing - Magnitude

The magnitude of a vector, also known as length, can be calculated by using the following formula:

∥∥v⃗ ∥∥= √vx*vx + vy*vy

In fact, the length of a vector is calculated by using Pythagoras theorem, where the lenght is the hypotenuse of the triangle, and x and y coordinates the adjacent and opposite sides. 64 more words

#### Vectors in Processing - Mutiplication and Division (Scaler)

Multiplication or divison of vectors are also know as scaling the vector. That is because you simply use a scalar number to multiply or divide the vector as follow: 113 more words

#### Vectors in Processing - Addition and Subtraction

Following the steps to complete The Nature of Code project, below there are two sketchs, one after the other, that illustrates how to implement addition and subtraction vectors in processing. 86 more words

#### Processing - Trying to simulate a centrifugal force

The code below is the result of my initial studies for AI Project and The Nature of Code Project. It implements and manipulates vectors, addition vectors, translations, rotations in a 3D space. 197 more words

#### Markov Chains for Procedurally Generated Textures

As anybody who’s spent time on this blog knows….well, anyway, I’ve spent a while working on my game on and off. One of the time consuming processes of this was to build textures and level details. 312 more words