Im going to try and make the falling man image sound reactive. i can use a data array to plot the points one array for x axis and one for y axis. then i should be able to add "in.left.get(i)*200" to the x and y with stored points. so it should be elegantly written somthing like this:
"triangle (x[i]+in.left.get*200,y[i]+in.right.get*200);"
I've also figured out that the middle number of the array should be the amount of points but instead of counting everything i can write it like (x.length) this tells the computer the amount of points in x is the number i want there.
getting the points that make up the drawing from the .svg file as become more time consuming than i first anticipated becuase the code is written differently from the proccessing i can not simply copy and paste it in. instead i need to command+doubleclick every point on the x axis in order and then repeat for y axis. becuase the buffersize is int i have to make x and y int this means i cant use decimal points, there probably is a way but i am running out of time so this is a small example of what should be happening.
.svg
polygon
fill="#FFFFFF" stroke="#231F20"
points="1132.655,378.347 1138.701,313.936 1013.674,354.385 "/
polygon
fill="#FFFFFF" stroke="#231F20" points="1132.655,378.347
1138.701,313.936 1020.624,352.925 "/
polygon
fill="#FFFFFF" stroke="#231F20"
points="1132.655,378.347 1138.701,313.936 1020.624,352.925 "/
int[] x = { 1020,1138,1132,1020,1138,1132,1013,1138,1132 };
int[] y = {352,313,378,352,313,378,354,313,378};
ive also had to reverse the points because i think processing layers it in the opposite way. this seems ok but i have 25 pages of plotting points to go through this could get boring to say the least.
No comments:
Post a Comment