"""
Iron Giant - The Iron Giant (1999 Film)
Generated by Grok AI
Creates the beloved Iron Giant robot from the 1999 animated film "The Iron Giant".
Features the iconic design with industrial, machined aesthetic:
- Detailed head with skull structure and visor eye slot
- Layered torso armor with mechanical articulation
- Heavy industrial arms with tapered sections and joints
- Powerful legs with bell-bottom boots and knee plates
- Machined metal surfaces with beveled edges
- Subdivision surface for organic-metal appearance
Author: Grok AI
Category: robots
Tags: iron-giant, animated-film, industrial, machined, 1999, sci-fi, friendly-robot
Dimensions: ~350cm tall
Complexity: high
"""
import bpy
# --- 1. CLEANUP & SCENE SETUP ---
bpy.ops.object.select_all(action="SELECT")
bpy.ops.object.delete()
def create_detailed_cone(name, r1, r2, h, loc, rot=(0, 0, 0)):
"""Create a cone with beveled machined edges."""
bpy.ops.mesh.primitive_cone_add(radius1=r1, radius2=r2, depth=h, location=loc, rotation=rot)
obj = bpy.context.active_object
obj.name = name
# Add a Bevel for "Machined" look
bev = obj.modifiers.new(name="MachinedEdge", type="BEVEL")
bev.width = 1.5
bev.segments = 3
return obj
# --- 2. THE HEAD (Complex Geometry) ---
# Main Skull
bpy.ops.mesh.primitive_uv_sphere_add(radius=25, location=(0, 0, 275))
head = bpy.context.active_object
head.name = "Giant_Head"
head.scale = (1.1, 1, 0.85)
# Jaw/Chin (Separate piece for detail)
bpy.ops.mesh.primitive_cylinder_add(radius=18, depth=12, location=(0, 0, 260))
jaw = bpy.context.active_object
jaw.name = "Giant_Jaw"
jaw.scale = (1, 0.8, 1)
# The Visor/Eye Slot (Boolean Cut)
bpy.ops.mesh.primitive_cube_add(size=1, location=(0, 22, 275))
eye_cutter = bpy.context.active_object
eye_cutter.dimensions = (40, 10, 8)
mod = head.modifiers.new(name="EyeSlot", type="BOOLEAN")
mod.object = eye_cutter
mod.operation = "DIFFERENCE"
eye_cutter.hide_viewport = True
# --- 3. TORSO (Layered Armor) ---
# The Upper Chest
create_detailed_cone("Chest_Armor", 45, 65, 80, (0, 0, 215))
# The "Pelvis" Socket
bpy.ops.mesh.primitive_uv_sphere_add(radius=35, location=(0, 0, 160))
pelvis = bpy.context.active_object
pelvis.scale = (1.2, 1, 0.9)
# --- 4. ARMS (Mechanical Articulation) ---
for side in [-1, 1]:
# Shoulder "Ball"
bpy.ops.mesh.primitive_uv_sphere_add(radius=18, location=(75 * side, 0, 235))
# Upper Arm (Tapered)
create_detailed_cone(f"UpperArm_{side}", 10, 14, 60, (75 * side, 0, 195))
# Elbow Joint "Bolt"
bpy.ops.mesh.primitive_cylinder_add(
radius=8, depth=25, location=(75 * side, 0, 165), rotation=(0, 1.57, 0)
)
# Forearm
create_detailed_cone(f"Forearm_{side}", 16, 10, 70, (75 * side, 0, 125))
# --- 5. LEGS (Heavy Industrial) ---
for side in [-1, 1]:
# Hip Joint
bpy.ops.mesh.primitive_uv_sphere_add(radius=20, location=(30 * side, 0, 150))
# Thigh
create_detailed_cone(f"Thigh_{side}", 20, 25, 90, (30 * side, 0, 100))
# Knee Plate
bpy.ops.mesh.primitive_cylinder_add(
radius=12, depth=30, location=(30 * side, 20, 55), rotation=(1.57, 0, 0)
)
# Lower Leg (The "Bell-bottom" Boots)
create_detailed_cone(f"Boot_{side}", 35, 22, 100, (30 * side, 0, 5))
# --- 6. GLOBAL FINISH ---
bpy.ops.object.select_all(action="SELECT")
# Add a subdivision surface to all for organic-metal feel
for obj in bpy.context.selected_objects:
if obj.type == "MESH":
sub = obj.modifiers.new(name="Smooth", type="SUBSURF")
sub.levels = 1