Skip to content

rogerallen/jmandelbrotr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jmandelbrotr

A Mandelbrot set pan/zoom application powered via Java, CUDA (via JCUDA) and OpenGL (via LWJGL and JOML).

Screenshot

Usage

I built this using Eclipse. I don't really know how to properly package Java apps yet. Hopefully, the pom.xml is enough for other Java IDEs. Suggestions & pull requests would be considered.

An NVIDIA graphics card is required. If you have a laptop with hybrid graphics, use the NVIDIA Control Panel's Manage 3D Settings panel and Program Settings tab to make Java choose the "High-performance NVIDIA processor".

Making the window smaller will speed up the calculation.

Mouse

Left click to pan. Middle scroll wheel to zoom.

Key Bindings

  • ESC: quit
  • d/s: (d)ouble or (s)ingle floating point precision math. Single is default. It is faster & less precise.
  • f: switch to/from (f)ullscreen.
  • enter: begin zoom out mode. animates un-zooming.
  • 1/2/3/4: allow for N times 256 levels for determining whether in/out of mandelbrot set.
  • p: (p)rint out some state.
  • w: (w)rite out current screen to "save.png" -- careful, it will overwrite existing files.

LOL, I thought that glfw would eventually allow me to make a pop-up menu to control these things...but no, that will not be possible. Enjoy the old-school keyboard shortcuts, they build character.

License

Since I cobbled this code together basically by stringing existing example code together, I'll be giving this back to the community.

CC0
To the extent possible under law, Roger Allen has waived all copyright and related or neighboring rights to JMandelbrotr. This work is published from: United States.