Code Monkey home page Code Monkey logo

rust-fractal-gui's Introduction

image

rust-fractal-core

Repository License Repository Size Github Release

A mandelbrot fractal renderer implementing both perturbation and series approximation. A reference point is iterated at high-precision, arbitrary precision and differences from this are calculated in machine precision. This allows for a large reduction in computation required to render and image, especially at high zoom levels. This generator features:

  • Perturbation based iteration with glitch detection.
  • Glitch correction through automatic reference movement and recalculation.
  • Series approximation calculation to skip (and approximate) large amounts of perturbation iterations.
  • Probe based method to determine series approximation skip.
  • Multithreading of core loops through rayon.
  • Configurable location and rendering options.
  • Multiple save formats including PNG, EXR and KFR.
  • Utilises scaling and mantissa-exponent based extended precision to allow for arbitrary zoom, whilst maintaining good performance. Verified to be working at depths exceeding E50000. Theoretically, this is only limited by MPFR's precision.

Compiling

You need to be able to compile the 'rug' crate which requires a rust GNU toolchain. A nightly toolchain is also required. Look in the documentation for rug for more information on how to do this. Once all required dependencies have been installed, build the crate with:

cargo build --release

Usage

Information on the flags which can be passed to the rendered can be found with the command rust-fractal --help. The renderer takes .toml files as input. There are two seperate files which can be defined to render an image, the options file and the location file. Settings in these files can be changed in order to change the output of the program. By default, there are 3 options files provided, which are:

  • low.toml: low quality settings for fast rendering and preview.
  • default.toml: settings that are used by default if no config file is provided.
  • high.toml: higher quality settings for final rendering.

Location files contain information on the specific location to be rendered, including the location, zoom level and rotation. Some examples of these files are stored in the ./locations directory. A typical call to the renderer would then look like:

  • Linux: rust-fractal -o default.toml locations/flake.toml
  • Windows: rust-fractal.exe -o default.toml locations/flake.toml

Output images are placed in the ./output folder.

Acknowledgements

  • claude (blog, Kalles Fraktaler 2+)
  • pauldelbrot (glitch detection, nanoscope)
  • knighty (superMB)

rust-fractal-gui's People

Contributors

jackyarndley avatar

Stargazers

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

Watchers

 avatar  avatar

rust-fractal-gui's Issues

Improvements

  • Normalize palette offset to be a float from 0 to 1
  • Rearrange palettes to have RGB instead of BGR formatting
  • Remove hardcoded default palette to use file instead
  • Fix rare crash with '-' signs or others in the fields
  • Have enter submit field value
  • Improve fields to be more easily edited
  • Have counter for reference number
  • General UI cleanup and refactor
  • Investigate separating zoom mantissa and exponent for easier editing
  • Add create zoom out keyframes option
  • Have value shown when mouse cursor is hovered over image, such as iteration count, and smooth factor
  • Implement undo/redo options

Cannot build with latest compiler

I cannot build rust-fractal-gui with the latest nightly rustc. It gives an error saying that the macro llvm_asm! could not be found while building crate parking_lot. Apparently this macro has been removed since rustc version nightly-2022-01-17. The version of parking_lot in Cargo.toml is 0.11.1, but there has since been a new minor release (0.12) which uses the new asm! macro.
Is there a good reason not to upgrade the dependency, or is there a specific date for the nightly rustc I should be using or something like that?

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.