osresearch / vst

Software for the v.st vector boards
GNU General Public License v2.0
79 stars 15 forks source link

use Processing transformation matrix #14

Closed osresearch closed 8 years ago

osresearch commented 8 years ago

Let the user call translate() and rotate() in Processing to adjust the position and orientation of the vectors.

jacobjoaquin commented 8 years ago

Matrix transforms are working in my fork. Use modelX() and modelY() in vector_point to support translate(), scale(), and rotate().

Here's an example from VST.pde in the fireworksDemo.pde:

    int x = (int) (modelX(v.x, v.y, 0) * 2047 / width);
    int y = (int) (2047 - (modelY(v.x, v.y, 0) * 2047 / height));
jacobjoaquin commented 8 years ago

Re-implemented my original solution. Should work better now.

osresearch commented 8 years ago

This was merged, I think.