High-Level Project Summary
To a distant observer, light from asteroids appears as single points. Whilst it is impossible to directly measure asteroid properties from just one point of light, it is possible to deduce properties based on how the light varies over time. However, this is by no means a perfect method, as multiple asteroids can return very similar light curves. To aid in the analysis of these light curves, the team has created a tool called ALCS: the Asteroid Light Curve Simulator. This allows a user to generate the light curve from an inputted asteroid, enabling a more intuitive understanding of how geometry dictates the light detected by the observer.
Link to Project "Demo"
Link to Final Project
Detailed Project Description
What Exactly does it do?
Our software will generate a light curve plot of a 3D object in orbit which occurs by rotating the object that a user inserts and taking a picture of that image inside of a Blender python script.

How does it work ?
To generate these curves, a combination of Python and Blender were used to turn information about the asteroid into a corresponding observed light curve. To generate a light curve, the following inputs are required:
- Geometry data in the form of an OBJ file (this is available for a number of asteroids from the NASA 3D Models database)
- Rotational axis with respect to the inputted 3D model
- Rotational period of the observed body
- Relative position of the Sun with respect to the observed body
- Relative position of the Observer with respect to the observed body
- Number of points we want to create the lightcurve (called steps in our project)
From this information, it is possible to generate a light curve: the varying average brightness of the body plotted against one rotational period.
It is important to note the simplifications made in this calculation:
- The asteroid does not move significantly with respect to the observer and the Sun during one rotational period: whilst some asteroids have rotational periods up to a number of weeks, most asteroids have rotational periods under 24 hours, and as such this assumption does not affect the calculations significantly.
- The asteroid is matte and monochromatic: whilst more complex models for asteroid albedo do exist, this assumption is okay for our purposes.
- There is no noise in the measured brightness of the asteroid: noise is specific to the sensor and the conditions present during the observation period, and as such including noise is out of scope for this project.
- The body only rotates around one fixed axis with respect to the reference frame of the body: whilst all rotating bodies only have one axis of rotation, it is possible for this axis to move depending on the mass distribution of the body. This can lead to aperiodic light curves, and would dramatically increase the complexity of the project; as such, this is deemed out of scope for this project.
For a future version of ALCS, each of these assumptions could be taken into account during the calculations, which would improve the physical accuracy of the light curves generated.
The process of how this works follows the ALCS code’s structure image below:

Firstly, ALCS_GUI.py is the main folder which calls all the codes from the other file and produces a GUI for users to input parameters (these parameters includes the camera Position, number of steps, rotational axis and file name).
After inputting the parameters, the information will be sent to a Blender python script by the passparameters() function that generates the dict.txt file so that the Blender python script (BlenderAsteroid2.py) can read the text file and use the variables.
Next, the command runBlender() will execute the BlenderAsteroid2.py file which uses a batch (renderfile1.bat) file as an intermediate step. BlenderAsteroid2.py will generate images equal to the amount of steps stated ie. BlenderImage1.png, BlenderImage2.png, … BlenderImagen.png as such:

After the image has been generated in the Image folder, the command gen_lightcurve() is run which will calculate the luminosity of each image and return an output as an array to be used later when plotting the light curve.
Finally, the createFigure() function produces the image of the light curve inside the GUI for the user to see.
What benefits does it have ?
There hasn’t been a well known software that is able to produce a light curve just by inserting a 3D object yet. Our software not only allows a user to insert any 3d object as an .obj file and produce a light curve from it but also generates the images of the asteroid under lighting in an Image folder. Given the time constraint, there can be much more developments made to the project and we think this project could serve as a learning ground for fellow space-lovers to clone the code and contribute further. For example, the program could automatically create a database of lightcurves for different classes of asteroids, or the GUI could be improved to include the images produced in the Image folder directly onto the GUI and compile these images into a video of the asteroid's rotation.
What do you hope to achieve ?
We hope to provide a tool for light curve visualization so that we can be a part of discovering interesting properties of Trojan asteroids and help solve the inverse problem of finding the shape of the asteroids based on their lightcurves, but we also hope to contribute to the GitHub society so that fellow space-lovers can discover and adapt our code to their needs.
What tools, coding languages, hardware, or software did you use to develop your project?
Python makes up the backbone of the program, using a variety of packages such as tkinter, PIL, and bpy. We originally wrote our own ray tracing program, however we found it to be far more efficient to use Blender as it is very optimised for rendering 3D objects, and so decided to use this software in the development of our tool as well.
Space Agency Data
During development, we used the NASA 3D resource database to find sample asteroids (https://nasa3d.arc.nasa.gov/models). We also used archived footage of asteroids such as Bennu to compare our generated 3D models with the known lightcurves for these asteroids.
Hackathon Journey
Our team chose to work on the When Light Curve Throw us Curve Balls challenge as we are all passionate about aerospace and astrophysics.
We were especially keen to learn more about asteroids, as they are essential both to our understanding of where life stems from, with missions such as OSIRIS-REX trying to investigate this further, but also might form a danger to life on Earth if they ever collide with our planet, which missions such as DART are trying to hinder.
This inspired us to learn more about asteroids, and thus their lightcurves (which is the only way to deduce asteroids properties from Earth) and we were very keen to learn and research more about how asteroid lightcurves could be generated on a software such as Python during the Space Apps Hackathon week-end.
It was a very enjoyable experience to get thrown into a subject which we had very little experience in and build a tool completely on our own in the space of just two days.
As we had never worked on a similar challenge before and in very limited time, we decided to split our time wisely.
Firstly, we decided exactly what we wanted to do. We created two different “projects”: one was the bare minimum of what we wanted to achieve and the second was a more complex version of the project. We then split up the work which we needed to do into smaller more manageable tasks.
Throughout the week-end, we all worked on these smaller manageable tasks at the beginning of the day before joining a call where we discussed what we had tackled in the morning, and combining the different bits of code we had written together.
Whenever we encountered issues, we also joined a call with the people on the team which could help. By sharing screens and working on the code together this way, we managed to build a working lightcurve simulator.
Finally, on Sunday evening, we all joined together to write our report together and submit the project on the Space Apps portal.
During the week-end, we learnt a lot. Not only did we learn to use new softwares, such as Blender, or new packages, such as tkinter (which we used to produce a GUI), but also softer skills, such as communication, patience and time-management.
Overall, we really enjoyed working on this challenge, which not only allowed us to learn more about the day-to-day work of astrophysicist and aerospace engineers, but also allowed us to all catch up with each other as we all set off to different universities after our undergraduate degree!
References
“Asteroids and Meteoirites”, URL: https://ase.tufts.edu/cosmos/print_chapter.asp?id=13
“NASA 3D Resources”, URL: https://nasa3d.arc.nasa.gov/models
“The Twisting Tennis Racket”, DOI: 10.1007/bf01049489
The Pillow/PIL python package, Link: Pillow · PyPI
The tkinter python package, Link: tkinter — Python interface to Tcl/Tk — Python 3.9.7 documentation
The matplotlib python package, Link: matplotlib · PyPI
The bpy python package, Link: bpy · PyPI
The numpy python package, Link: NumPy
The os python package, Link: os — Miscellaneous operating system interfaces — Python 3.9.7 documentation
The python software, Link: Welcome to Python.org
The Blender software, Link: blender.org - Home of the Blender project - Free and Open 3D Creation Software
Tags
#Asteroids #LightCurve #WhenLightCurvesThrowUsCurveBalls #NASA #Trojans
Global Judging
This project has been submitted for consideration during the Judging process.

