All MicroEvals
Role: Act as a senior Three.js developer specializing in 3D ...
Create MicroEval

Role: Act as a senior Three.js developer specializing in 3D ...

Prompt

Role: Act as a senior Three.js developer specializing in 3D modeling and physics-based animation. Task: Generate a complete, self-contained HTML document that builds a detailed, interactive 3D model of Leonardo da Vinci's Ornithopter (the flapping-wing flying machine). Technical Constraints & Stack: Use Three.js (r152 or later) loaded via ES modules from a CDN (e.g., unpkg or cdnjs). Include OrbitControls for camera manipulation (rotation, pan, zoom). Do not use any external 3D model files (no GLTF/OBJ); all geometry must be constructed programmatically using Three.js primitives (BoxGeometry, CylinderGeometry, SphereGeometry, TorusGeometry, etc.). Use MeshStandardMaterial with appropriate roughness, metalness, and color for realistic wood, brass/iron gears, and leather/fabric wings. 3D Model Specifications (Visuals): Construct a central fuselage (wooden frame) made of intersecting beams and struts. Add a pilot "seat" or harness area in the center. Model a hand-crank mechanism and a set of interlocking gears (at least one large gear and one small pinion) near the center to drive the motion. Build the main wings extending outward from the fuselage. The wings should consist of: A wooden leading/trailing edge framework (thin cylinders/boxes). A stretched fabric surface connecting the frame (can be achieved with a slightly transparent plane or a thin box stretched across). Include a tail section with smaller stabilizer surfaces. Animation & Interactivity (Core Mechanics): Implement a flapping motion for both main wings. The wings must rotate up and down along their root hinge (X-axis or Z-axis, depending on orientation). The flapping must follow a smooth, sinusoidal wave (e.g., angle = amplitude * Math.sin(time * speed)). Mechanical Synchronization: Add a reciprocating rod or a crank arm that visually connects the rotating gear to the wing root, demonstrating the mechanical transmission. The gears should rotate continuously, and the wings should flap in sync with the crank's rotation. UI Controls: Create an HTML overlay panel with the following controls: A Toggle Button ("Start / Stop") to pause/resume the flapping animation. A Slider (range input) to adjust the flapping speed (e.g., from 0.5x to 3x the base speed). Lighting & Environment: Set up a rich lighting environment: an ambient light for base illumination, a primary directional light casting shadows (optional but preferred) to highlight the wooden texture, and a secondary fill light from the opposite side. Set a subtle background gradient or a soft solid color that contrasts well with the wooden model. Code Quality & Output Format: Provide the full code inside a single ````html` code block. The code must be well-commented, clean, and immediately runnable when saved as an .html file and opened in a browser. Ensure the camera starts at an optimal viewing angle (e.g., slightly above and to the side) to showcase the mechanical complexity.

A system prompt was added to support web rendering

Drag to resize

Response not available

Drag to resize
Drag to resize

Response not available

Drag to resize
Drag to resize