CyberSlug Rules!

Beginner Programming CMPS060

Prof. Paulo Franca

Home

Syllabus

Login

Objects

Download

Staff only

Changing the origin:

 

suppose new origin is at (x0,y0) (red dot);

object (blue dot) is at (x1,y1) relative to new origin;

what are the screen coordinates relative to the true origin (pink dot)?

x = x0 + x1;

y = y0+y1;