Giter Club home page Giter Club logo

fractals's Introduction

Fractals

A Scala native fractal generator.

Sierpinski Triangle Sierpinski Triangle

First runners

You need to install llvm, sdl2 and bdw-gc to your system.

MacOS

brew install llvm sdl2 sdl2_ttf bdw-gc

Linux (tested on Ubuntu 18.04)

sudo apt install llvm
sudo apt install libsdl2-dev
sudo apt install libgc-dev

It is also needed clang and libunwind-dev.

sudo apt install clang
sudo apt install libunwind-dev

Running

After that sbt run will start and run the project.

For the implemented fractals you can add the number of the implementation as command line parameter. (for ex. sbt "run 3")

You can use left mouse button to add more detail/depth to the actual fractal. You can use right mouse button to iterate between the fractals. You can use middle mouse button to animate the actual fractal.

List of implemented fractals

  • 0: sierpinski SierpinskiTriangle

  • 1: vicsek Vicsek

  • 2: vicsekx VicsekX

  • 3: cantorDust CantorDust

  • 4: kochCurve KochCurve

  • 5: kochSnowflake KochSnowFlake

  • 6: Tree Tree

  • 7: sierpinski carpet SierpinskiCarpet

  • 8: dragon curve DragonCurve

  • 9: H fractal Hfractal

  • 10: Minkowski Sausage MinkowskiSausage

  • 11: Cesaro Cesaro

fractals's People

Contributors

deyvidm avatar dlinov avatar harpresing avatar mfirry avatar msinton avatar rubonz avatar smithandrewl avatar tg44 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

fractals's Issues

Show information about the current fractal

Display text on the screen about the current fractal(any or all of these):

  • The name of the fractal
  • The depth the fractal is being drawn at
  • Whether animation is on
  • How many lines have been drawn

Add a new fractal to the project!

  • Sierpinski triangle
  • Vicsek
  • Vicsekx
  • CantorDust
  • KochCurve
  • KochSnowflake
  • Tree
  • Sierpinski carpet
  • Minkowski sausage
  • Dragon curve
  • H fractal
  • Cesaro

Add text to the screen with instructions

  • Right mouse click is to skip to the next fractal
  • Left mouse click is to change the depth that the fractal is drawn
  • Middle mouse click is to toggle animated drawing

Struggling to run

After cloning the repo (and setting up clang etc). I run sbt run and get the following error:

[info] Compiling to native code (735 ms)
[error] /usr/bin/ld: cannot find -lSDL2
[error] clang: error: linker command failed with exit code 1 (use -v to see invocation)
[info] Linking native code (boehm gc) (14 ms)
java.io.IOException: Cannot run program "/home/me/git/test/fractals/target/scala-2.11/fractals-out": error=2, No such file or directory
	at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
Caused by: java.io.IOException: error=2, No such file or directory
	at java.lang.UNIXProcess.forkAndExec(Native Method)
	at java.lang.UNIXProcess.<init>(UNIXProcess.java:247)
	at java.lang.ProcessImpl.start(ProcessImpl.java:134)
	at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
[trace] Stack trace suppressed: run last compile:run for the full output.
[error] (compile:run) java.io.IOException: Cannot run program "/home/me/git/test/fractals/target/scala-2.11/fractals-out": error=2, No such file or directory

Am I doing something wrong?
I am able to run a hello world project using ScalaNativePlugin

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.