Загрузка данных


# Dio Brando 3D Model for Maple
# JoJo's Bizarre Adventure - Roblox Style
# Save this file and open in Maple to generate the .mw worksheet

restart:
with(plots):
with(plottools):

# ============================================
# DIO BRANDO - 3D CHARACTER MODEL
# ============================================

# Color definitions
yellow_hair := "255,215,0":
orange_jacket := "255,140,0":
black_inner := "25,25,25":
green_belt := "34,139,34":
green_heart := "0,255,0":
red_eyes := "255,0,0":
skin_color := "255,204,153":
brown_shoes := "139,69,19":
stand_yellow := "255,215,0":
stand_red := "255,0,0":
white_bg := "white":
gray_pedestal := "204,204,204":

# ============================================
# HEAD COMPONENTS
# ============================================

# Head (box)
head := box([0, 0, 0], 0.8, 0.8, 0.6, color=skin_color):

# Eyes (small boxes)
eye_left := box([-0.2, 0.1, 0.31], 0.15, 0.08, 0.02, color=red_eyes):
eye_right := box([0.2, 0.1, 0.31], 0.15, 0.08, 0.02, color=red_eyes):

# Eyebrows
brow_left := box([-0.2, 0.25, 0.31], 0.2, 0.05, 0.02, color="black"):
brow_right := box([0.2, 0.25, 0.31], 0.2, 0.05, 0.02, color="black"):

# Hair spikes (5 spikes)
hair_spike1 := parallelepiped([-0.35, 0.2, -0.1], [0.15, 0.5, 0.2], color=yellow_hair):
hair_spike2 := parallelepiped([-0.15, 0.2, -0.1], [0.15, 0.6, 0.2], color=yellow_hair):
hair_spike3 := parallelepiped([0, 0.2, -0.1], [0.15, 0.55, 0.2], color=yellow_hair):
hair_spike4 := parallelepiped([0.15, 0.2, -0.1], [0.15, 0.6, 0.2], color=yellow_hair):
hair_spike5 := parallelepiped([0.25, 0.2, -0.1], [0.15, 0.5, 0.2], color=yellow_hair):

# Green circlet (half torus)
circlet := torus([0, 0.35, 0.1], 0.35, 0.05, color=green_belt):

# Heart on forehead (approximation with polygon)
heart_points := [[0, 0.45, 0.25], [0.08, 0.5, 0.25], [0.12, 0.42, 0.25], [0.06, 0.38, 0.25],
                 [0, 0.35, 0.25], [-0.06, 0.38, 0.25], [-0.12, 0.42, 0.25], [-0.08, 0.5, 0.25], [0, 0.45, 0.25]]:
forehead_heart := polygonplot3d([heart_points], color=green_heart):

# Combine head components
head_group := display([
    head, eye_left, eye_right, brow_left, brow_right,
    hair_spike1, hair_spike2, hair_spike3, hair_spike4, hair_spike5,
    circlet, forehead_heart
], scaling=constrained, axes=none):

# ============================================
# BODY COMPONENTS
# ============================================

# Torso (jacket)
torso := box([0, -1, 0], 1, 1.2, 0.6, color=orange_jacket):

# Shoulders (padded)
shoulder_left := box([-0.6, -0.6, 0], 0.4, 0.3, 0.5, color=orange_jacket):
shoulder_right := box([0.6, -0.6, 0], 0.4, 0.3, 0.5, color=orange_jacket):

# Inner shirt
inner_shirt := box([0, -1, 0.1], 0.6, 0.8, 0.2, color=black_inner):

# Belt
belt := box([0, -1.6, 0], 0.9, 0.15, 0.5, color=green_belt):

# Belt heart buckle
buckle_heart := polygonplot3d([
    [0, -1.6, 0.35], [0.1, -1.55, 0.35], [0.15, -1.65, 0.35], [0.08, -1.7, 0.35],
    [0, -1.72, 0.35], [-0.08, -1.7, 0.35], [-0.15, -1.65, 0.35], [-0.1, -1.55, 0.35], [0, -1.6, 0.35]
], color=green_heart):

# Combine body components
body_group := display([torso, shoulder_left, shoulder_right, inner_shirt, belt, buckle_heart],
                      scaling=constrained, axes=none):

# ============================================
# ARMS
# ============================================

# Left arm (jacket)
arm_left_upper := box([-0.7, -1, 0], 0.3, 1, 0.3, color=orange_jacket):
arm_left_hand := box([-0.7, -1.6, 0], 0.25, 0.4, 0.25, color=skin_color):

# Right arm (jacket)
arm_right_upper := box([0.7, -1, 0], 0.3, 1, 0.3, color=orange_jacket):
arm_right_hand := box([0.7, -1.6, 0], 0.25, 0.4, 0.25, color=skin_color):

arms_group := display([arm_left_upper, arm_left_hand, arm_right_upper, arm_right_hand],
                     scaling=constrained, axes=none):

# ============================================
# LEGS
# ============================================

# Left leg (pants)
leg_left_upper := box([-0.25, -2.2, 0], 0.35, 1.2, 0.4, color=orange_jacket):
leg_left_shoe := box([-0.25, -3.2, 0], 0.3, 0.6, 0.5, color=brown_shoes):

# Right leg (pants)
leg_right_upper := box([0.25, -2.2, 0], 0.35, 1.2, 0.4, color=orange_jacket):
leg_right_shoe := box([0.25, -3.2, 0], 0.3, 0.6, 0.5, color=brown_shoes):

# Knee hearts
knee_heart_left := polygonplot3d([
    [-0.25, -2.3, 0.25], [-0.2, -2.27, 0.25], [-0.17, -2.33, 0.25], [-0.22, -2.36, 0.25],
    [-0.25, -2.38, 0.25], [-0.28, -2.36, 0.25], [-0.33, -2.33, 0.25], [-0.3, -2.27, 0.25], [-0.25, -2.3, 0.25]
], color=green_heart):

knee_heart_right := polygonplot3d([
    [0.25, -2.3, 0.25], [0.3, -2.27, 0.25], [0.33, -2.33, 0.25], [0.28, -2.36, 0.25],
    [0.25, -2.38, 0.25], [0.22, -2.36, 0.25], [0.17, -2.33, 0.25], [0.2, -2.27, 0.25], [0.25, -2.3, 0.25]
], color=green_heart):

legs_group := display([leg_left_upper, leg_left_shoe, leg_right_upper, leg_right_shoe,
                      knee_heart_left, knee_heart_right], scaling=constrained, axes=none):

# ============================================
# COMPLETE DIO CHARACTER
# ============================================

dio_complete := display([
    head_group,
    body_group,
    arms_group,
    legs_group
], view=[-3..3, -4.5..2, -2..2], scaling=constrained, axes=none,
   title="DIO BRANDO", titlefont=[Helvetica, bold, 24]):

# ============================================
# THE WORLD (STAND)
# ============================================

# Stand body
stand_body := box([2, 0, -0.5], 1.2, 2, 0.6, color=stand_yellow):

# Stand head
stand_head := box([2, 1.3, -0.5], 0.8, 0.6, 0.5, color=stand_yellow):

# Stand eyes
stand_eye_left := box([1.93, 1.3, -0.23], 0.12, 0.06, 0.02, color=stand_red):
stand_eye_right := box([2.07, 1.3, -0.23], 0.12, 0.06, 0.02, color=stand_red):

# Stand arm
stand_arm := box([2.8, 0.2, -0.5], 0.4, 1.2, 0.35, color=stand_yellow):

# Stand wrist heart
stand_wrist_heart := polygonplot3d([
    [2.6, 0.5, -0.35], [2.68, 0.53, -0.35], [2.72, 0.47, -0.35], [2.66, 0.44, -0.35],
    [2.6, 0.42, -0.35], [2.54, 0.44, -0.35], [2.48, 0.47, -0.35], [2.52, 0.53, -0.35], [2.6, 0.5, -0.35]
], color=green_heart):

the_world := display([stand_body, stand_head, stand_eye_left, stand_eye_right, stand_arm, stand_wrist_heart],
                    scaling=constrained, axes=none):

# ============================================
# PEDESTAL
# ============================================

pedestal := cylinder([0, -3.8, 0], 2, 0.3, color=gray_pedestal):

# ============================================
# FINAL SCENE
# ============================================

final_scene := display([
    dio_complete,
    the_world,
    pedestal
], view=[-5..5, -5..3, -3..3], orientation=[45, 45], scaling=constrained, axes=none,
   light=[100, 100, 100, 255, 215, 0], style=patchnogrid):

# ============================================
# DISPLAY
# ============================================

print("DIO BRANDO 3D Model");
print("JoJo's Bizarre Adventure - Roblox Style");
print("");
print("Displaying complete scene with Dio and The World stand...");
final_scene: