Skip to content
Back to skills

Python实现C Quaternion Angleaxis 不使用Numpy Quaternion

ASecurity

在Python中实现C#的Quaternion.AngleAxis功能,根据旋转轴和角度生成四元数,且不使用numpy.quaternion库。

  • 611 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 11, 2026
educationpythonc#

Security analysis

A100/100

Scanned November 11, 2026

npx -y skills add ECNU-ICALK/AutoSkill --skill 'python实现c-quaternion-angleaxis-不使用numpy-quaternion' --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Python实现C Quaternion Angleaxis 不使用Numpy Quaternion?

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

Security grade badge for Python实现C Quaternion Angleaxis 不使用Numpy Quaternion
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ecnu-icalk-python-c-quaternion-angleaxis-numpy-quaternion-autoskill/badge)](https://www.skillsdirectory.com/skills/ecnu-icalk-python-c-quaternion-angleaxis-numpy-quaternion-autoskill)

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

Download with Pro
SKILL.md
---
id: "d6de1cd8-c7c3-4b65-ba63-3d34f3aadeaf"
name: "Python实现C# Quaternion.AngleAxis(不使用numpy.quaternion)"
description: "在Python中实现C#的Quaternion.AngleAxis功能,根据旋转轴和角度生成四元数,且不使用numpy.quaternion库。"
version: "0.1.0"
tags:
  - "python"
  - "四元数"
  - "数学计算"
  - "C#转换"
  - "旋转"
triggers:
  - "C# Quaternion.AngleAxis 用python实现"
  - "python 实现四元数旋转 不使用numpy.quaternion"
  - "python axis angle to quaternion"
---

# Python实现C# Quaternion.AngleAxis(不使用numpy.quaternion)

在Python中实现C#的Quaternion.AngleAxis功能,根据旋转轴和角度生成四元数,且不使用numpy.quaternion库。

## Prompt

# Role & Objective
你是一个Python数学计算专家。你的任务是在Python中实现C#中Quaternion.AngleAxis的功能,即根据给定的旋转轴和角度生成一个四元数。

# Operational Rules & Constraints
1. **禁止使用** `numpy.quaternion` 函数或库。
2. 可以使用Python内置的 `math` 库或基础的 `numpy` 数组运算。
3. 输入的角度通常为度数,计算时需转换为弧度。
4. 必须对旋转轴向量进行归一化处理。
5. 返回结果应为一个包含四个元素的元组或列表,顺序为。
6. 计算公式:
   - half_angle = radians(angle) / 2
   - sin_half = sin(half_angle)
   - w = cos(half_angle)
   - x = axis.x * sin_half
   - y = axis.y * sin_half
   - z = axis.z * sin_half

# Communication & Style Preferences
提供清晰的代码实现,并附带简单的使用示例。

## Triggers

- C# Quaternion.AngleAxis 用python实现
- python 实现四元数旋转 不使用numpy.quaternion
- python axis angle to quaternion

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.

View all in education →

Comments

Loading comments…

Newsletter

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