An ordered pair of numbers describes a point on the coordinate grid. The first number in the ordered pair is the x-coordinate, which describes the horizontal location. The second number in the ordered pair is the y-coordinate, which describes the vertical location. The point where the two axes intersect at the point (0,0), or the origin. The drivexyTo block drives the robot to an (x,y) location on the grid:
The robot will turn to face the (x,y) point and drive forward the correct distance to reach that point. Play the video at top right to watch a video and learn more.
3. Drive to a Point Located (x, y) from Robot's Current Location We can also drive the robot to a point (x, y) as measured from its current location using the drivexy block:
Positive numbers for the x value specify measurements to the right, and negative x values specify measurements to the left. Positive values for the y value specify measurements up, and negative y values specify measurements down. Example 3 shows how it works. Sometimes we call this relative movement or relative coordinates, because the location of the new point to drive to is specified relative to the current location.
|
coordinate grid, quadrant, x-axis, y-axis, ordered pair, x-coordinate, y-coordinate, origin, relative movement, relative coordinates
|
The example drives the robot to the point (3, 10) and then to the point (9, 7). |
The example drives the robot to the point (5,4), then to the point (3,6), and finally to the point (8,7). |
The example first drives the robot forward 6, turns left, and drives forward 6 more to reach the point (6, 6). Then it uses the drivexy block to drive to the point located 2 to the right and 3 up from (6, 6). After that it uses another drivexy block to drive to the point 2 to the right and 1 up from its current position. |
Grid Size: S M L | Simple View: | MinView: |
Coord: x-axis y-axis | Grid Lines: x-axis y-axis | |||
Grid: | 12x12 inches | 24x24 inches | 36x36 inches | |
72x72 inches | 96x96 inches | 192x192 inches | ||
1x1 inches | 2x2 inches | Fraction: | ||
xy-Range: | ||||
|
||||
|
||||
Quad: | 1 Quadrant | 4 Quadrants | 1&4 Quadrants | |
Units: | US Customary | Metric | Ruler: |
Labels: |
|
|
|
Font
px
|
|
Tics Lines: |
|
Width
px
|
Hash Lines: |
|
Width
px
|
(
,
in
) in
|
|
degrees
|
|
(
,
in
) in
|
|
degrees
|
|
(
,
in
) in
|
|
degrees
|
|
(
,
in
) in
|
|
degrees
|
|
(
,
in
) in
|
|
degrees
|
|
(
,
in
) in
|
|
degrees
|
|
(
,
in
) in
|
|
degrees
|
|
(
,
in
) in
|
|
degrees
|
|
(
,
in
) in
|
|
degrees
|
|
(
,
in
) in
|
|
degrees
|
|
(
,
in
) in
|
|
degrees
|
|
(
,
in
) in
|
|
degrees
|
|
(
,
in
) in
|
|
degrees
|
|
(
,
in
) in
|
|
degrees
|
|
(
,
in
) in
|
|
degrees
|
|
(
,
in
) in
|
|
degrees
|
|
(
,
in
) in
|
|
degrees
|
|
(
,
in
) in
|
|
degrees
|
|
|
|||||||||||
|
|||||||||||