## Staff Answer

Mar 02, 2018 - 03:24 AM

To change where a picture appears on the screen, you should use the translated function. If you have a picture called pic, then the same picture drawn slightly to the top right would be described by the expression: translated(pic, 5, 5).

If you want the shape to move as the program runs, then you need to create an animation instead of a drawing. The movement will still happen using the translated function, but one or both of the last two arguments should be a math expression involving the variable t.

- The first parameter to this function is a picture, which is the shape before you move it.
- The second is how far to move the shape left or right. Negative numbers are left, and positive numbers are right.
- The third is how far to move the shape up or down. Negative numbers are down, and positive numbers are up.

If you want the shape to move as the program runs, then you need to create an animation instead of a drawing. The movement will still happen using the translated function, but one or both of the last two arguments should be a math expression involving the variable t.