Appearance
full set of stipulations
i think we need a set of stipulations to guide our design. otherwise we blunder around, which frankly is exactly what we are doing.
- all objects are convex
- objects that intersect create 2D facets
- the nearer object hides portions or all of the farther one
lines
- facets are arbitrary shapes made out of visible straight lines
- lines are either edges or intersection lines
- all lines are assigned to the visible faces it shares
- an edge is a silhouette when only one dihedral face is visible
- lines are either part or whole
- parts happen when another SO occludes or intersects it
- creates one or more visible parts, one invisible (excluded) part
- edges that exactly cross (are co planar), creates four visible parts, none are invisible
- lines have two visible endpoints
- no two segments on the same face may connect the same pair of endpoints — duplicates are removed
- two edges that exactly cross -> split at the same ('cross' type) world point
- both edges do NOT actually pierce a face
- each cross point connects to lots of segments
points
- each has exactly one key
- if two discovery paths find the same point, they produce the same key
- two endpoints with the same key MUST be at the IDENTICAL screen position
- nearby split points on the same edge (within a world-distance threshold) are the same point — merge them. Caveat: the threshold is in world units; different scenes with different scales might need different thresholds.
- types are either corner, cross, occlude, or pierce
- corner is where two or more edges of one SO meet
- pierce is when an edge or intersection line ends at a face of another SO
- cross is when edges from two SOs intersect at the same 3D point (coplanar)
- occlude is when edges from two SOs cross on screen but are at different depths (non-coplanar)
- preferred type: corner > cross > occlude > pierce
- at the end of a line -- connects to at least one other line
- one point
- lines can belong to different objects
- has one or more faces assigned to it
- endpoint of a line where it pierces another SO's face boundary is also assigned to that face
- two edges that cross are always from two SOs' faces, the cross endpoint is assigned to both
- an edge that has two faces (of the same SO) visible cannot also be assigned to another SO
- a silhouette of one object that crosses another object's edge is also assigned to that other object's face
- exclude any segment that ends at a corner (of another object) not inside a face of the first object
traces
- tracing visits endpoints that are assigned to a single face (the face's segment list)
- tracing always starts from a corner, and proceeds along the clockwise edge
- at each point, the next segment is clockwise, according to screen space angles at that point
- if a point is revisited, stop -> that is a facet
- if a point is a dead end -> DUD (ignored)
- examine all segments of a trace, if none are on an edge -> DUD
- each traced segment is removed from the list, unless the trace is a DUD
- each traced corner is removed from the list of vertices, unless the trace is a DUD
- after all corners have begun a trace, use one of the remaining list of segments to begin a trace