class Geometry · Computations
Symbols
Creates symbol shapes centered on a point: circle, square, rectangle, diamond and triangle.
Static methods
circlestatic
static circle(center: Point | VectorLike, radius: Real | NumberLike, result?: Circle | null): CircleCreates a circle centered at the specified point.
center- The center point of the circle.
radius- The radius of the circle.
resultoptional- Optional circle to store the result; if null, a new circle is created.
Returns A circle centered at the specified point.
diamondstatic
static diamond(center: Point | VectorLike, radius: Real | NumberLike, result?: Rectangle | null): RectangleCreates a diamond shape centered at the specified point.
center- The center point of the diamond.
radius- The distance from the center to each vertex of the diamond.
resultoptional- Optional rectangle to store the result; if null, a new rectangle is created.
Returns A diamond-shaped rectangle.
rectanglestatic
static rectangle(center: Point | VectorLike, width: Real | NumberLike, height: Real | NumberLike, result?: Rectangle | null): RectangleCreates an axis-aligned rectangle centered at the specified point.
center- The center point of the rectangle.
width- The width of the rectangle.
height- The height of the rectangle.
resultoptional- Optional rectangle to store the result; if null, a new rectangle is created.
Returns A rectangle centered at the specified point.
squarestatic
static square(center: Point | VectorLike, sideLength: Real | NumberLike, result?: Rectangle | null): RectangleCreates a square centered at the specified point.
center- The center point of the square.
sideLength- The length of each side of the square.
resultoptional- Optional rectangle to store the result; if null, a new rectangle is created.
Returns A square centered at the specified point.
trianglestatic
static triangle(center: Point | VectorLike, sideLength: Real | NumberLike, orientation: string, result?: Triangle | null): TriangleCreates an equilateral triangle centered at the specified point with a given orientation.
center- The center point of the triangle.
sideLength- The length of each side of the triangle.
orientation- The orientation of the triangle. Supported values are
"up","down","left", and"right", in any case ("Up"works too). resultoptional- Optional triangle to store the result; if null, a new triangle is created.
Returns An equilateral triangle with the specified orientation.
