High-Level Project Summary
We've made an app that allows us to edit objects and simulates .obj body spinning (both rotation and precession) and being illuminated by stars and then creates a graph of objects magnitude as a function of phase.
Link to Project "Demo"
Link to Final Project
Detailed Project Description
Technology:
- We've chosen Three.js to create an app for this challenge because it allows us to operate with 3D objects in the browser efficiently. In addition, it has its own camera and light objects, with effective raycasting methods. Chart.js allowed us to build graphs quickly and with a user-friendly appearance.
Solution:
- Our app is an entirely user-side website, capable of generating an object's light curve from its shape, which can be defined by the .obj/.wv file chosen from the user's files. It simulates body spinning (both rotation and precession) and illuminates it by a star (parallels rays), rendering two images.
- The first one is created solely for UI and is rendered with a perspective (human-eye) camera. The user can modify conditions/objects and watch them in real-time.
- The second camera is used for brightness calculations. It takes the whole screen for the best precision, is hidden from the user, and is made with an orthonormal (projecting) camera, so the image would be the same as if it is seen from a large distance, like from Earth. To find brightness, we extract hidden but rendered pixels data. Then, we calculate the magnitude and plot it as a phase function to the Charts.js line chart, solving the main part of the challenge. The phase is taken from the own axis of rotation in both cases of zero and non-zero precession.
- Then we added the .obj/.wv editor so that the user could not only import .obj/.wv files but create a celestial body itself, and then check its light curve as the object changes. In our editor, users can rescale objects by any axe and add/delete spherical parts to/from the object. It is also possible to change the starting angle, direction, and absolute value for precession and rotating velocities. We also allowed users to change the asteroid's material and both the intensity and direction of light. The user can also add a natural light curve to the graph to compare it with the generated light curve.
Result:
- Both professionals and students can use our application. The formers can use it to train AI models or adapt already generated objects to have light curves that better fit the data. And the laters can gain and practice knowledge about light curves.
- In addition, our application can be used to develop a new method of reverse modeling: precession makes objects illuminated from more orientations so that more data can be received from the graph, and, as a result, more precise models can be created. This works especially in the case of large enough LCM of rotation and precession periods. On the other hand, the precession can reduce the data received, but our application can be used to predict such cases.
Space Agency Data
We used https://nasa3d.arc.nasa.gov/models to download .obj files of objects to build their light curve and to compare them with their real light curve to examine is our program working successfully(and interesting, it worked from the first run!). We also learned lot about light curves of asteroids from https://iopscience.iop.org/article/10.3847/PSJ/abb942 which help us understand more about the problem and consequently helped with doing our project.
Hackathon Journey
We’ve started with exploring the astrophysics of light reflection, and have chosen to calculate it as isotropic diffuse reflection. After that, we started learning how .obj files work and how to extract objects from .obj files. We've been challenged by .obj extracting, since our project is a fully user-side application, and ended up writing .obj extractor ourselves. We've used Charts.js to show graphs, and surprisingly, found it harder to code, than code graph completely ourselves. Despite that, we've used it, because of the looks of its graphs. On the second day, we made a .obj/.wv importer and editor, finished the UI, and created a comparison option. It was complicated for us to create scaling by an axe, but we successfully finished it.
Members thoughts on their experience:
Arthur -- I learned how to work with .obj files and honed my knowledge of light beam simulation.
Ostap -- Now I know that despite simple statement of the problem, we still may have a hard time solving it.
Vitalii -- I’ve learned how to code in JavaScript and, most importantly, how to print “‘“.
Oleksandr -- I’ve learned that getting an asteroid form from a light curve is a hard problem. Also, I researched modern approaches to solve it. NASA space app challenge showed me that solving problems in a team is much more fun and efficient than I thought it would be.
Makar -- I have significantly improved my JavaScript skills and learned to work with coordinate rotations in 3-dimensional space.
Kseniia -- I have learned how to wake up at 5 am(different time zones with teammates) and don’t be a potato brain in the morning(and also I opened for myself new programming language, JS, which I probably will try to learn).
References
https://nasa3d.arc.nasa.gov/models -- Nasa 3D Models Resources
https://threejs.org/docs/ -- Three.js Documentation
https://www.chartjs.org/docs/latest/ -- Charts.js Documentation
https://iopscience.iop.org/article/10.1088/0004-6256/150/3/75/pdf -- Asteroid light curves from the palomar transient factory survey: rotation periods and phase functions from sparse photometry
Tags
#astronomy #physics #software #web_design
Global Judging
This project has been submitted for consideration during the Judging process.

