Skip to main content

Marching Squares implementation by Python

Project description

Marching Squares

Marching Squares to generate random contour.


pip install masq


Generate image

A random graph can be generated by using masq.random().

import masq

masq.random(n_row=20, n_col=30, bound=0.5)

A simplex noise image

Use masq.simplex_noise() function. You can display all points by set show_point=True.

import masq

masq.simplex_noise(n_row=20, n_col=30, bound=0.5, wavelength=6, show_point=False)

Play movement

Use masq.loop_simplex_noise() or masq.loop_random() function.

import masq

masq.loop_simplex_noise(20, 30, bound=0.5, wavelength=6, increment=0.01)

Display points

Turn on the show_point=True.

import masq

masq.simplex_noise(20, 30, bound=0.5, wavelength=6, show_point=True)

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

masq-0.0.2.tar.gz (5.9 kB view hashes)

Uploaded Source

Built Distribution

masq-0.0.2-py3-none-any.whl (6.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page