I've managed to get all the code into processing in just over 3 hours which is better than 3 days wooo. the answer was shifting the code into tables and then back to text in word. so for example i told word to convert the text into a table making columns at the spaces so then this enabled me to separate the 3 points that made triangles. then select those columns and convert back to text then split at commas this split between the x and y points. back to text then finally split at decimal points this gave me the columns of x full number coordinates i need for int() finaly adding another column onto the end and converting back to text with commas at the columns the empty one at the end put commas on the last digits.
the good news is that the hand works ! ... but the bad news is that its incredibly slow i need to try and find ways to speed it up currently I've tried all the triangle classes (TRIANGLES) (TRIANGLE_STRIP) and (TRIANGLE_FAN) the fastest is triangles so I'm going to keep with that. putting no shape class in makes it work faster when there is noFill() but with fill() it is even slower than drawing with triangles. if possible i don't want to change the complexity of the drawing something i could try is making the perspective point a different vector this means the sound doesn't move those points and it should take a 3rd of the points out because x and y stay in the same place.
...
ive put the perspective x and y coordinates in the code looks like this
int xB = 1490;
int yB = 317;
thats before the setup()
then i draw it by putting this into the beginshape(triangles)
for (int i =0 ; i < (y.length); i+=1) {
vertex(x[i], y[i]);
vertex(xB,yB);
the computer runs through the array looping between the vertexs until y.length (or the amount of points y has) this joins every point to xB and yB ... but my theory of making it work faster was wrong im not sure why possibly because it has to make a triangle shape then fill it out of 2 vertex rather than 1 ... but im pretty much baffled and out of my depth with this one.
as well as making it slower it also joined the empty gaps between the fingers (image) this has messed up the layering and it dosent work but possibly potential to make it look like a continues line drawing if i take the xB and yB out.
No comments:
Post a Comment