This project’s goal is to create a small fractal exploration program The constraints are as follows:
• Your software should offer the Julia set and the Mandelbrot set.
• The mouse wheel zooms in and out, almost infinitely (within the limits of the computer). This is the very principle of fractals.
• You must use at least a few colors to show the depth of each fractal. It’s even better if you hack away on psychedelic effects.
• A parameter is passed on the command line to define what type of fractal will be viewed. If no parameter is provided, or if the parameter is invalid, the program displays a list of available parameters and exits properly.
• More parameters must be used for fractal parameters or ignored.
• You must be able to create different Julia set with the parameters of the program.
As for the graphic representation:
• ESC will exit the program.
• The use of images of the minilibX is strongly recommended.
- The program works only on Mac OS. Linux version require some minor modifications
- Execute in the following way:
./fractol <set name: Mandelbrot, Julia, Ship> <number for color from 1 to 3> <number for c; from 1 to 3, works only for Julia Set>
- Move position with arrows, left and right mouse buttons
- Zome with - and = or mouse wheel
- For Julia Set it is possible to change value for c with q and w or a and s
- If you want to run more than 150 iteration, you should change the function for color (it is under comments inside fractol_utils.c)
The project was tested by myself and peers
1st try: 123% (one peer found colors not good enough for max score)
srcs - source files
libft - libft with ft_printf
minilibx - minilibX library (already compiled)
include - header
pics - pics
- Tutorial on minilibX
- Another one
- And another one, but with more info about the project itself and useful links
- For better understanding on how to plot Mandelbrot set. Really useful
- Mandelbrot and Julia sets tutorial. Really handy, but with spolilers
- Just cool videos about Mandelbrot set: one and two
- Nice video about bit-shifting and colors
- Ask peers
- Learn maths and google
- Keep going
- Test (especially for colors)
- Rewrite
- Test
- Read about complex numbers. It is really important to understand them for this project. Here is a nice video, but in Russian. I am pretty sure there are nice videos in English as well
- Everything that goes after mlx-loop function is ignored
- It is possible to trace operation with the window by using mlx-hook. Read more here about X11 events and masks
- Julia and Burning ship are highly similar to Mandelbrot, so just some minor adjustments are required to get them
- The bigger is your max-iteration, more laggy is your program. I think 100-150 is the best number. Same for the window size