Binders World
three.js - Astronomy
Astronomical apps using WebGL and three.js. CC BY 4.0
Interactive stellarium showing up to 377,880 (default 46,954) of the brightest stars down to apparent magnitude 10.0 (default 8.0).
- Displays proper star sizes and colors on black sky.
- Star name is shown when pointer is on a star.
- Camera can be orbited by left-dragging.
- Stellar motions can be animated for various time frames.
- Star attenuations, camera and animation parameters can be set.
- Constellation can be selected by searching.
- Star can be selected by clicking or searching.
- Camera can be orbited to track or animated to move to selected star.
- User interface can be toggled on and off.
Constellation and star search
Constellations can be searched by IAU abbreviation (3 letters) or (part of) Latin name.
Stars can be searched by catalog index (e.g. "[1]..." for Sirius) or (part of) name, where only one name is given in catalog in approximate priority order:
- IAU name (e.g. "Sirius")
- short Bayer designation (e.g. "β Mus"/"bet Mus"/"beta Mus", "γ02 Vel"/"gam02 Vel"/"gamma02 Vel" or "q Car")
- short Flamsteed designation (e.g. "3 Cen")
- short variable designation (e.g. "T CrB" or "V415 Car")
- Henry Draper catalog number (e.g. "HD 102350")
- SAO catalog number (e.g. "SAO 228708")
- other catalog number (e.g. "HIP 59050")
- GAIA DR2 catalog number (e.g. "GDR2 2892312723242963072")
See JSON catalog file for full list of searchable names.
Scenes
Scenes tailored by call arguments (described below):
Call arguments
The default start view shows the stars around α 06h δ 00°, mainly the constellation Orion, but various parameters can be set by adding arguments to the URL, so the basic call
http://binders.world/threejs/astro/stars1.html
corresponds to the defaults
http://binders.world/threejs/astro/stars1.html?hygdata_v3_mag_sorted_min2&epoch=2000&n=46954&d=5000&att=0.1&con=&i=0&j=-1&fov=50&a=0.001&r_a=6&dec=0&animbeg=0&animend=1000000&anims=100&moves=5&rots=2&clean=0&header=0&ast=0&grid=0&close=0
This permits tailoring scenes directly in the URL, e.g. to share with others. The arguments are:
- json: star data file name (string).
Name of a JSON file without path and extension.
- epoch: epoch of star positions (float year 2000.0).
Base year for stellar positions and motions.
- n: max number of stars (integer 0 - 377880).
High numbers can make the app slow or even crash, low numbers suit slow devices, can be changed in app.
- d: max diameter of stars (integer 0 - 5000).
Max star diameter in pixels, regardless of attenuation, can be changed in app.
- att: attenuation of stars (float 0.01 - 10.0).
Scales star diameters, can be changed in app.
- con: watch constellation (string).
IAU abbreviation (e.g. CMa) or (part of) Latin name of the constellation the view is centered on, can be changed in app.
- i: origo star (integer 0 - 377880).
Index of star the scene rotates around (0=Sol/Sun, 1=Sirius, 2=Canopus, 3=Arcturus, ...), can be changed in app.
- j: watch star (integer 0 - 377880).
Index of star the view is centered on, can be changed in app.
- fov: camera field of view vertically (float ° 1.0 - 150.0).
The vertical angle the camera view covers, can be changed in app.
- a: camera offset (float pc 0.001 - 1000000.0).
The distance in parsecs (3.26 light-years) at which the camera orbits the scene origo, can be changed in app.
- r_a: view right ascencion (float h 0.0 - 24.0, not 0).
The center right ascension of the view, can be changed in app.
- dec: view declination (float ° -90.0 - 90.0).
The center declination of the view, can be changed in app.
- animbeg: animation start year (float year -1000000000.0 - 1000000000.0).
Start year CE for stellar motion animation, can be changed in app.
- animend: animation end year (float year -1000000000.0 - 1000000000.0, not 0).
End year CE for stellar motion animation, can be changed in app.
- anims: animation duration in seconds (float s 1.0 - 86400.0).
The number of seconds stellar motion animation takes, can be changed in app.
- moves: time to move origo position (float s 1.0 - 3600.0).
The number of seconds it takes the camera to fly from one star to another, can be changed in app.
- rots: time to rotate camera (float s 1.0 - 3600.0).
The number of seconds it takes the camera to rotate to a new watch, can be changed in app.
- clean: make animation display clean (integer 0 - 1).
1 hides user interface, toggle button and mouse cursor during animation, can be changed in app.
- header: add status header (integer 0 - 1).
1 shows watch star, year and position as header, can be changed in app.
- ast: add asterism lines (integer 0 - 1).
1 shows asterism lines, can be changed in app.
- grid: add equatorial grid lines (integer 0 - 1).
1 shows grid lines, can be changed in app.
- close: closest stars logged (integer 0 - 100).
The number of closest stars logged to console during animation.
JSON data
The structure of the JSON file with star data is similar to below:
[
{"name":"Sol ()","amag":4.850,"ci":0.656,"x":0.000005,"y":0.000000,"z":0.000000,"vx":0.00000000,"vy":0.00000000,"vz":0.00000000},
{"name":"Sirius (CMa)","amag":1.454,"ci":0.009,"x":-0.494323,"y":2.476731,"z":-0.758485,"vx":0.00000953,"vy":-0.00001207,"vz":-0.00001221},
{"name":"Canopus (Car)","amag":-5.504,"ci":0.164,"x":-5.992679,"y":57.132034,"z":-75.396105,"vx":-0.00001140,"vy":0.00002059,"vz":-0.00001049},
{"name":"Arcturus (Boo)","amag":-0.307,"ci":1.239,"x":-8.823448,"y":-5.932531,"z":3.698938,"vx":-0.00005905,"vy":0.00003220,"vz":-0.00010473},
...
{"name":"NN 3693 ()","amag":17.134,"ci":1.72,"x":-14.050740,"y":0.375012,"z":1.725275,"vx":0.00005281,"vy":-0.00002395,"vz":-0.00006825}
]
The parameters are:
- name: star identifier (string).
- amag: absolute magnitude (float).
- ci: color index B-V (float).
- x: position in parsecs along α=0h,δ=0° (float).
- y: position in parsecs along α=6h,δ=0° (float).
- z: position in parsecs along δ=90° (float).
- vx: velocity in parsecs/year along α=0h,δ=0° (float).
- vy: velocity in parsecs/year along α=6h,δ=0° (float).
- vz: velocity in parsecs/year along δ=90° (float).