NAVIGATION
SHIFT + SCROLL
camera pan
CTRL + SCROLL
camera zoom
ALT + SCROLL
camera rotate
S + SCROLL
scale point size
A + SCROLL
spherical coord rotation
let db = new GaiaDB();
let data = db.csv('../stellar/db/1565716393071O-result.csv');
let m19_max =-Infinity;
let m19_min = Infinity;
let m22_max =-Infinity;
let m22_min = Infinity;
let m25_max =-Infinity;
let m25_min = Infinity;
data.map( x => {
if(x[19] && !Number.isNaN(x[19])) {
m19_min = Math.min(x[19],m19_min)
m19_max = Math.max(x[19],m19_max)
}
if(x[22] && !Number.isNaN(x[22])) {
m22_min = Math.min(x[22],m22_min)
m22_max = Math.max(x[22],m22_max)
}
if(x[25] && !Number.isNaN(x[25])) {
m25_min = Math.min(x[25],m25_min)
m25_max = Math.max(x[25],m25_max)
}
})
// make a function to plot
let ψ = measure => {
let θ = measure[2] /180*π;
let φ = measure[1] /180*π;
// [θ,φ] = CooConversion.J20002Galactic([θ,φ]);
//
// θ*=1/180*π
// φ*=1/180*π
let M = 0.6;
let R = Math.pow(10,(measure[19]-M+5)/5)/30000;
let x = R*Math.cos(θ)*Math.cos(φ);
let y = R*Math.cos(θ)*Math.sin(φ);
let z = R*Math.sin(θ);
// let r = Math.pow ( 100, -(measure[19]-m19_min)/(m19_max-m19_min) );
// let g = Math.pow ( 10, -(measure[22]-m22_min)/(m22_max-m22_min) );
// let b = Math.pow ( 10, -(measure[25]-m25_min)/(m25_max-m25_min) );
// let g = b+r;
let vra = measure[6];
let vdec = measure[8]
let vx = vra * R;
let vy = vdec * R;
let vz = measure[28];
let v = Math.sqrt(vx*vx + vy*vy)
// let r = 1-v/20;
// let g = v/20;
// let b = v/20;
// let r = vx*vx/10;
// let g = vy*vy/10;
// let b = 1-r-g;
let r = vx*vx/10;
let g = 1;//vy*vy/10;
let b = 1;//vz*vz;
// let ang = Math.atan2(vy,vx);
// let r = Math.cos(ang)*.5 + .5;
// let g = Math.sin(2*ang)*.5 + .5;
// let b = 1;
// let size = v/10;
let size = 1;
return {
position:[x,y,z],
color:[r,g,b],
size:size,
}
}
let φ = measure => {
// we could give stars around instead
if(measure==undefined) measure = "Nothing"
document.getElementById("selected").textContent = "hovering : [" + measure + "]"
};
let p = StellarPlot.points(data, ψ, φ)
//let p = StellarPlot.healpixPoints(data, ψ, φ)
output(p);
surface
let db = new GaiaDB();
// let depth = 8;
// let data = db.healpix(depth);
let ψ = healpix => {
return {
npix:healpix[0],
value:healpix[1],
count:healpix[2],
}
}
let φ = measure => {
// we could give stars around instead
if(measure==undefined) { measure = "Nothing" }
document.getElementById("selected").textContent = "hovering : [" + measure + "]"
};
let depth = 8
let p8a = StellarPlot.healpixSurface(db.healpix(depth), ψ, φ,depth,"hammer");
let p8b = StellarPlot.healpixSurface(db.healpix(depth), ψ, φ,depth,"spheric");
let p8c = StellarPlot.healpixSurface(db.healpix(depth), ψ, φ,depth,"spheric3d");
p8a.pos(0,-π,0);
p8b.pos(0,0,0);
p8c.pos(0,π,0);
output( p8a )
output( p8b )
output( p8c )
TODO healpix
- interactive color surface
- drilldown
- spherical camera control (rotation + zoom)
- touchpad + mouse control
- layers of data
- galactic + αδ on hover
- display values on line
- grid galactic/equatorial(ICRS)/ecliptic
- highlight selection
- performance issue on gt750m (on osx)
DONE healpix
- textureatlas/megatexture → performance hit are not good
- force double : webgl does not support double
- healpix BUG : probably hardware issue
- numerical error in spherical transform (try taylor ?) : probably hardware issue
TODO camera
- force camera up
- auto depth (auto fustrum + rotate around mouse 3d position + anisotropic zoom centerd in mouse 3d position )
TODO
- drill down
- quad view (or more when running on n-dimentional points)
- mask / selectio n
- matcap
- axis legend
- implement GAIA structures (database with cache thing)
- vaadin integration
- test on firefox
- test on safari
- test on edge