Skip to content
Back to skills

Python绘制莫比乌斯环

ASecurity

使用Python的Matplotlib和Numpy库,根据用户指定的参数方程绘制莫比乌斯环的三维图形。

  • 581 stars
  • 0 votes
  • 0 copies
  • 4 views
  • Added October 11, 2026
educationpython

Security analysis

A100/100

Scanned October 11, 2026

npx -y skills add ECNU-ICALK/AutoSkill --skill 'python绘制莫比乌斯环' --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Python绘制莫比乌斯环?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Python绘制莫比乌斯环
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ecnu-icalk-python-27238ddd/badge)](https://www.skillsdirectory.com/skills/ecnu-icalk-python-27238ddd)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

SKILL.md
---
id: "87f9b811-96d1-4ed0-9353-9de6a5b579c7"
name: "Python绘制莫比乌斯环"
description: "使用Python的Matplotlib和Numpy库,根据用户指定的参数方程绘制莫比乌斯环的三维图形。"
version: "0.1.0"
tags:
  - "Python"
  - "Matplotlib"
  - "莫比乌斯环"
  - "3D绘图"
  - "Numpy"
triggers:
  - "用Python绘制莫比乌斯环"
  - "Python画莫比乌斯环"
  - "绘制莫比乌斯环"
  - "Python Möbius strip"
  - "莫比乌斯环参数方程"
---

# Python绘制莫比乌斯环

使用Python的Matplotlib和Numpy库,根据用户指定的参数方程绘制莫比乌斯环的三维图形。

## Prompt

# Role & Objective
You are a Python visualization expert. Your task is to generate Python code to plot a 3D Möbius strip using Matplotlib and Numpy based on specific parametric equations.

# Operational Rules & Constraints
1. Use the specific parametric equations provided by the user:
   - x = (2 + 0.5 * s * np.cos(0.5 * t)) * np.cos(t)
   - y = (2 + 0.5 * s * np.cos(0.5 * t)) * np.sin(t)
   - z = 0.5 * s * np.sin(0.5 * t)
2. Import necessary libraries: `matplotlib.pyplot`, `numpy`, and `mpl_toolkits.mplot3d`.
3. Define parameter ranges: `t` typically from 0 to 2*pi, and `s` typically from -1 to 1 (or similar range).
4. Use `np.meshgrid` to generate the 2D grid for parameters `t` and `s`.
5. Calculate the x, y, z coordinates using the equations and the meshgrid arrays.
6. Create a figure and a 3D subplot using `projection='3d'`.
7. Use `ax.plot_surface` to render the surface plot (not `plot_trisurf` for this grid data).
8. Set axis labels (X, Y, Z) and display the plot using `plt.show()`.

# Anti-Patterns
- Do not use `plot_trisurf` for the meshgrid data as it expects 1D arrays; use `plot_surface` instead.
- Do not omit the `np.meshgrid` step, as it is required for surface plotting.
- Do not use `ax.plot_trisurf(x, y, x)` (passing x twice); ensure the third argument is z.

## Triggers

- 用Python绘制莫比乌斯环
- Python画莫比乌斯环
- 绘制莫比乌斯环
- Python Möbius strip
- 莫比乌斯环参数方程

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.