DeepSeek V3 0324 生成 3D 地月系统模拟

DeepSeek V3 0324版仅用1分钟即生成可直接运行的3D地月系统HTML代码,基于Three.js CDN,无需修改。地球纹理精细还原地形地貌,月球公转轨迹准确,缩放旋转流畅,视觉与交互体验俱佳。

发布于2025年3月25日 06:06
编辑零重力瓦力
评论0
阅读23

之前分别用阿里通义千问 Qwen2.5-Max 、Grok 3,以及 Claude 3.7 Sonnet 生成了 3D 地月系统模拟的代码。通义千问和 Grok 3 都一次性生成了准确完整的代码,Qwen 生成的较为美观,Grok 速度更快,操作性更强。Claude 第一次生成有错误,经过两轮修改后修复了错误,代码质量比前两者要高。

从开始生成代码到完成,DeepSeek 新版 V3 仅用了 1 分钟,且一次性生成,没有任何错误。生成的代码不仅准确地模拟了地月系统的运动方式,还展现了极高的细节品质。地球和月球的纹理非常精美,尤其是地球的纹理,完整呈现了地形地貌的细节,视觉效果十分逼真。此外,系统的缩放和旋转操作也非常流畅,用户体验极佳。

提示
请基于 Three.js 制作地月系统演示,Three.js 使用 cdn,输出一个完整的html文件

演示

地月系统演示

DeepSeek V3 完整代码

<!DOCTYPE html>

地月系统演示 - Three.js

body {
margin: 0;
overflow: hidden;
background-color: #000;
}
canvas {
display: block;
}
#info {
position: absolute;
top: 10px;
width: 100%;
text-align: center;
color: white;
font-family: Arial, sans-serif;
pointer-events: none;
}

地月系统演示 - 月球绕地球公转

// 初始化场景、相机和渲染器
const scene = new THREE.Scene();
const camera = new THREE.PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0.1, 1000);
const renderer = new THREE.WebGLRenderer({ antialias: true });

renderer.setSize(window.innerWidth, window.innerHeight);
renderer.setPixelRatio(window.devicePixelRatio);
document.body.appendChild(renderer.domElement);

// 添加轨道控制器
const controls = new THREE.OrbitControls(camera, renderer.domElement);
controls.enableDamping = true;
controls.dampingFactor = 0.05;

// 设置相机位置
camera.position.z = 30;

// 添加环境光和定向光
const ambientLight = new THREE.AmbientLight(0x404040);
scene.add(ambientLight);

const directionalLight = new THREE.DirectionalLight(0xffffff, 1);
directionalLight.position.set(1, 1, 1);
scene.add(directionalLight);

// 创建地球
const earthGeometry = new THREE.SphereGeometry(5, 32, 32);
const earthMaterial = new THREE.MeshPhongMaterial({
map: new THREE.TextureLoader().load('https://threejs.org/examples/textures/planets/earth_atmos_2048.jpg'),
specularMap: new THREE.TextureLoader().load('https://threejs.org/examples/textures/planets/earth_specular_2048.jpg'),
normalMap: new THREE.TextureLoader().load('https://threejs.org/examples/textures/planets/earth_normal_2048.jpg'),
specular: new THREE.Color('grey'),
shininess: 5
});
const earth = new THREE.Mesh(earthGeometry, earthMaterial);
scene.add(earth);

// 创建月球
const moonGeometry = new THREE.SphereGeometry(1.27, 32, 32);
const moonMaterial = new THREE.MeshPhongMaterial({
map: new THREE.TextureLoader().load('https://threejs.org/examples/textures/planets/moon_1024.jpg'),
normalMap: new THREE.TextureLoader().load('https://threejs.org/examples/textures/planets/moon_normal_1024.jpg'),
});
const moon = new THREE.Mesh(moonGeometry, moonMaterial);
scene.add(moon);

// 设置月球初始位置 (距离地球约384,400km,按比例缩小)
moon.position.x = 10;

// 添加星空背景
const starGeometry = new THREE.BufferGeometry();
const starMaterial = new THREE.PointsMaterial({
color: 0xffffff,
size: 0.1
});

const starVertices = [];
for (let i = 0; i < 10000; i++) {
const x = (Math.random() - 0.5) * 2000;
const y = (Math.random() - 0.5) * 2000;
const z = (Math.random() - 0.5) * 2000;
starVertices.push(x, y, z);
}

starGeometry.setAttribute('position', new THREE.Float32BufferAttribute(starVertices, 3));
const stars = new THREE.Points(starGeometry, starMaterial);
scene.add(stars);

// 动画循环
function animate() {
requestAnimationFrame(animate);

// 地球自转
earth.rotation.y += 0.005;

// 月球公转
const time = Date.now() * 0.0005; // 减慢速度
moon.position.x = Math.cos(time) * 10;
moon.position.z = Math.sin(time) * 10;

// 月球自转 (总是面向地球)
moon.rotation.y += 0.01;

controls.update();
renderer.render(scene, camera);
}

// 处理窗口大小变化
window.addEventListener('resize', () => {
camera.aspect = window.innerWidth / window.innerHeight;
camera.updateProjectionMatrix();
renderer.setSize(window.innerWidth, window.innerHeight);
});

animate();

相关文章

Mistral 把编程 Agent 扔进云里
AI 编程开发
2026年5月12日
0 条评论
零重力瓦力

Mistral 把编程 Agent 扔进云里

Mistral 推出 Medium 3.5 开源模型与 Vibe 远程代理,将编程协作从“人机同步”转向“异步委派”。128B 稠密模型以 77.6% 的 SWE-Bench 成绩超越 Claude Sonnet 4,支持自部署。Vibe 允许开发者在云端沙箱并行运行多个任务,自动提交 PR 并通知审查。配合 Le Chat 通用工作模式,该方案适合追求效率的团队及关注数据安全的独立开发者,重新定义了 AI 辅助编码的工作流。

#Mistral#开源模型#AI 编程
阅读全文
写规格说明,不写代码:Logic 如何用 500 字 spec 把模型指令遵循率拉高 6 个点
智能体工程
2026年5月4日
0 条评论
零重力瓦力

写规格说明,不写代码:Logic 如何用 500 字 spec 把模型指令遵循率拉高 6 个点

西雅图创业公司 Logic 上线 spec 驱动 Agent 平台,用自然语言规格说明替代复杂工程。实测显示,在 IFBench 基准测试中,仅凭 500 字规范配合其自动化 harness,Gemini 3.1 Pro 性能提升 6 个百分点并登顶榜单。该平台将输入验证、契约执行等基础设施产品化,支持主流模型路由。对于正在开发 Agent 的团队,这证明优化约束描述比盲目升级模型更有效,目前已有超 250 家机构使用。

#AI 编程#提示词工程#上下文工程
阅读全文
DeepSeek v4、GPT 5.5,8 大模型编程实测
AI 编程开发
2026年4月30日
0 条评论
零重力瓦力

DeepSeek v4、GPT 5.5,8 大模型编程实测

DeepSeek v4 与 GPT-5.5 发布后,本文对包括两者在内的 8 款主流模型进行前端代码生成实测。通过统一提示词开发一款适配多端的 3D 飞行避障游戏,结果显示 DeepSeek v4 与 GPT-5.5 均能一次成功运行且细节出色,但前者缺失触控支持,后者生成耗时较长;其余模型在场景设计、交互逻辑或稳定性上各有优劣。测试旨在直观对比各模型实际编码表现,开发者可访问体验网站查看具体效果。

#AI 模型#DeepSeek#ChatGPT
阅读全文
互动讨论

评论区

围绕《DeepSeek V3 0324 生成 3D 地月系统模拟》展开交流,未登录用户可浏览评论,登录后可参与讨论。

评论数
0
登录后参与评论
支持发表观点与回复一级评论,互动后将同步到消息中心。
登录后评论
暂无评论,欢迎成为第一个参与讨论的人。