class PiPoint{ int offset; float x,y; float xunit=40; float yunit=1; float rad=3; PiPoint(int aoff){ offset = aoff; x = xunit*offset; //ellipse(x,250,rad,rad); } void update(float acnt){ calcnewpos(acnt); //ellipse(x,y,rad,rad); } void calcnewpos(float acount){ int whatpi = offset + floor(acount); int nextpi = whatpi + 1; whatpi = getpi(whatpi); nextpi = getpi(nextpi); float ease = (offset + acount) - (offset + floor(acount)); y = 0-yunit*whatpi - yunit*ease*(nextpi - whatpi); } }