final int appwidth = 600;
final int appheight = 600;
final float stepsize = 10;
boolean demostep = false;
targetedobject myobject;
class targetedobject{ // This is the object to move
int mcurrentx, mcurrenty; // This will store the current location of the object
int mtargetx, mtargety; // This will store the target location of the object
float mrotation; // This is the current orientation of this object
targetedobject( int x, int y, int r ){ // Initialize with coordinate and orientation
mcurrentx = x;
mtargetx = x;
mcurrenty = y;
mtargety = y;
mrotation = r;
}
void updatedraw(){ //Draws the shape
pushMatrix();
translate( mcurrentx, mcurrenty );
rotate( mrotation );
fill( 255,0,0 );
ellipse(0, 0, 40, 40);
noFill();
stroke(255);
strokeWeight(5);
line( -10, 0, 10, 0 );
line( 10, 0, 5, -5 );
line( 10, 0, 5, 5 );
popMatrix();
}
}
void setup(){
size(appwidth , appheight);
background(0);
myobject = new targetedobject( width / 2, height / 2, 0 );
myobject.updatedraw();
}
void draw(){
}