BoschSamuel/Simulation-of-a-Tokamak-Fusion-Reactor ? reverse-engineered prompt

Reverse engineered prompt

Build me a MATLAB simulation of a tokamak fusion reactor that shows how hot charged particles can be kept inside a magnetic bottle without hitting the walls.

I want two versions, one simple magnetic bottle demo and one fuller tokamak demo, with a visible 3D particle animation so it feels like a real physics simulation. The magnetic field should be calculated from the coils and rotating plasma cloud, and the particles should move realistically under that field. Please make it so I can just run the main scripts in MATLAB and see the simulation start right away.

If it helps, keep the field calculations efficient and clean, and include any small helper functions needed for the magnetic field and the 3D plotting. I’d like the result to be understandable and easy to tweak for a university style project, and if you need to check current MATLAB docs or best practices, feel free to do that.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab