Skip to content

janthmueller/marching-square-simulator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Contributors Forks Stargazers Issues MIT License


Logo

marching-square-simulator

A simple interactive marching square simulator with pygame.
Explore the docs »

View Demo · Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Contact
  8. Acknowledgments

About The Project

A simple interactive simulation of a marching square on binary iso-values. You can draw black and white cells, move the marching square manually around and move it according to the iso-values (set by colors).

Product Name Screen Shot

Built With

Major frameworks/libraries used to bootstrap the project.

(back to top)

Getting Started

Prerequisites

Installation

Usage

Start Simulation/Game

python marching_square.py

Optional Arguments:

  -h, --help            show this help message and exit
  --window_height WINDOW_HEIGHT
                        Change the window height. The default height is set to 500.
  --window_width WINDOW_WIDTH
                        Change the window width. The default height is set to 500.
  --block_size BLOCK_SIZE
                        Change the size of each block which represents isovalues. The default size is set to 20.
  --grid_color red_value green_value blue_value
                        Change the grid color rgb. The default color is grey with the rgb-values: 200 200 200.
  --empty_cell_color red_value green_value blue_value
                        Change the empty cell color rgb. The default color is white with the rgb-values: 255 255 255.
  --filled_cell_color red_value green_value blue_value
                        Change the filled cell color rgb. The default color is white with the rgb-values: 0 0 0.
  --square_color_walk red_value green_value blue_value
                        Change the square color in walk mode. The default color is blue with the rgb-values: 0 0 255.
  --square_color_march red_value green_value blue_value
                        Change the square color in walk mode. The default color is red with the rgb-values: 255 0 0.

Control

MOUSECLICK on cell - change cell color (white <-> black) / iso-value (0 <-> 1)
WASD - move marching square freely
SPACE - move marching square by iso-values. Inspired by Wiki-Figure

Roadmap

  • Add Changelog

See the open issues for a full list of proposed features (and known issues).

(back to top)

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

License

Distributed under the MIT License. See LICENSE.txt for more information.

(back to top)

Contact

Jan Thomas Müller

Project Link: https://github.com/janthmueller/marching-square-simulator

(back to top)

Acknowledgments

(back to top)

About

A simple interactive marching square simulator with pygames

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages