jcksndfrd / marching-squares

Exploring opensimplex noise with marching squares and pygame

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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


Languages

Language:Python 100.0%