Skip to content

Stay curious. Build better.

Appearance

Choose how BestHub looks on this device.

Changes apply immediately.

Search articles

Open Discover with these filters

Suggested searches

Latest articles

21 min read

Triangulation of Vector Graphics: Polygon Decomposition and Monotone Polygon Algorithms

This article explains how to convert vector‑graphics paths into GPU‑ready triangles by approximating Bézier curves with poly‑lines, simplifying self‑intersecting polygons using the Bentley‑Ottmann sweep‑line algorithm, decomposing simple polygons into monotone pieces, and finally triangulating those monotone polygons.

16 min read

Master Canvas & SVG Boolean Operations: Winding Rules, Bentley-Ottmann, Martinez Algorithm

This article explores the theory and implementation of Boolean operations on Canvas and SVG vector graphics, covering winding rules, the Bentley‑Ottmann line‑segment intersection algorithm, curve handling, segment annotation, and practical selection logic using the Martinez method, with code examples and visual illustrations.