I want to make a particle that interpolates in Alpha and velocity.
public class Particle extends GameObject implements Updateable
{
int time;
int lifetime;
int Alpha;
double dx;
double dy;
int[][] alphaEnvelope;
double[][] speedEnvelope;
@Override
public void update()
{
time++;
}
}
this is my particle class.
alphaEnvelope[x][y] changes the Alpha over time where X is the time and Y is the Alpha Value.
For example:
[1][100]
[60][70]
[70][0]
the Alpha is 100 at lifetime 1, 70 at lifetime 60 and 0 at lifetime 70.
How do I interpolate between these values fluently?