GithubHelp home page GithubHelp logo

theteacat / romanesgo Goto Github PK

View Code? Open in Web Editor NEW
17.0 1.0 2.0 28.77 MB

A simple fractal renderer, named after the "cooler" version of broccoli.

License: MIT License

Go 100.00%
golang fractals fractal fractal-images fractal-rendering mandelbrot burningship go collatz tricorn

romanesgo's Introduction

Romanesgo

A simple fractal exploration program, named after the "cooler" version of broccoli.

Supported Fractals:

Contents

Usage

$ git clone [email protected]:TheTeaCat/romanesgo.git
$ cd romanesgo/
$ go build
$ ./romanesgo 
Do "romanesgo help {Fractal Name}" for further info on a particular fractal function.

Fractals:
	 mandelbrot
	 julia
	 multijulia
	 birdofprey
	 multiburningship
	 multicorn
	 collatz
	 multibrot
	 burningship
	 tricorn

Flags:
  -c value
    	constants
  -cf string
    	coloring function (default "default")
  -ff string
    	fractal (default "none")
  -fn string
    	filename (default "temp.png")
  -h int
    	image height (default 1000)
  -i int
    	maximum iterations (default 128)
  -r int
    	goroutines used (default 4)
  -ss int
    	supersampling factor (default 1)
  -w int
    	image width (default 1000)
  -x float
    	central x coord
  -y float
    	central y coord
  -z float
    	zoom factor (default 1)

Performance

So, here's some usage on an i5-3320m (pretty old lil laptop processor):

$ ./romanesgo -ff=burningship -x=-1.748 -y=0.035 -z=20 -ss=4 -w=25000 -h=25000 -fn=bigship.png

	Fractal (ff):		 burningship 
	Constants (c):		  
	Max Iterations (i):	 128 
	Coloring function (cf): default 
	Centre x Coord (x):	 -1.748 
	Centre y Coord (y):	 0.035 
	Zoom factor (z):	 20 
	Image Width (w):	 25000 
	Image Height (h):	 25000 
	Supersampling (ss):	 4 
	Routines (r):		 4 
	Filename (png) (fn):	 bigship.png 

Routine 2 Done.
Routine 0 Done.
Routine 3 Done.
Routine 1 Done.

Time taken: 14m9.110651581s

What is that, a 625 megapixel image, in 14 minutes? I guess that's alright for an old laptop. ๐Ÿคทโ€โ™‚๏ธ

Oh, and that's with supersampling set to 4, so it's making 16 samples per pixel, which basically makes that equivalent to a 10 gigapixel image.

Example images

The Mandelbrot set

-w=2600 -h=2000 -ff=mandelbrot -x=-0.65 -z=0.8 -i=1024 -ss=2

A Julia set

-w=2600 -h=2000 -ff=julia -c=-0.2 -c=0.65 -z=0.9 -i=512 -ss=2

The Burning Ship fractal

-w=2000 -h=2600 -ff=burningship -x=-1.749 -y=0.037 -z=20 -i=256 -ss=2

The Collatz fractal

-ff=collatz -cf=wackyGrayscale -z=0.5 -w=2600 -h=2000 -ss=4 -i=8

A multicorn animation

See samples/multicorn/multicorn-animation.sh

for i in $(seq 1 0.04 5)
do
    ./romanesgo -ff=multicorn -i=256 -z=0.5 -ss=4 -w=400 -h=400 -c=$i -fn="samples/multicorn/frames/${i}.png"
done

A multibrot set

-ff=multibrot -c=4 -w=2600 -h=2000 -z=0.7 -x=-0.2 -ss=2

A multijulia set

-ff=multijulia -c=0.2 -c=0.9 -c=3 -z=0.8 -y=-0.15 -i=256 -ss=2

A smoothed RGB colouring function

-w=2000 -h=2600 -ff=julia -c=0.1 -c=0.7 -z=0.75 -ss=2 -cf=smoothcolor

A stepped RGB colouring function

-w=2000 -h=2600 -ff=julia -c=-0.22 -c=0.65 -z=8 -i=800 -ss=4 -cf=wackyRainbow

A stepped grayscale colouring function

-w=2600 -h=2000 -ff=julia -c=-0.2 -c=0.65 -z=5 -i=512 -ss=2 -cf=wackygrayscale

A smooth grayscale colouring function

-w=2600 -h=2000 -ff=mandelbrot -x=-0.82 -y=-0.1905 -z=50 -i=512 -ss=2 -cf=smoothgrayscale

Another smooth grayscale colouring function

-w=2600 -h=2000 -ff=julia -c=-1 -c=-0.25 -z=1.5 -i=512 -ss=2 -cf=zgrayscale

The Burning Ship Lady

-ff=burningship -z=100 -y=1.015 -cf=wackygrayscale -ss=8 -w=2000 -h=2000

romanesgo's People

Contributors

karlkeefer avatar theteacat avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

romanesgo's Issues

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.