https://github.com/khelmka25/bowyer-watson
Implementation of the Bowyer Watson Algorithm using C++17 and GLFW.
https://github.com/khelmka25/bowyer-watson
2025 cpp cpp17 opengl
Last synced: 3 months ago
JSON representation
Implementation of the Bowyer Watson Algorithm using C++17 and GLFW.
- Host: GitHub
- URL: https://github.com/khelmka25/bowyer-watson
- Owner: khelmka25
- Created: 2025-10-05T23:08:35.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2025-12-19T00:43:26.000Z (7 months ago)
- Last Synced: 2025-12-21T03:54:57.643Z (7 months ago)
- Topics: 2025, cpp, cpp17, opengl
- Language: C++
- Homepage:
- Size: 183 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Bowyer Watson Algorithm
Implementation of the [Bowyer Watson Algorithm](https://en.wikipedia.org/wiki/Bowyer%E2%80%93Watson_algorithm) using C++17 and GLFW.
## About
The Bowyer-Watson algorithm is an algorithm used to traingulate a set of random points in 2D space. In my implementation, I generate a few hundred points and create randomly colored triangles using the algorithm. Below are a few example outputs.
### 99 points

### 333 points

### 999 points

## Building
Use the following instructions to build the application from source:
Clone the repo to your computer
```bash
cd path/to/cwd
git clone https://github.com/khelmka25/bowyer-watson.git
cd bowyer-watson
```
Pull the required submodules, and change glad's branch to **c**
```bash
cd deps
git submodule update --init --recursive
cd glad
git checkout c
```
Return to the project directory
```bash
cd ../../
```
Create a build directory and copy the shaders
```bash
mkdir build
cp -r ./shaders/ ./build/
```
Open the build directory, use cmake to create the make files, and build the application.
```bash
cd build
cmake ..
make
```
## Running the Application
To run the application from the build directory, call it in the command line with no additional arguments
```bash
./bowyer_watson
```
When inside the application, you may use the following keys to change the triangulation
```
Press R to build a new triangulation
Press - to remove 5 triangles and build a new triangulation
Press + to add 5 traingles and build a new triangulation
Press W to toggle between wireframe and shaded drawing
````