Simplifying non-square meshes
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 658
- Forks
- 41
- PR merge metrics
- No merged PRs in 30d
Description
Great library @mourner. I've been adapting this to simplify non-square meshes, by buffering the east and southern edges with filler values. This forms a bigger square, whatever the next larger `2^n +1` integer may be (a 225x500 mesh becomes 513x513).
To keep the algorithm from simplifying away vertices on the real edge, I fill the placeholder values with a constant, extremely low/high elevation, and then trim them away:

Two questions:
- is this worth adding into core functionality? I'm curious if we can further optimize by skipping simplification on values that are known to be placeholders.
- this strategy forms an interesting bandana pattern, where the eastern and southern edges keep a really fine detail (probably finer than necessary) where they were trimmed away. The savings might be minimal, but can we simplify those edges further?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No file or test entry point is named. Start by reviewing the mesh simplification algorithm and how square mesh dimensions are handled, then assess placeholder-aware simplification and treatment of the trimmed eastern and southern edges. Done means a decided core approach with coverage for non-square meshes and acceptable edge detail.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- computer-graphics
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100