left_ear = Polygon([[-4, 8], [-6, 12], [-2, 10]], closed=True, color='white', edgecolor='black', linewidth=2)
right_ear = Polygon([[4, 8], [6, 12], [2, 10]], closed=True, color='white', edgecolor='black', linewidth=2)
ax.add_patch(left_ear)
ax.add_patch(right_ear)
left_inner_ear = Polygon([[-4.5, 8.5], [-5.5, 11], [-3.5, 9.5]], closed=True, color='red', edgecolor='black', linewidth=1)
right_inner_ear = Polygon([[4.5, 8.5], [5.5, 11], [3.5, 9.5]], closed=True, color='red', edgecolor='black', linewidth=1)
ax.add_patch(left_inner_ear)
ax.add_patch(right_inner_ear)
left_eye = Arc((-2, 6), width=2, height=1, theta1=0, theta2=180, color='black', linewidth=2)
right_eye = Arc((2, 6), width=2, height=1, theta1=0, theta2=180, color='black', linewidth=2)
ax.add_patch(left_eye)
ax.add_patch(right_eye)
nose = Circle((0, 5), radius=0.2, color='black')
ax.add_patch(nose)
mouth_left = Arc((-0.5, 4.6), width=1, height=0.5, theta1=0, theta2=-180, color='black')
mouth_right = Arc((0.5, 4.6), width=1, height=0.5, theta1=0, theta2=-180, color='black')
ax.add_patch(mouth_left)
ax.add_patch(mouth_right)
import matplotlib.pyplot as plt
from matplotlib.patches import Circle, Ellipse, Polygon, FancyBboxPatch, Arc
def draw_optimized_lucky_cat():
fig, ax = plt.subplots(figsize=(6, 8))
ax.set_xlim(-10, 10)
ax.set_ylim(-12, 12)
ax.axis('off')
body = Ellipse((0, -2), width=12, height=14, color='white', edgecolor='black', linewidth=2)
ax.add_patch(body)
head = Circle((0, 5), radius=5, color='white', edgecolor='black', linewidth=2)
ax.add_patch(head)
left_ear = Polygon([[-4, 8], [-6, 12], [-2, 10]], closed=True, color='white', edgecolor='black', linewidth=2)
right_ear = Polygon([[4, 8], [6, 12], [2, 10]], closed=True, color='white', edgecolor='black', linewidth=2)
ax.add_patch(left_ear)
ax.add_patch(right_ear)
left_inner_ear = Polygon([[-4.5, 8.5], [-5.5, 11], [-3.5, 9.5]], closed=True, color='red', edgecolor='black', linewidth=1)
right_inner_ear = Polygon([[4.5, 8.5], [5.5, 11], [3.5, 9.5]], closed=True, color='red', edgecolor='black', linewidth=1)
ax.add_patch(left_inner_ear)
ax.add_patch(right_inner_ear)
left_eye = Arc((-2, 6), width=2, height=1, theta1=0, theta2=180, color='black', linewidth=2)
right_eye = Arc((2, 6), width=2, height=1, theta1=0, theta2=180, color='black', linewidth=2)
ax.add_patch(left_eye)
ax.add_patch(right_eye)
nose = Circle((0, 5), radius=0.2, color='black')
ax.add_patch(nose)
mouth_left = Arc((-0.5, 4.6), width=1, height=0.5, theta1=0, theta2=-180, color='black')
mouth_right = Arc((0.5, 4.6), width=1, height=0.5, theta1=0, theta2=-180, color='black')
ax.add_patch(mouth_left)
ax.add_patch(mouth_right)
ax.plot([-3, -6], [5.5, 5.8], color='black', linewidth=1)
ax.plot([-3, -6], [5, 5], color='black', linewidth=1)
ax.plot([-3, -6], [4.5, 4.2], color='black', linewidth=1)
ax.plot([3, 6], [5.5, 5.8], color='black', linewidth=1)
ax.plot([3, 6], [5, 5], color='black', linewidth=1)
ax.plot([3, 6], [4.5, 4.2], color='black', linewidth=1)
collar = Ellipse((0, 3.5), width=8, height=1.5, color='red', edgecolor='black', linewidth=2)
ax.add_patch(collar)
bell = Circle((0, 2.5), radius=0.8, color='gold', edgecolor='black', linewidth=2)
bell_inner = Circle((0, 2.5), radius=0.3, color='black')
ax.add_patch(bell)
ax.add_patch(bell_inner)
left_hand = Ellipse((-4.5, -2), width=3, height=5, angle=30, color='white', edgecolor='black', linewidth=2)
ax.add_patch(left_hand)
coin = Ellipse((-7, -1.5), width=3, height=2, color='gold', edgecolor='black', linewidth=2)
ax.add_patch(coin)
right_hand = Ellipse((4.5, -2), width=3, height=5, angle=-30, color='white', edgecolor='black', linewidth=2)
ax.add_patch(right_hand)
scroll = FancyBboxPatch((6, -2), width=1.5, height=5, boxstyle="round,pad=0.1", color='red', edgecolor='black', linewidth=2)
ax.add_patch(scroll)
ax.text(6.75, 0.5, "招财\n进宝", color='black', fontsize=10, ha='center', va='center', rotation=90)
left_foot = Ellipse((-3, -8.5), width=3, height=2, color='white', edgecolor='black', linewidth=2)
right_foot = Ellipse((3, -8.5), width=3, height=2, color='white', edgecolor='black', linewidth=2)
ax.add_patch(left_foot)
ax.add_patch(right_foot)
ax.text(0, -3, "福", color='red', fontsize=30, ha='center', va='center')
plt.show()
draw_optimized_lucky_cat()