Perpendicular
Draws a line through a given point that is perpendicular to a given line. The line may be dened by its name,
two points, or an expression in x and y.
perpendicular(point, line) or perpendicular(point1, point2, point3)
Examples:
perpendicular(GA, GD) draws a line perpendicular to line D through point A.
perpendicular(3+2i, GB, GC) draws a line through the point whose coordinates are (3, 2) that is
perpendicular to line BC.
perpendicular(3+2i,line(x–y=1)) draws a line through the point whose coordinates are (3, 2) that
is perpendicular to the line whose equation is x – y = 1; that is, the line whose equation is y = –x + 5.
Tangent
Draws the tangent(s) to a given curve through a given point. The point does not have to be a point on the
curve.
tangent(curve, point)
Examples:
tangent(plotfunc(x^2), GA) draws the tangent to the graph of y=x^2 through point A.
tangent(circle(GB, GC–GB), GA) draws one or more tangent lines through point A to the circle
whose center is at point B and whose radius is dened by segment BC.
Median
Given three points that dene a triangle, creates the median of the triangle that passes through the rst point
and contains the midpoint of the segment dened by the other two points.
median_line(point1, point2, point3)
Example:
median_line(0, 8i, 4) draws the line whose equation is y=2x; that is, the line through (0,0) and (2,4),
the midpoint of the segment whose endpoints are (0, 8) and (4, 0).
Altitude
Given three non-collinear points, draws the altitude of the triangle dened by the three points that passes
through the rst point. The triangle does not have to be drawn.
altitude(point1, point2, point3)
Example:
altitude(A, B, C) draws a line passing through point A that is perpendicular to line BC.
192 Chapter 9 Geometry
Komentarze do niniejszej Instrukcji