Create a gist now

Instantly share code, notes, and snippets.

anonymous /LogisticMap Secret
Created Dec 6, 2015

What would you like to do?
# include <Siv3D.hpp>
void Main()
{
Window::Resize(800, 400);
double a, x, x0;
int xa, ya;
x0 = 0.0001;
Image lm(800, 400, Palette::Black);
for (a = 1, x = x0; a < 4.0; a = a + 0.004){
xa = a * 200;
for (int i = 0; i < 400; i++){
x = a * x * (1 - x);
ya = 400 - x * 400;
lm[ya][xa] = Palette::White;
}
}
Texture texture(lm);
while (System::Update())
{
texture.draw();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment