deepseek-r1-0528· DeepSeek LMArena Human Preference 140K
print a fish in openscad
- User
print a fish in openscad
- Assistant
To create a 3D fish model in OpenSCAD, you can use the following code. This design combines basic shapes (cylinders, spheres, cones) to form a stylized fish:
// Parameters for customization body_length = 30; body_diameter = 10; tail_length = 15; fin_size = 8; eye_size = 3; // Main fish body (cylinder with spherical ends) hull() { // Front sphere translate([body_length/2, 0, 0]) sphere(d=body_diameter, $fn=32); // Rear sphere translate([-body_length/2, 0, 0]) sphere(d=body_diameter*0.9, $fn=32); } // Tail fins translate([-body_length/2, 0, 0]) { rotate([90, 0, 0]) cylinder(h=tail_length, d1=0, d2=fin_size*2.5, $fn=24); rotate([-90, 0, 0]) cylinder(h=tail_length, d1=0, d2=fin_size*2.5, $fn=24); } // Top fin translate([0, 0, body_diameter/2]) rotate([90, 0, 0]) cylinder(h=fin_size, d1=0, d2=fin_size, $fn=24); // Side fins translate([body_length/4, 0, 0]) { // Left fin rotate([0, -20, 0]) cylinder(h=fin_size*1.5, d1=0, d2=fin_size, $fn=24); // Right fin rotate([0, 20, 180]) cylinder(h=fin_size*1.5, d1=0, d2=fin_size, $fn=24); } // Eyes translate([body_length/3, body_diameter/3, body_diameter/4]) sphere(d=eye_size, $fn=24);Key Features:
- Body: Elongated capsule shape made by hulling two spheres
- Tail: Two conical fins angled vertically
- Dorsal Fin: Single conical fin on top
- Pectoral Fins: Two side fins near the front
- Eye: Simple sphere near the head
Customization Options: Adjust these variables at the top:
body_length: Overall fish lengthbody_diameter: Body thicknesstail_length: Tail fin sizefin_size: Controls all fin dimensionseye_size: Eye diameter
To Modify:
- Change fin angles by adjusting
rotate()values - Add details like scales using loops and texture
- Create a base with
cube()for aquarium-like display
Rendering: Press F5 to preview or F6 to render. Export as STL for 3D printing.
[image: OpenSCAD Fish Visualization] open
This creates a symmetrical, cartoon-style fish that can be easily modified using the parameter variables. The model uses constructive solid geometry (CSG) operations and transformations to combine primitive shapes into a cohesive design.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.