Expand description
Polygonal hidden line removal: project, classify, draw.
The mesh does the occlusion work. The drawing’s curves come from two places: the model’s own edges, discretized by the same machinery every face boundary uses, and the tessellation’s silhouettes, the mesh edges where the surface turns away from the eye. Every sampled segment is split where its projection crosses a contour of the mesh (a silhouette or a free border), the only places its visibility can change, and each piece is classified by casting its midpoint toward the eye against the whole mesh: a triangle strictly in front hides it. Runs of same-classified pieces merge back into polylines, so a curve that dips behind a boss comes out as visible, hidden, visible: three curves, which is what a drawing shows.
Polygonal, not exact: the classification is as fine as the tessellation
and the sampling. The exact half (silhouettes in closed form, visibility
asked of the faces themselves) is the exact module.
Structs§
- Drawing
- A 2D drawing: the classified projection of a shape.
- Drawn
Curve - One polyline of the drawing, in view-plane coordinates.
- View
- The view for a drawing: an orthographic camera looking along
-zof the frame it carries, withxright andyup on the sheet.
Enums§
- Source
- Where a drawn curve came from.
- Visibility
- Which side of the pencil a curve lands on.
Functions§
- project
- Project a shape into a classified 2D drawing.