Skip to content

Exploring opensimplex noise with marching squares and pygame

Notifications You must be signed in to change notification settings

jcksndfrd/marching-squares

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Exploring opensimplex noise with marching squares and pygame

This is a simple visual representation of 3D opensimplex noise using a marching squares algorithm.

Each frame a new slice of the 3D noise is used as a grid of 1's and 0's which is stored as a nested list. If each value in the field is thought of as a corner of a square, the grid can be represented as a grid of squares with corners of either 1 or 0. A line is then drawn (on not drawn) through the squares that cuts off the corners of value 1 from those of 0. This can be shown by assigning the corners variable to True (see code), where a white dot represents a 1 and a black dot represents a 0.

Each frame a new grid is created which slows the program down significantly. There are probably many ways of optimising this process which I might come back to.

About

Exploring opensimplex noise with marching squares and pygame

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages