Claude 4-physics-simulation
Prompt:
"Create an interactive physics simulation using HTML, CSS, and JavaScript. The webpage should feature a
canvas
where objects (such as balls or boxes) can move and collide based on physics principles. Implement
gravity,
friction, and collision detection using JavaScript. Include UI controls to adjust parameters like
gravity
strength, object mass, and bounce factor. Ensure the simulation is visually appealing and responsive."
Balls: 0
Total Energy: 0
FPS: 60
Click anywhere on the canvas to create a new ball. Adjust the physics parameters using the sliders above to see how they affect the simulation.