Git Product home page Git Product logo

mandel's Introduction

mandel

A mandelbrot set shaped code calculating and displaying the mandelbrot set.

Share, play, have fun. ;D

Usage

Enter the following command:

cat > mandel.c

Then enter the source code:

                                                     /*
                                                  *****/
                                                   double
                                                  fabs /*
                                          */  (); double s =
                                           100.0, u = 4.0 / 100.0;
                                       char c ( double xp, double
                                       yp ) { double x= -2.0 + (xp
                            *         ( u / 2.0) ), y = -2.0 + (yp *
                        u ) , a     = x, b = y, n = 30.0; while ( n
                      < 300.0 ) {   double aa = ( a * a ) - ( b * b
                      ) , bb = 2.0 * a * b; a = aa + x ; b = bb+y;/*
..................*/if ( fabs (a + b) > 200.0 ) { return ' '; }
                      n++ ; } return '#'; } main ( ) { double x, y;
                       for ( y = 23.0 ; y < s - 23.0; y++ ) { for (
                       x = 0.0 ;   x < ( s + s ) - 80 ; x++ ) {/**/
                           /**/      printf ( "%c", c ( x, y ) ) ; }
                                       printf ( "\n" ) ; } } /* $$ %
                                       .( //%§§&/)%/"!"!§"§$()%$%§"
                                         --''###*&"""()////$%§§$$'
                                          _####**++++P.A.D.'#'''##
                                               '''1992###''''
                                                    ##*
                                                   ~###'
                                                   '"|"'
                                                     */

Exit using Ctrl+C

Then compile using the following command:

gcc -o mandel mandel.c

And finaly run it using:

./mandel

Zoomable Version

For all of you who are dissatisfied by the fact that you cannt zoom into the set or move around inside of your terminal: Here is a zommable and movable version: https://github.com/derDere/mandelbrot-zoom

Similar Projects

mandel's People

Contributors

derdere avatar

Stargazers

Liam Ilan avatar

Watchers

 avatar

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.