function isThereAnythingAt(X, Y, Z, t) {
if (MODEL === 'Original') {
return Y>=GROUND_PLANE-(CITY_DISTANCE<Z&AVENUE_WIDTH<X%AVENUE_PERIOD&&X/BUILDING_WIDTH^Z/BUILDING_DEPTH)*8%(BUILDING_HEIGHT+1);
} else if (MODEL === 'Simple cubes') {
return Z%50>30 && (Y+110)%50<20 && X%50<20;
} else if (MODEL === 'Torus') {
X -= t;
Z -= 70;
Y += 10;
function rot(x, y, theta) {
const s = Math.sin(theta);
const c = Math.cos(theta);
return [c*x+s*y, c*y-s*x];
}
[X, Y] = rot(X, Y, t/50);
[Y, Z] = rot(Y, Z, t/20);
const q = Math.hypot(X, Z)-20;
return Math.hypot(q, Y)-10 < 0;
}
}