xxxxxxxxxx
40
let sky;
function preload() {
// Get the most recent earthquake in the database
sky = loadJSON('scan-s2.json');
}
function setup() {
sky = sky.a;
createCanvas(1000, 1000);
console.log(sky.length);
}
var p = 0;
function draw() {
background(200);
stroke(20);
strokeWeight(2);
for (let i = 0; i < sky.length; i++) {
let x = map(sky[i][0], -500,500,0,1000);
let y = map(sky[i][1],-500,500,0,1000);
let z = map(sky[i][2],0,-800,0,800);
point(x/2, z/2);
point((width/2+(y/2)), z/2);
}
}
function mouseClicked(){
}