aosabook/500lines · error · Exception
Unimplemented
Error message
Unimplemented
What it means
Error "Unimplemented" thrown in aosabook/500lines.
Source
Thrown at incomplete/rasterizer/rasterizer/poly.py:52
def Rectangle(v1, v2, color=None):
return Quad([Vector(min(v1.x, v2.x), min(v1.y, v2.y)),
Vector(max(v1.x, v2.x), min(v1.y, v2.y)),
Vector(max(v1.x, v2.x), max(v1.y, v2.y)),
Vector(min(v1.x, v2.x), max(v1.y, v2.y))],
color=color)
def LineSegment(v1, v2, thickness, color=None):
d = v2 - v1
d.x, d.y = -d.y, d.x
d *= thickness / d.length() / 2
return Quad([v1 + d, v1 - d, v2 - d, v2 + d], color=color)
# A simple polygon
# It will work by triangulating a polygon (via simple, slow ear-clipping)
# and then rendering it by a CSG union of the triangles
class Poly(Shape):
def __init__(self, *args, **kwargs):
raise Exception("Unimplemented")
View on GitHub (pinned to fba689d101)
Solutions
- Do not instantiate Poly directly; it is a placeholder that raises on construction.
- Implement the ear-clipping triangulation described in the comment, then render the union of triangles.
- Meanwhile use the implemented shapes (ConvexPoly, Quad, Ellipse) instead of Poly.
Example fix
ConvexPoly([Vector(0,0), Vector(1,0), Vector(0,1)]) # use a supported polygon class
When it happens
Trigger: Thrown at incomplete/rasterizer/rasterizer/poly.py:52 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of aosabook/500lines@fba689d101 (2026-08-13).
Data as JSON: /api/errors/33579849bea0c75f.
Report an issue: GitHub.