Nyx Devlog #2: The Curved Sail Arc
Status: Nyx V2 Complete
Mood: Sleep-deprived aerospace engineer
Bug Count: We don’t talk about the 90° bug.
So… what happened?
This dev cycle started with a simple goal:
“Let’s add some tilt to the sails.”
Several hours later, we somehow ended up with a computational beam-riding lightsail simulator.
Oops.
Gaussian Beams Are Cool
Nyx uses a Gaussian beam to model the laser intensity distribution.
def gaussian(r):
return I0 * np.exp(-2 * r2 / w02)
Basically:
The beam is strongest at the center.
The farther away you go, the weaker it gets.
Nature decided lasers should have exponential decay because apparently linear wasn’t dramatic enough.
Tilting the Sails
The sails can now rotate about the X and Y axes.
def rotateX(vector, angle):
x, y, z = vector
return np.array([
x,
y*np.cos(angle) - z*np.sin(angle),
y*np.sin(angle) + z*np.cos(angle)
])
def rotateY(vector, angle):
x, y, z = vector
return np.array([
x*np.cos(angle) + z*np.sin(angle),
y,
-x*np.sin(angle) + z*np.cos(angle)
])
This worked surprisingly well.
Unlike the visualization.
Introducing: The Hemisphere™
Rectangle sails were getting lonely.
So Nyx gained a new geometry:
class SphereLightSail():
(Yes, it’s technically a hemisphere. Naming things is hard.)
The hemisphere is discretized into tiny patches that each experience radiation pressure from the laser beam.
Science!
Radiation Pressure Time
Every tiny patch gets hit by photons.
The force magnitude is calculated using:
fmag = (2 * I / c) * (cosTheta**2) * dA
where:
I is beam intensity,
c is the speed of light,
cosTheta accounts for sail orientation,
dA is the patch area.
Translation:
Tiny packets of light aggressively boop the sail.
Torque Has Entered The Chat
Turns out forces acting away from the center like to cause problems.
tau = np.cross(position, F)
Nyx now computes total torque acting on the sail.
This means we can begin asking questions like:
Which geometries are stable?
instead of:
Why is Matplotlib gaslighting me?
Visualization!
Nyx can now visualize sail geometries using 3D plots.
scatter = ax.scatter(
self.xPoints,
self.yPoints,
self.zPoints,
c=self.intensities,
cmap=‘plasma’,
s=30
)
With a colorbar:
fig.colorbar(
scatter,
ax=ax,
label=‘Beam Intensity (W/m^2)’
)
And even a force vector:
ax.quiver(
0, 0, 0,
Force[0], Force[1], Force[2],
color=‘red’,
length=2,
normalize=True
)
It looks surprisingly professional.
Until you rotate it to 90°.
The Great 90° Incident
At one point, Nyx decided that rotating things by 90° was optional.
Several debugging sessions later:
“It’s probably fine.”
Nyx is now operating under the internationally recognized engineering principle of:
If the physics works, Future Me can fix the plotting (ik guys, ELITE mindset).
What Nyx V2 Can Do
Nyx V2
├── Gaussian beam model ✓
├── Rectangle sail geometry ✓
├── Hemisphere sail geometry ✓
├── Sail tilting ✓
├── Radiation pressure forces ✓
├── Torque calculations ✓
├── Intensity heatmaps ✓
└── Force vector visualization ✓
What’s Next?
We’re moving beyond random shapes.
Future geometries need to answer one question:
Could someone actually use this as a lightsail?
Possible candidates:
□ Paraboloids
□ Hyperboloids
□ Other beam-riding geometries from literature
Party hats are currently under review.
Final Thoughts
Nyx V2 was the phase where the project stopped feeling like a collection of scripts and started feeling like an actual research tool.
Also, I now know far more about Matplotlib’s quirks than any human
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.