i neeeeeeeeeeeeeed help please
Create code that:

* stores the x and y coordinates of the mouse into two arrays x[] and y[];
* the size of x and y should be 50;
* the latest coordinates (from mouseX and mouseY) should be stored in position number 0 of the two arrays (that is, respectively, in x[0] and y[0]
* whenever new coordinates come in, all the coordinates present in the arrays are shifted up one position (that is, the coordinate in x[48] is moved into x[49], the one in x[47] is moved into x[48], and similarly for y[], taking care to do this in the right order so as to not erase any coordinates except the oldest ones);
* a shape is drawn (using beginShape(), vertex() and endShape()) that connects all the mouse coordinates).

Recommended Answers

All 2 Replies

O.K. What do you have so far?

O.K. What do you have so far?

Agreed.

@OP - what system or API are you using to get the mouse coordinates? Win32API? something proprietary?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.