How do we tell the location on the stage? If we want to talk about a position on the stage, how do we say it? Up? Down? This is too vague. In Scratch, we use the coordinates system to tell a location precisely.
The coordinate system is invisible - the Scratch stage is divided into four parts by using two number lines.
The x number line (x-axis) goes from left to right. It tells where a sprite is on the stage horizontally.
The y number line (y-axis) goes from top to bottom. It tells where a sprite is on the stage vertically.
The center of the stage is where the two number lines meet.
The Scratch stage is divided into four parts.
Each part of the stage is made up of dots. Each dot has an x value and a y value that tell its location on the stage.
The x value tells you how many steps on the right or on the left from the center point. If the number is positive, it is on the right. If it is negative, it is on the left
The y value tells you how many steps above or below the center point. If the number is positive, it is above. If it is negative, it is below.
Look at the picture below. Where is the dot on the stage? First, count across to get the x value. Then count up or down to get the y value. It is at x: 150, y: 100.
Where is the dot on the stage?
The x number line starts at -240 and ends at 240.
The y number lines starts at -180 and ends at 180.
By setting the x and y value for a coding block, you can place a sprite at a specific spot on the stage. For example:
center of stage x: 0 and y: 0
right edge of stage x: 240 and y: 0
left edge of stage x: -240 and y: 0
top edge of stage x: 0 and y: 180
bottom edge of stage x: 0 and y: -180