Brownian tree/C++ animated: Difference between revisions
Content added Content deleted
(Created page with "=={{header|C++}}== 300px <lang cpp> #include <windows.h> #include <windowsx.h> #include <string> //-----------------------------------------...") |
|||
Line 1: | Line 1: | ||
=={{header|C++}}== |
=={{header|C++}}== |
||
[[File:brownianTreeAnim_cpp.png|300px]] |
[[File:brownianTreeAnim_cpp.png|300px]] |
||
The green dots you can see in this picture are what I call movers. They are particles that still do not belong to the tree. |
|||
<lang cpp> |
<lang cpp> |
||
#include <windows.h> |
#include <windows.h> |
||
Line 12: | Line 14: | ||
enum states { SEED, GROWING, MOVING, REST }; |
enum states { SEED, GROWING, MOVING, REST }; |
||
enum treeStates { NONE, MOVER, TREE }; |
enum treeStates { NONE, MOVER, TREE }; |
||
const int MAX_SIDE = |
const int MAX_SIDE = 500, MAX_MOVERS = 511, MAX_CELLS = 15137; |
||
//-------------------------------------------------------------------------------------------------- |
//-------------------------------------------------------------------------------------------------- |