How to use blend modes to make better images ( of Mandelbrot sets and ...)
These images are inspired by great technique used by Adam Saka in KFMovieMaker and his videos
Blend types (= modes) definition
typedef enum {
no = 0,
average = 1
} BlendType;
How to compute blended color from 2 input colors ? Here color is a single number (shades of gray)
Basic is average
unsigned char GiveBlendedColor( double c1, double c2, BlendType Blend){
unsigned char t;
switch (Blend){
case average: {t = (c1+c2)/2.0; break;}
default: {}
}
return t;
}
There are many blend modes
Here exterior of the Mandelbrot set is:
- described by potential
- coloured with 1D gray gradients
Interior is solid colour blue
First image is slope ( normal map = Lambert reflection (Illumination model or shader )
Second image:
- level sets of potential
- linear step function
3-rd image = Result of blending above images in average mode
First image is the same as above = ( normal map = Lambert reflection (Illumination model or shader )
Second image:
- level sets of potential
- sqrt step function. It is inverterd
p = 1.0 - p;
3-rd image = Result of blending above images in average mode
- KFMovieMaker by Adam Saka
- color-blend by Florian Reuschel
- Image composition
- ImageMagic and Composite compositions by Alan Gibson.
- Digital compositing and Alpha compositing in wikipedia
- shaded relief
c console program for creating static images (png)
dependencies
- bash
- gcc
- GNU Make
- OpenMP
- Image Magic convert ( from ppm to png )
to run
make
git init
git add README.md
git commit -m "first commit"
git branch -M main
git remote add origin git@github.com:adammaj1/Mandelbrot-set-with-blended-gradients.git
git push -u origin main
local repo: ~/Mandelbrot-set-with-blended-gradients