Procedural Generation of Clouds with Vector Graphics
Clone or download
Erkaman Update README.md
fix image size.
Latest commit bea8ed1 Dec 27, 2016
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
img Finish readme. Dec 27, 2016
.gitignore Working on README. Dec 27, 2016
LICENSE initial commit. Dec 27, 2016
README.md Update README.md Dec 27, 2016
main.cpp Working on README. Dec 27, 2016
makefile Working on README. Dec 27, 2016

README.md

Procedural Generation of Clouds with Vector Graphics.

This is just a quick experiment where I tried generating procedural 2D clouds using vector graphics. The experiment is just a program that outputs a bunch of vector clouds as a SVG file:

You can see the SVG files in the directory img/.

Building and Usage

You can build using make:

make

You can now generate an SVG with clouds by doing

./cloud_gen > out.svg

By changing the variable

int TYPE = 0;

in main.cpp you can generate different kinds of clouds.

How Does this Work?

We start with the geometry for an ellipse:

Then we replace every edge on the original ellipse with a cubic Bezier curve:

To introduce some randomness, we randomly move the control points of the cubic bezier curves some:

and that's it!