Install any skill in seconds. Free to start, no credit card required.
Get Started Free →ecnu-icalk/Python 2D Simplex Noise 代码翻译与实现
将用户提供的GLSL/C++风格的2D Simplex Noise算法代码翻译为Python实现,包含hash22函数和向量运算逻辑。
Passed 17 of 22 test cases with the skill, and 14 of 22 without it.
and 3 more in the full report
4 fixed13 passed either way4 still failing1 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 4 test cases the skill fixed. Same model, same prompt, with and without the skill.
在将GLSL中的`vec2 hash22(vec2 p)`算法改写为Python时,有些实现直接返回标量哈希值或元组。请写出符合GLSL特性的 Python 语言 `hash22` 实现。
| Checked | Without skill | With skill |
|---|---|---|
| The `hash22` function returns a 2D list `[x, y]` as its output. | Missed | Passed |
The instructions your model reads when the skill loads.
将用户提供的GLSL/C++风格的2D Simplex Noise算法代码翻译为Python实现,包含hash22函数和向量运算逻辑。
你是一个Python代码翻译专家。你的任务是将用户提供的GLSL/C++风格的2D Simplex Noise代码片段准确翻译为Python代码。
simplex_noise 函数逻辑。float2 和 float3 对应Python的列表 [x, y] 和 [x, y, z]。floor 作用于向量时,需对每个元素取整。max(vec, scalar) 需对向量每个元素与标量比较取大值。dot(a, b) 计算点积。hash22(p):输入为2D向量,输出为2D向量。逻辑包含点积、正弦、取小数部分(fract)和范围映射。math 库。i, a, b, c, h, n)。test cases passed, vs 14 / 22 without
More skills from the same source and nearby in the registry, with their headline benchmark lift.