Coder Social home page Coder Social logo

johnnyawesome / mengersponge Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 1.0 2.9 MB

The Menger Sponge Fractal, coded in P5JS

Home Page: https://breaksome.tech/coding-the-menger-sponge-in-p5js/

License: MIT License

HTML 0.01% JavaScript 99.99%
menger-sponge cantordust cantor-set fractal fractals fractal-algorithms fractal-images fractal-rendering fractal-geometry fractal-dimension

mengersponge's Introduction

MengerSponge

The Menger Sponge Fractal, coded in P5JS

Menger Sponge

Two, interactive versions available

I made two different versions of the Menger Sponge, both of them are interactive.

"MengerSponge" - Adding Iterations to the Menger Sponge

The folder "MengerSponge" contains a version, where you can click the Menger Sponge with your mouse, to add additional iterations!

"MengerSpongeCam" - Free-Flying camera and rotation-control!

The folder "MengerSpongeCam" contains another version, using PEasyCam for P5JS.

This one is really cool: You can rotate the whole Fractal with your mouse, as well as zoom into it.

Time to explore infinity!

Other, Closely related Fractals

The Menger Sponge actually is a three-dimensional version of two other very, very famous Fractals:

The Cantor Set

Did you know: The Cantor Set is a One-Dimensional version of the Menger Sponge!

It looks loke this:

Cantor Set

You can find out more about the Cantor Set here

The Sierpinski Carpet

If the Cantor Set is a one-dimensional Menger Sponge, what does a two-dimensional Menger Sponge look like?

Turns out there is another famous Fractal called the Sierpinski Carpet, and it looks like this:

Sierpinski Carpet

If you want to learn more about the Sierpinski Carpet, check out this link

mengersponge's People

Contributors

johnnyawesome avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

e-manuele

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.