ScratchData LogoScratchData
Back to sly_i's profile

BSP Border Lines with polygon Islands

SLsly_i•Created November 29, 2024
BSP Border Lines with polygon Islands
6
4
94 views
View on Scratch

Instructions

This show edge islands as differing colors, where the black island starting on the smallest Y. Not quite a mesh silhouette yet, but a reasonably fast edge walker.

Description

Needed to generate a vertex-edge graph at setup. Then walk the graph in runtime if the edge is only seen in one polygon. Is this too slow already? To get silhouette need to calculate lowest Y and get winding clockwise for edges connected to the last vertex. Then use Vatti https://github.com/AngusJohnson/Clipper2 to find union of all polygons. Then use ear clipping to generate the final silhouette polygon. This would be too slow in scratch :-(

Project Details

Project ID1103811570
CreatedNovember 29, 2024
Last ModifiedDecember 15, 2024
SharedDecember 1, 2024
Visibilityvisible
CommentsAllowed

Remix Information

Parent ProjectView Parent
Root ProjectView Root