# Rendering

* API ( C++, JS ...)
* Backends (Renderer Back-End Architecture):
** OpenGL 4.1+ for Linux, macOS and Windows
** OpenGL ES 3.0+ for Android and iOS
** Metal for macOS and iOS
** Vulkan 1.0 for Android, Linux, macOS, and Windows
** WebGL 2.0 for all platforms
Rendering
* image-order rendering ( CPU-based ray tracing )
* object-order rendering ( GPU-based rendering. Faster since we can apply the same instructions, but on different vertices in parallel.)

# Elements

* mesh
* texture ( map )
* geometric transform
* pipline
3D graphics have more in common with vector graphics than with raster graphics. The content of an image is specified as a list of geometric objects. The technique is referred to as geometric modeling.
Rendering the scene = creating 2D image of 3D object/world

# Light and shadow

* Lights and Shadows by Bartosz Ciechanowski
* Physically Based Rendering in Filament

# 3d still images

The task of a 3D graphics program is to turn the specification of a 3D environment to 2D pictures.
There are two ways to generate such pictures:
* real-time rendering (interactive graphics applications such as video games or simulations)
* non-real-time rendering ( non-interactive graphics applications such as film).
Programming languages for host programs ( CPU) using API
* C
* C++
Special APIs
* OpenGL
* WebGl
* Direct3D
* Vulkan
* OpenCl
* CUDA
programming languages for shader programs ( GPU)
* GLSL ( OpenGl)
* HLSL ( DirectX)
* Cg (NVIDIA's shading language)

## Pipeline or workflow

The 3D pipeline contains:
* a hardware pipeline ( main memory, CPU, a PCI Express bus, GPU, and GPU memory)
* a software pipeline
software pipelines:
* Host program on CPU ( The 3D programs that run on the CPU )
* Shader programs on GPU ( The bulk of the 3D data processing )
The job of the host program includes :
* Initialization
* Set up or reconfigure the 3D software pipeline
* Build shader programs
* Transfer shader programs to GPU
* Data management
* Load 3D data
* Process the 3D data
* Update 3D data
* Transfer the 3D data to GPU
* Send commands to GPU
* Process user inputs and update the 3D data
Shader programs:
* vertex shaders
* fragment shaders
* geometry shaders
Each APi has it's own pipeline
* Pipeline OpenGL 1.0
* Pipeline D3D11
* Pipeline D3D 10

## mesh

* MeshLab - the open source system for processing and editing 3D triangular meshes.
It provides a set of tools for editing, cleaning, healing, inspecting, rendering, texturing and converting meshes. It offers features for processing raw data produced by 3D digitization tools/devices and for preparing models for 3D printing.

## Converting 2D images to 3D

* 2D fractals mapped onto a Riemann sphere
For height of each pixel one can use :
* distance to boundary : "I'm using the distance estimate method (DEM) as the basis of my height values. (inverted, the log, scaled and streched, etc.)" Duncan C
* fractional iteration values

## 3D to 2D

* project the points in 3D space into cylindrical surface that can be unwrapped, to a flat surface

# video or animation made from 2D images

What is the difference between video and animation ?
Software used to do the conversion :
* answer on fractal forum
* commons help

## parameter plane

One can make videos using :
* going along some paths on parameter plane ( for example internal and external rays )
* Poincaré half-plane metric for zoom animation
* zoom into parameter plane using automatic determination of Iteration Max number
* changing coloring scheme ( for example color cycling - Fractint)
* changing some parameters of algorithm, for example :
** maximal iteration of escape time algorithm
** bailout value

### path

* straight line from c=-0.75+i to c=-0.75-i. It is mostly in the exterior of Mandelbrot set ( then Julia set is disconnected with no interior). There is only one point c=-0.75 where c belongs to the boundary of Mandelbrot set ( root point between period 1 and 2 hyperbolic components). In that point Julia set has interior ( parabolic ).
* from c=-2 to c=1.65 ( real slice of Mandelbrot set )
* around a circle centred at -1 and with a radius of 0.25
* around main cardioid
* parameter traces a circle centred at -0.29848658+0.65843271i and with a radius of 0.004. On the parameter plane, this does a circle around a point of the Mandelbrot fractal that is radiating 11 strands in a very loose spiral.
* races a circle centred at -1.57621921451761 and with a radius of 3.6 x 10^-10. On the parameter plane, this does a circle around a minibrot at that location without passing through the minibrot itself.

# References

* ↑ An Introduction_to_Computer_Graphics by David J. Eck
* ↑ Advanced Graphics Algorithms by Professor Ying Zhu
* ↑ Duncanc Champney at fractalforums
* ↑ 3D plot with fractional iteration values by Duncan Champney
* ↑ ronny restrepo blog : Lidar Data to 2D
* ↑ answer on fractal forum
* ↑ Poincaré half-plane metric for zoom animation by Claude Heiland-Allen
* ↑ Really Deep Fractal Zoom Movie – Much Faster by Bruce Dawson
* ↑ Making Mandelbrot Set Movies by Tony Finch
* ↑ MLbrot by Daniel de Rauglaud
* ↑ Discussion : A way to determine the ideal number of maximum iterations for an arbitrary zoom level in a Mandelbrot fractal
* ↑ Gif image by jgabase : a wormhole effect on your fractals by changing the bailout dynamicaly
* ↑ Video : "Julia fractal morph: -0.75+i to -0.75-i" on youtube by rrwick
* ↑ video on youtube by rrwick
* ↑ video on youtube by rrwick
* ↑ video on youtube by rrwick
* ↑ video on youtube by rrwick