xxxxxxxxxx
var img;
var x = 0;
var y = 0;
function preload() {
//load csv file
table = loadTable("brainscan_forp5.csv", 'csv', 'header');
//table = loadTable("Data.csv", 'csv', 'header');
}
function setup() {
c = createCanvas(windowWidth, windowHeight);
colorMode(HSB, 360, 100, 100, 100);
background(360, 0, 10);
filas = table.getRowCount();
i = 0; //Zähler
//noLoop();
}
function draw() {
translate(400, -150);
lon = table.get(i, 2); //Wert latitude Stelle i
loclon = map(lon, 11.791, 11.797, 0, windowHeight); // 50.192, 50.198, 50, 550 // 50.17, 50.20
lat = table.get(i, 1); //Wert longitude, Stelle i
loclat = map(lat, 50.192, 50.198, windowHeight, 0); //11.791, 11.797, 50, 550 // 11.77, 11.80
de = table.get(i, 3);
te = table.get(i, 4);
al = table.get(i, 5);
be = table.get(i, 6);
ga = table.get(i, 7);
let w = 2
let t = 90
noStroke();
fill(360, 0, 10);
rect(0, 0, -600, 300);
fill(200, 60, 100, t);
text("Delta", -380, 200);
ellipse(loclon, loclat, de * w, de * w);
fill(240, 60, 100, t);
text("Theta", -380, 220);
ellipse(loclon, loclat, te * w, te * w);
fill(280, 60, 100, t);
text("Alpha", -380, 240);
ellipse(loclon, loclat, al * w, al * w);
fill(320, 60, 100, t);
text("Beta", -380, 260);
ellipse(loclon, loclat, be * w, be * w);
fill(360, 60, 100, t);
text("Gamma", -380, 280);
ellipse(loclon, loclat, ga * w, ga * w);
fill(0, 0, 0);
i += 5;
}
function keyPressed() {
if (key == "s") {
save('visualization.png');
}
}