This function returns a data set of two observations. Each observation is a triangle for one half of a rhombus. The location, direction, and shape of the rhombus is determined through the parameters.
return_rhombus(point_x, point_y, rotation, side_length, shape)
point_x | Starting x position for first point |
---|---|
point_y | Starting y position for first point |
rotation | Rotation about the starting position in degrees |
side_length | Length of one outside edge |
shape | Ether "t" for thin rhombus or "T" for thick rhombus |
Data set of triangles that join to create a rhombus
The starting point of rhombus is given by the point_x
and
point_y
parameters. This will appear in the data set as
point1_x
and point1_y
. The rotation
in degrees will turn
the rhombus around this point while side_length
will change the size.
Finally, shape
will provide either a thick or thin rhombus. A "t" for
the shape parameter will yield a thin rhombus. Anything else will provide a
thick one, but traditionally a "T" is used.
return_rhombus(0, 0, 0, 10, "T")#> triangle shape point1_x point1_y point2_x point2_y point3_x point3_y rhombus #> 1 1 T 0 0 8.09017 -5.877853 16.18034 0 1 #> 2 2 T 0 0 8.09017 5.877853 16.18034 0 1return_rhombus(1, 1, 90, .5, "t")#> triangle shape point1_x point1_y point2_x point2_y point3_x point3_y rhombus #> 1 1 t 1.154508 1.475528 1 1.000000 0.8454915 1.475528 1 #> 2 2 t 1.154508 1.475528 1 1.951057 0.8454915 1.475528 1