Geometry (Math) Blocks

Prerequisite
Description
Some helper blocks have been provided for drawing geometry problems. It can be used as a learning tool for middle school and high school students.
The basic idea is that you start with a parent object, then add 3 types of child objects to it: points, lines and triangles.
Add New Parent Object
You should always start with one object that’ll represent the entire geometry shape. In most cases, you can use the “transformer” object, which is not visible but can be used as the parent of other objects. You should give it a name, which will be used for referring to it later.
Here is a fairly standard way to start the project, with a new transformer object named “g”:
Add a Point ( ) at X/Y/Z on Geometry
This block will define a new point at a specific position, which will be drawn as a small sphere. You can assign a name to it (drawn as a text label), so that we can refer to that point later.
Parameters
 x/y/z: these 3 numbers specify the x/y/z positions of the new point.
 color: the color of the sphere that represents this new point.
 size: the diameter of the sphere, and also the size of the label if a name is assigned.
 on which geometry: the name of the parent object that represents the entire geometry shape
 name: the name of this new point
Example
This program adds 4 points named “P”, “Q”, “R” and “K” as part of the geometry shape “g”.
Add a Line Between 2 Points
After defining some points, we can start to add lines between any 2 points with this block:
Parameters
 Point Names: you need to specify the names of the 2 points to be connected. They have to be added before you can add this line.
 Color: the color of the line
 Diameter: the thickness of the line
 arrow type: whether to show an arrow head in either end of the line
 sides: how many side faces are used to draw the 3D line. The more side faces, the more “rounded” the line looks like, but also the more resources needed to store and draw this line.
 segments: if this input is not empty, then a dotted line will be drawn with the number of segments
 name: the last input is the name of the line
Example
In this example, we add 4 lines between 4 points to form a rectangle shape.
Add a Point Between 2 Points
Sometimes we need to add new points along the line between 2 points, such as the middle point between 2 points. You can do that using this block:
Parameters
 Point Names: you need to specify the names of the start and end points. They have to be added before you can add this line.
 Percentage: this number controls the distance between the new point and the starting point, as a percentage of the distance between the start and end points. For example, 50% will place the new point in the middle between them. Note that this number can be less than 0 or more than 100 for extrapolation.
 Color: the color of the sphere
 Size: the diameter of the sphere
 name: the last input is the name (and label) of the new point
Example
In this example program, we add a new point “J” in the middle between the points “P” and “Q”:
Add a Triangle Between 3 Points
You can uniquely define a triangle between 3 points so long as they are not all on the same line.
Parameters
 Point Names: you need to specify the names of 3 existing points.
 Color: the color of the triangle face
 name: the last input is the name of the new triangle
Example
In this example program, we add a triangle between the 3 points “P”, “Q” and “J”:
Add an Angle Mark
Any angle is defined by 3 points. You can draw an angle mark for any angle, and also show a label for it using this block:
Parameters
 Points: The first 3 inputs are the name of the 3 points.
 Size: The size value controls how far the angle mark is drawn along the 2 legs of the angle, which then determines the length of the arc of the angle mark.
 Color: This is the color of the angle mark’s arc and label
 Diameter: This is the thickness of the angle mark’s arc
 Arrow: This allows you to show or hide an arrowhead for the arc.
 Sides: This is how many sides to use for the arc.
 Label: If this is not empty, this label text will be added next to the arc.
 Name: You can give this angle mark an optional name.
Below is an example program for a 45degree angle:
This is what it looks like:
Add a Frame Box
When you need to add a rectangle frame, it is easier to use this block below:
As shown, a frame of 8 points (named from “A” to “H”) will be added with 12 lines connecting them.
Parameters
 Color: the color of the points and lines
 size in x/y/z: the length of the lines in each direction
 thickness: the thickness of the lines. The sphere diameter will be 3 times the thickness.
 add labels: whether to show the labels for the 8 points
 name: the last input is the name of the new triangle
Example
In this example program, we add a frame box, then connect the points “A” and “G” with a dotted line: