ScratchData LogoScratchData
Back to sly_i's profile

boundary edge detect

SLsly_i•Created November 12, 2024
boundary edge detect
5
4
74 views
View on Scratch

Instructions

Trying to learn some 3d. This is an attempt at finding boundary/outline edges of a triangles that are only in 1 triangle after back face culling (bfc). Some extra lines are visible, as those face normal's point at the camera. This is not "hidden line removal" as finding each triangle occluded by higher depth could be slow in real time. Method from https://stackoverflow.com/questions/14108553/get-border-edges-of-mesh-in-winding-order "Boundary edges are only referenced by a single triangle in the mesh, so to find them you need to scan through all triangles in the mesh and take the edges with a single reference count."

Description

Used @Chrome_Cat excellent simple 3d engine as base and replaced @-rex- sort with @Chrome_Cat radix sort and cleaned up global variables a little. Suzanne topology is mirrored on x to simplify painting in blender saved as triangulated mesh. NB: This only works with triangulated mesh's 17/11/24: Refactored data structure to remove slow item # of list calls for edges.

Project Details

Project ID1095209383
CreatedNovember 12, 2024
Last ModifiedNovember 30, 2024
SharedNovember 14, 2024
Visibilityvisible
CommentsAllowed

Remix Information

Parent ProjectView Parent
Root ProjectView Root