Skip to content

Loosetooth/scs-csg-subtraction-webgl

Repository files navigation

A CSG proof of concept implementing the SCS algorithm

This repo is a proof of concept that does simple image-based Constructive Solid Geometry (CSG) using the Sequenced Convex Subtraction (SCS) method. Basic subtraction and intersection are implemented. The actual object rendering is done using WebGL and Three.js.

See original blog post here.

Test in the browser

Check out the deployment. Currently only runs on desktop browsers.

Run locally

You will need node.js and yarn installed. Clone the repo, and then:

yarn

yarn start

How was this made?

This repo is based on this blog post. However, only subtraction was implemented, and some fixes were required to get it running. The intersection function was added. It follows the pseudocode as described in the SCS paper.

Releases

No releases published

Packages

No packages published