国外技术达人 Ivan Fioravanti 分别通过 o3-mini、o1-pro、r1 生成 p5.js 脚本(p5.js是一个 JavaScript 创意编程库),模拟一个圆柱形容器中粒子的物理运动,颇为有趣。
对比视频

OpenAI o3-mini

OpenAI o1-pro

DeepSeek-r1
p5.js 脚本生成提示词
Write a p5.js script that simulates 25 particles in a vacuum space of a cylindrical container, bouncing within its boundaries. Use different colors for each ball and ensure they leave a trail showing their movement. Add a slow rotation of the container to give better view of what's going on in the scene. Make sure to create proper collision detection and physic rules to ensure particles remain in the container. Add an external spherical container. Add a slow zoom in and zoom out effect to the whole scene.
使用 p5.js 编写一个脚本,模拟 25 个粒子在一个圆柱形容器的真空空间中运动,并在其边界内弹跳。为每个粒子使用不同的颜色,并确保它们留下显示运动轨迹的痕迹。为容器添加缓慢的旋转效果,以便更好地观察场景中的动态。创建正确的碰撞检测和物理规则,以确保粒子始终保持在容器内。此外,添加一个外部的球形容器,并为整个场景添加缓慢的缩放(放大和缩小)效果。
评论(0)