I want to animate a triangle by changing the x2 point to match x1 so that it becomes a line. I want it to look like it is a triangle switching from triangle to line, triangle to line, etc. Does anyone know how I can do this?
Thank you!!
I want to animate a triangle by changing the x2 point to match x1 so that it becomes a line. I want it to look like it is a triangle switching from triangle to line, triangle to line, etc. Does anyone know how I can do this?
Thank you!!
You can add a value to x2:
x2= x2 + x2add;
Now when x2 <= x1 say x2add = x2add*-1;
Say the same when x2>=500 or so, so x2 bounces on both sides
One approach:
Given 3 random points