Elementary Definitions
Point
PlaneGeometry.Point
— TypePoint(x, y)
A point at coordinate (x, y)
.
Examples
A = Point(0,0); B = Point(1, 3); C = Point(4,2)
Picture
A = Point(0,0); B = Point(1, 3); C = Point(4,2)
scatter(shape([A, B, C]), leg=false, aspect_ratio=:equal,
color=:red, series_annotations = text.(["A", "B", "C"], :bottom))
Edge
PlaneGeometry.Edge
— TypeEdge(src, dst)
An edge from point src
to point dst
.
Examples
e = Edge(Point(0, 0), Point(1, 3))
Picture
plot(shape(Edge(A, B)), leg=false)
scatter!(shape([A,B]), leg=false, aspect_ratio=:equal,
color=:red, series_annotations = text.(["A", "B"], :bottom))
Triangle
PlaneGeometry.Triangle
— TypeTriangle(A, B, C)
A triangle with vertices A, B, C
.
Examples
A = Point(0,0); B = Point(1, 3); C = Point(4,2)
tri = Triangle(A, B, C)
Picture
tri = Triangle(A, B, C)
plot(tri, leg=false, fill=(0, :green), aspect_ratio=:equal, fillalpha= 0.2)
scatter!(shape([A, B, C]), leg=false,
color=:red, series_annotations = text.(["A", "B", "C"], :bottom))
Circle
PlaneGeometry.Circle
— TypeCircle(c, r)
A circle with center at c
and radius r
.
Examples
circle = Circle(Point(0, 0), 1)
Picture
c = Circle(A, 1)
plot(c, leg=false, fill=(0, :red),
aspect_ratio=:equal, fillalpha= 0.2)
scatter!(shape([A]), leg=false, color=:red,
series_annotations = text.(["A"], :bottom))