Universe Viewer
Universe Viewer is an interactive software for the visualization and geodesic analysis of high-redshift astronomical objects.


It allows for the production of a conformal map of cosmological structures, more specifically quasars, by taking into account the curvature of the universe. Based on concepts from astronomy and general relativity, it is designed to be a working tool for research in cosmology, facilitating the identification of large-scale structures in comoving space or in a reference space.
This project is based on the concepts developed in the publication Framework for cosmography at high redshift, by R. Triay, L. Spinelli, R. Lafaye.


It is free software, and its source code is available on its GitHub page.
This web version of the software was ported from the the Java version (which is no longer maintained today), with the help of artificial intelligence to speed up the tedious sequences of converting code from Java / Swing / JOGL to JavaScript / Vue.js / Vuetify / Three.js.
I particularly thank Pr. Roland Triay for his help during the design of the Java version of the software, created as part of my Master's training during a research study project (TER), carried out in tandem with Julie Fontaine, in 2008.
Even older versions of a similar software existed, in Fortran and C, based on the same research publication, but they suffered from portability issues.
Map Projection of Objects
The Framework for cosmography at high redshift presents a framework for projecting the studied objects onto a plane, depending on the chosen cosmological parameters and the viewpoint.
These objects are defined by three main characteristics:
- the right ascension, the first term associated with the equatorial coordinate system, it is the azimuth, the equivalent on the celestial sphere of terrestrial longitude,
- the declination, the second term, which measures the angle of an object from the celestial equator, it is the elevation, the equivalent of terrestrial latitude,
- and the object’s redshift, a relativistic effect that allows its distance from the observer to be inferred.
It is therefore from this data that the objects are represented on screen. Initially, the projection onto the reference space was developed for the case of a positive curvature of the universe, then this work was generalized to negative curvature. The calculations were finally extended for representation in comoving space, which abstracts from the expansion of the universe.
Calculation of Comoving Distance
The comoving distance (dimensionless) is denoted
where:
, a cosmological constant standing for vacuum energy, , the curvature parameter, defining the global universe geometry, , accounts for the presence of cosmic microwave background photons as sources of gravity, , the matter density parameter,
and a represents the cosmological scale factor. For an observed object with a redshift z, it is equal to:
This scale factor describes the state of expansion of the Universe at the moment the light was emitted. Today, we have
Normalization of Comoving Distance in Curved Geometry
When the comoving space is not flat (
This variable naturally appears in the non-zero curvature spatial metric:
In the specific case of flat space (
R is used to place points in the curved geometry.
Calculation of the Projection onto the Observation Plane
Each cosmological object is represented by a 4D vector in the homogeneous spacetime of the model:
The first three coordinates (x, y, z) represent the spatial position of the object in the 3D embedding space corresponding to the chosen geometry (spherical if
The fourth coordinate t represents the conformal temporal component (associated with the comoving distance
The x, y and z coordinates are calculated as follows:
where
In reference space,
The 2D display requires projecting this 4D vector onto an image plane, which represents the plane of the sky according to the viewpoint.
Construction of the Local Observation Basis
The user defines their orientation in the universe using three angles:
- RA1, the right ascension (azimuth),
- Dec1, the declination (elevation),
- Beta, the rotation around the line of sight (roll).
From these angles, three orthonormal vectors are constructed in the 3D Euclidean space:
: direction of gaze (center of the projection), : local horizontal direction, : local vertical direction.
These three vectors form a spatial orthonormal basis. In the 4D spacetime of the model, this basis becomes:
The fourth basis vector is defined as:
where:
This vector encodes the temporal component of the frame. Its normalization depends on the chosen space (reference or comoving), as this ensures that the projections respect the model's metric.
Projection onto the Image Plane
For an object whose 4D vector is
Examples of Projections
Hewitt & Burbidge QSO Catalog
Here are some projections obtained on the Hewitt & Burbidge quasar catalog, composed of 7,236 objects.
The blue area represents the visible universe, the gray line surrounding it is the cosmological horizon.
The white area represents the visible universe, the black line surrounding it is the cosmological horizon.
Front view, positive curvature

Our galaxy is at the center.
Edge view, positive curvature

Our galaxy is on the far right.
Edge view, negative curvature

Our galaxy is on the far left.
Sky view

Here we see what radio telescopes have observed from Earth.
Objects selection

You can select objects with an additive or intersection selection tool, allowing to accurately select areas from different views.
Selected objects are in green.
Selected objects are in red.
6dF Galaxy Survey
6dF Galaxy Survey catalog is composed of 124,646 objects.
Zoom


Here we are in face vue 2, and the projection is zoomed with our galaxy approximately in its center.
Quasars (13th Ed.) (Veron-Cetty+)
This catalog is composed of 133,335 objects.
Coloration en dégradé du redshift


To better appreciate displayed objects redshift, it is possible to give them a color.
Nearest objects from our galaxy are in blue, most distant in red.
Nearest objects from our galaxy are in green, most distant in green.
Distance Between Two Objects
Let
which can be written explicitly as:
To compute the geodesic distance between these objects in a space with non‑zero curvature, two cases must be considered:
case
case
where
The dimensionless comoving distance is then given by:
In the special case of a flat space, the comoving distance is obtained using the Euclidean law of cosines:
Finally, the comoving distance can be expressed in physical units (Mpc) as:
where
Implementation
Here are some technical choices regarding the implementation.
Integral computation
Two ways to compute integrals have been implemented:
- the Romberg method, fast but less accurate,
- the trapezoidal rule, slower but more precise.
Parallel processing
By default, in a web browser, JavaScript runs on the main thread, which also handles the page rendering code. Not only does this loop use only a single CPU core, but intensive computations also freeze the user interface.
We have a large number of objects for which we compute projections based on cosmological parameters. This set of objects can easily be split into several chunks so that processing can be done on multiple cores at the same time.
Parallelization in Universe Viewer uses web workers, which allow us to divide the workload according to the number of available CPU cores. This process is performed in the following files:
- workerPool.js, which manages the pool of workers, their lifecycle, and their execution for projection calculation,
- projectionWorker.js, the worker task code that processes a subset of the objects,
- projection.js, the projection computation functions.
If the number of objects to process falls below a certain threshold, the computation is not parallelized because the overhead caused by the workers management would be counterproductive.
To make the parallelisation more relevant, we are using shared memory between workers and graphical rendering, using SharedArrayBuffer: there is zero data copy since a catalog has been loaded.
If SharedArrayBuffer is unavailable, for example due to security constraint not met, computing is not parallelized.
These optimizations allow UniverseViewer to handle million targets catalogs, as AGN/QSO Value-Added Catalog for DESI DR1, or Million Quasars Catalog, Version 8.
Official Website
GitHub Page
Framework for cosmography at high redshift - R. Triay, L. Spinelli, R. Lafaye (1996), HTML version, et text PDF version
Romberg method for integral computation
Trapezoidal rule for integral computation
Old Java version