def draw_box(ax, xy, w, h, label, color):
x, y = xy
rect = Rectangle((x, y), w, h, facecolor=color, edgecolor="white", alpha=0.18, linewidth=1.2)
ax.add_patch(rect)
ax.text(x + w / 2, y + h / 2, label, ha="center", va="center", fontsize=11)
def draw_arrow(ax, start, end):
arr = FancyArrowPatch(start, end, arrowstyle="-|>", mutation_scale=14, linewidth=1.2, color="white", alpha=0.85)
ax.add_patch(arr)
fig, ax = plt.subplots(figsize=(12, 5.2))
ax.set_xlim(0, 10)
ax.set_ylim(0, 6)
ax.axis("off")
# Boxes
boxes = {
"Mission definition": ((0.5, 4.2), 2.6, 1.2, ACCENT),
"Trajectory model": ((3.6, 4.2), 2.6, 1.2, MUTED),
"Propulsion / mass": ((3.6, 2.7), 2.6, 1.2, WARN),
"Human factors": ((3.6, 1.2), 2.6, 1.2, GOOD),
"Policy / compliance": ((0.5, 1.2), 2.6, 1.2, DANGER),
"Outputs (plots + tables)": ((6.9, 2.7), 2.6, 1.8, ACCENT),
}
for label, (xy, w, h, c) in boxes.items():
draw_box(ax, xy, w, h, label, c)
# Arrows
# Mission definition to models
draw_arrow(ax, (3.1, 4.8), (3.6, 4.8))
draw_arrow(ax, (3.1, 4.6), (3.6, 3.3))
draw_arrow(ax, (3.1, 4.4), (3.6, 1.8))
# Policy to outputs (constraints)
draw_arrow(ax, (3.1, 1.8), (6.9, 3.2))
# Models to outputs
draw_arrow(ax, (6.2, 4.8), (6.9, 4.0))
draw_arrow(ax, (6.2, 3.3), (6.9, 3.6))
draw_arrow(ax, (6.2, 1.8), (6.9, 3.2))
ax.set_title("Capstone architecture (template)")
plt.tight_layout()
plt.show()