is_rhombus
Tests whether or not a set of four points are vertices of a rhombus. Returns 0 if they are not, 1 if they are, and
2 if they are vertices of a square.
is_rhombus(point1, point2, point3, point4)
Example:
is_rhombus(point(0,0), point(-2,2), point(0,4), point(2,2)) returns 2
is_square
Tests whether or not a set of four points are vertices of a square. Returns 1 if they are and 0 otherwise.
is_square(point1, point2, point3, point4)
Example:
is_square(point(0,0), point(4,2), point(2,6), point(-2,4)) returns 1.
LineHorz
Draws the horizontal line y=a.
LineHorz(a)
Example:
LineHorz(-2) draws the horizontal line whose equation is y = –2
LineVert
Draws the vertical line x=a.
LineVert(a)
Example:
LineVert(–3) draws the vertical line whose equation is x = –3
open_polygon
Connects a set of points with line segments, in the given order, to produce a polygon. If the last point is the
same as the rst point, then the polygon is closed; otherwise, it is open.
open_polygon(point1, point2, …, point1) or open_polygon(point1, point2, …,
pointn)
orthocenter
Returns the orthocenter of a triangle; that is, the intersection of the three altitudes of a triangle. The
argument can be either the name of a triangle or three non-collinear points that dene a triangle. In the latter
case, the triangle does not need to be drawn.
orthocenter(triangle) or orthocenter(point1, point2, point3)
Example:
orthocenter(0,4i,4) returns (0,0)
208 Chapter 9 Geometry
Komentarze do niniejszej Instrukcji