Strange attractors with OpenCL
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
 
 
 

38 lines
983 B

#include "app.hpp"
#include <NSWrapper.hpp>
#include <memory>
using namespace std;
int main() {
NSAppWrapper app;
unique_ptr<App> a;
app.create_window({
[&](ContextParameters ctxp){
a = make_unique<App>(ctxp.context);
},
[&](ContextParameters ctxp){
a->draw(ctxp.bind_framebuffer, ctxp.flush_drawable);
},
[&](ContextParameters, CGFloat w, CGFloat h){
a->resize(size_t(floor(w)), size_t(floor(h)));
}
});
app.create_window({{
{"s", 10.962073, 9, 13, [&](double x){ a->parameters[0] = x; }},
{"r", 31.211250, 30, 32, [&](double x){ a->parameters[1] = x; }},
{"b", 1.537946, 0.0001, 3, [&](double x){ a->parameters[2] = x; }},
{"dt", 0.013040, 0.0001, 0.03, [&](double x){ a->parameters[3] = x; }},
{"max", 20, 0.1, 250, [&](double x){ a->maxf = x*x; }},
{"gamma", 2, 0.1, 10, [&](double x){ a->gamma = x; }},
{"clear", 1, 0, 2, [&](double x){ a->clear = (x >= 1); }},
}});
app.run();
}