https://github.com/albertocuadra/fbm
Generate patterns using the fractional Brownian motion
https://github.com/albertocuadra/fbm
brownian-motion cover fbm fractal fractional-brownian-motion matlab noise phd-thesis
Last synced: 7 months ago
JSON representation
Generate patterns using the fractional Brownian motion
- Host: GitHub
- URL: https://github.com/albertocuadra/fbm
- Owner: AlbertoCuadra
- License: other
- Created: 2023-04-26T21:02:37.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-07-25T11:58:23.000Z (about 2 years ago)
- Last Synced: 2025-01-18T12:15:10.341Z (9 months ago)
- Topics: brownian-motion, cover, fbm, fractal, fractional-brownian-motion, matlab, noise, phd-thesis
- Language: MATLAB
- Homepage:
- Size: 6.44 MB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Fractional Brownian Motion (FBM) Generator
[](https://in.mathworks.com/matlabcentral/fileexchange/128649-fractional-brownian-motion-generator)
This code generates patterns using the fractional Brownian motion (FBM), a mathematical technique used to create fractal-like images. The code is inspired in the well-documented posts from M. McGuire [1], I. Quilez [2], and P. Gonzalez-Vivo & J. Lowe [3].
The code was used to create the cover of my PhD thesis titled ```Development of a wide-spectrum thermochemical code with application to planar reacting and non-reacting shocks```.
The process to generate the cover was as follows:
1. Get an image that mimics turbulence using the script.
2. Vectorize the image using SVGStorm [4]. This will homogenize the image without the need to generate a large image.
3. Post-process the image using Inkscape [5].# Preview
![]()
![]()
![]()
![]()
![]()
## Usage
The function can be called with optional name-pair arguments, such as:* zoom (float): Zoom factor of the image.
* octaves (float): Number of octaves.
* resolution (float): Resolution of the image (width, height) in pixels.
* palette (float): Colormap of the image, e.g., ```summer``` or ```winter```.
* ntimes (float): Number of images to generate.
* velocity (float): Velocity of the pattern.
* direction (float): Direction of the pattern (x, y).## Examples:
```matlab
fbm()
fbm('resolution', [640, 360])
fbm('resolution', [640, 360], 'zoom', 0.5)
fbm('resolution', [640, 360], 'zoom', 0.5, 'octaves', 4)
fbm('resolution', [640, 360], 'zoom', 0.5, 'octaves', 4, 'ntimes', 1000)
fbm('resolution', [640, 360], 'zoom', 0.5, 'octaves', 4, 'ntimes', 1000, 'velocity', 5)
fbm('resolution', [640, 360], 'zoom', 0.5, 'octaves', 4, 'ntimes', 1000, 'velocity', 5, 'palette', 'winter')
```## References
* [1] M. McGuire: https://www.shadertoy.com/view/4dS3Wd
* [2] I. Quilez: https://iquilezles.org/articles/fbm
* [3] P. Gonzalez-Vivo & J. Lowe: https://thebookofshaders.com/13
* [4] SVGStorm: https://svgstorm.com/app
* [5] Inkscape: https://inkscape.org