Skip to main content

Lesson 4: Drawing a Diamond

Lesson 4: Drawing a Diamond

In the previous Lessons, you learned how to draw a triangle through finding missing coordinates. In this Lesson, you will learn what to do when the 6-Axis Arm moves along the x or y-axes in the negative direction, and how to calculate missing coordinates.

At the end of this Lesson, you will draw a diamond by connecting the coordinates you have determined. 

A top down view of the 6-Axis Robotic Arm with the tile, showing a diamond drawn with 5 points labeled A through D. The A coordinate at the center of the diamond is labeled as (125, 125, 0) with each line connecting A to one of the other coordinates is labeled as 75mm.

Finding Missing Coordinates

In Lesson 3 you determined the missing coordinates of a triangle based on knowing one point of the triangle and two side lengths. You will now build on that project to draw a second triangle.

Finding Point D

Sketch the known information in your engineering notebook.

Triangle ABC is located at points:

  • A (125, 125, 0)
  • B (175, 125, 0)
  • C (125, 175, 0)

This was the triangle you drew in Lesson 3. 

The second triangle, ADE has side lengths of 50mm, for sides AD and AE. The sides of triangle ADE are shown in this image with blue lines and text.

A top down view of the 6-Axis Robot Arm with the coordinates from before. Now the B coordinate is labeled with (175, 125, 0) and the C coordinate is labeled with (125, 175, 0). The distances from A to E and A to D is labeled as 50mm.

Side AD of right triangle ADE, is parallel to the x-axis.

Note that as you move from point A to point D along the x-axis, the x-coordinates get lower in value. This will be reflected in the equation used to calculate the x-coordinate of point D.

Zoomed in view of the 6-Axis Robotic Arm tile showing coordinate A from before connected to coordinate D. There is a red grid line on the left. A dotted red arrow pointing towards the top of the image is labeled negative x direction.

Find the x-coordinate of point D. 

Because the 6-Axis Arm will move in the negative direction along the x-axis, you need to use subtraction. Subtract the length of AD from the x-coordinate of point A to find the x-coordinate of point D.

The x-coordinate of point D is 75mm. Record this in your engineering notebook.

A formula to find the x coordinate of coordinate D that reads x subscript A minus AD = x subscript D. Below it reads 125 mm minus 50 mm = 75 mm.

Next, we will find the y-coordinate of point D. 

Since points A, B, and D are along the line y=125mm, the y-coordinate of point D is the same as points A and B (125mm). Record this in your engineering notebook.

The 6-Axis Robotic Arm top down view from before showing the A, B, and C axes with the same coordinates. The D coordinate now is labeled with (75, 125, ?) with a blue dotted line passing through the D, A, and B coordinates labeled y = 125. The y coordinates of D, A, and B are highlighted with a red box.

Since the Pen is not raising between points A and D, the z-coordinate of point D will remain zero. 

Point D is (75, 125, 0). Record this in your engineering notebook.

The same top down view of the 6 Axis Robotic Arm from before showing the A, B, C, and D coordinates. D's coordinate now reads (75, 125, 0).

Finding Point E

Find the x-coordinate of point E. 

Since points A, C, and E are along the line x=125mm, the x-value of point E is the same as points A and C (125mm). 

Record this in your engineering notebook.

The 6-Axis Robotic Arm top down view from before showing the A, B, C, and D with the same coordinates. The E coordinate now is labeled with (125, ?, ?) with a blue dotted line passing through the E, A, and C coordinates labeled x = 125. The x coordinates of E, A, and C are highlighted with a red box.

Side AE of the right triangle ADE, is parallel to the y-axis.

Note that if you move from point A to point E along the y-axis, the y-coordinates get lower in value. This will be reflected in the equation used to calculate the y-coordinate of point E.

Zoomed in view of the 6-Axis Robotic Arm tile showing coordinate A from before connected to coordinate E. There is a red grid line on the left. A dotted red arrow pointing towards the left of the image is labeled negative y direction.

Next, find the y-coordinate of point E.

Because the 6-Axis Arm will move in the negative direction along the y-axis, you need to use subtraction. Subtract the length of AE from the y-coordinate of point A to find the y-coordinate of point E.

The y-coordinate of point E is 75mm. Record this in your engineering notebook.

 

A formula to find the y coordinate of E, it reads y subscript A minus AE = y subscript E. Below reads 125 mm minus 50 mm - 75 mm.

Since the Pen is not raising between points D and E, the z-coordinate of point E will remain zero. 

Point E is (125, 75, 0). Record this in your engineering notebook.

The same top down view of the 6 Axis Robotic Arm from before showing the A, B, C, D, and E coordinates. E's coordinate now reads (125, 75, 0).

Coding the 6-Axis Arm to Draw Triangle ADE

Now that you have determined the coordinates for points D and E, it is time to create a VEXcode EXP project for the 6-Axis Arm to connect points A, D, and E in order to draw another triangle.

Open the Unit 5 Lesson 3 project to draw triangle ABC on the Whiteboard, or recreate the project as shown here.

The stack of Blocks from lesson 3, ending with the comment block reading Return to point A and the move arm to position x 125 y 125 z 0 mm block.

Change the Comment block shown here to "Move to point A to start the first triangle."

Because you are drawing two triangles, the comment can be changed to provide context on what blocks in the project are used to draw the first triangle versus the second triangle.

The same stack of blocks from before, but the second comment block has now been changed to read Move to point A to start the first triangle and it is now highlighted with a red box.

Add a Comment block to the bottom of stack and type in "Move to point D to start the second triangle."

The same stack of blocks from before but a comment block has been added to the bottom that reads Move to point D to start the second triangle and is highlighted with a red box.

Add a Move to position block to the stack underneath the Comment block.

Set the Move to position block's parameters to point D's coordinates, documented in your engineering notebook.

The same stack of blocks from before with a move arm to position x 75 y 125 z 0 mm block added to the bottom that is highlighted with a red box.

Add Comment blocks and Move to position blocks for point E and the return to point A to complete the second triangle.

Set the parameters of the Move to position blocks to the coordinates of points E and A, that were recorded in your engineering notebook.

The same stack of blocks from before with four new blocks added to the bottom that reads in order: a comment block reading move to point e, a move arm to position x 125 y 75 z 0 mm block, a comment block reading move to point a, and a move arm to position x 125 y 125 z 0 mm block.

Be sure to rename and save your project to your device.

The VEXcode toolbar showing the project's name that reads Unit 5 Lesson 3. The project name is highlighted with a red box.

Your full project should look like this when completed. 

When you have finished building your project, be sure the 6-Axis Arm is connected to VEXcode EXP and run the project.

The full stack of blocks from before, ending with the move to point A comment block and the move arm to position x 125 y 125 z 0 mm block.

Stop the project when the 6-Axis Arm has finished drawing the two triangles.

The 6-Axis Arm will draw triangle ABC as it did in Lesson 3. Then it will move to point D, to draw the first side of triangle ADE. Then the 6-Axis Arm will move from point D to point E to complete the second side of triangle ADE, and will finish the triangle by moving pack to point A.

Note: This image shows the 6-Axis Arm having been manually moved after the project was stopped so that both triangles can be clearly seen.

An angled view of the 6-Axis Robotic Arm with the Pen Holder tool, showing that it has drawn two mirrored triangles on the whiteboard.

Activity

In this Lesson you have learned how to draw triangles with sides that require moving in the negative direction along the axes. Now you will apply your learning to draw a diamond, made up of four triangles.

A top down view of the 6-Axis Robotic Arm with 5 coordinates labeled A through E creating a diamond shape with A at the center of the diamond. The A coordinate is at (125, 125, 0).

  • Setup: Draw points A, B, C, D, and E in your engineering notebook as shown above.
    • Point A is located at (125, 125, 0)
    • Side lengths AB, AC, AD, and AE are 75mm
  • Activity: 
    1. Use the formulas from Lessons 3 and 4 to determine the coordinates of points B, C, D, and E above. Record the coordinates in your engineering notebook.
    2. Create a VEXcode EXP project to connect the points and draw the shape shown above.
      1. You can build off of the Lesson 4 project, or download the Signal Tower Template project.
      2. Be sure to set the Set end effector block to pen to get started.
      3. Use Comments to communicate the behaviors of the 6-Axis Arm in your project.
    3. When you have finished building your project, run the project to test it.
    4. Did your project draw the diamond shown above? If not, continue to modify your project and test it until you are successful.
    5. After you have completed the project, rename and save the project to your device.

Check Your Understanding

Before moving to the next Lesson, ensure that you understand the concepts in this Lesson by answering the questions in the document below in your engineering notebook. 

Check Your Understanding questions > (Google Doc / .docx / .pdf)


Select Next > to complete the Putting It All Together activity.