شعار Forge Procedural Geometry

Forge Procedural Geometry

المجتمع
Nebulavenus
forge-procedural-geometry

Generate procedural 3D geometry using forge_shapes.h — parametric surfaces (sphere, icosphere, cylinder, cone, torus, plane, cube, capsule) with struct-of-arrays layout for GPU upload

نظرة عامة

الناشرNebulavenus
المستودعforge-gpu
اسم المهارةforge-procedural-geometry
النجوم
46
التفريعات
7
الملفات المرفقة
تعليمات فقط
الترخيصZlib
الروابط
  • تعليمات بصيغة Markdown

    ملف SKILL.md يُحمّله النموذج عند الحاجة، فلا يستهلك توكنات إلا عندما يَرِد طلب ذو صلة فعلًا.

  • تعمل مع أي نموذج لغوي كبير

    مهارات الذكاء الاصطناعي مكتوبة بصيغة Markdown وليست شيفرة خاصة بمزوّد معيّن، لذا تعمل مع GPT أو Claude أو Gemini أو Grok أو نموذج محلي.

  • مكتفية بذاتها

    كل ما يحتاجه النموذج موجود في التعليمات — لا ملفات إضافية لمزامنتها.

  • مفتوحة المصدر

    نشرها Nebulavenus على GitHub. اطّلع على المصدر قبل تثبيتها.

التثبيت

ثبّت مهارة الذكاء الاصطناعي Forge Procedural Geometry في TypingMind لاستخدامها مع أي نموذج لغوي كبير، أو أضفها إلى وكيل ذكاء اصطناعي آخر يقرأ SKILL.md.

1

التثبيت في TypingMind

يُثبّت TypingMind المهارة مباشرةً من مجلدها على GitHub — فيقرأ SKILL.md، ويجمع ملفات الموارد في حزمة، ويحفظ النتيجة محليًا.

  1. افتح التطبيق وانتقل إلى «الإضافات» ثم «المهارات».
  2. اختر «تثبيت من GitHub».
  3. الصق رابط مجلد المهارة الموضّح أدناه وأكّد التثبيت.
    https://github.com/Nebulavenus/forge-gpu/tree/main/.claude/skills/forge-procedural-geometry
  4. فعّل المهارة في كل محادثة تريد إتاحتها فيها.
الإضافات ← المهارات ← إضافة مهارة ← من رابط GitHub، ثم الصق رابط المجلد واضغط على «متابعة».
2

التثبيت في وكيل ذكاء اصطناعي آخر

يمكن لأي وكيل ذكاء اصطناعي يقرأ تنسيق Agent Skills استخدام هذه المهارة — انسخ المجلد إلى مجلد المهارات الخاص بذلك الوكيل.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/Nebulavenus/forge-gpu.git /tmp/forge-gpu
mkdir -p .claude/skills
cp -r /tmp/forge-gpu/.claude/skills/forge-procedural-geometry .claude/skills/forge-procedural-geometry
أعد تشغيل Claude Code بعد النسخ ليتعرّف على المهارة الجديدة.

استخدمها في TypingMind

فعّل Forge Procedural Geometry في أي محادثة على TypingMind وسيتولى النموذج الباقي. تتضمن مطالبة النظام اسمها ووصفها، وبمجرد ورود طلب ذي صلة، يُحمّل النموذج التعليمات الكاملة تلقائيًا — فلا تحتاج إلى استدعائها يدويًا، ولا تستهلك أي توكنات حتى تُستخدم فعليًا.

يُحمّل النموذج مهارة Forge Procedural Geometry تلقائيًا بمجرد ورود طلب ذي صلة بها.

تعمل مع أي نموذج ذكاء اصطناعي

مهارات الذكاء الاصطناعي هي تعليمات بصيغة Markdown وليست شيفرة خاصة بمزوّد معيّن، لذا لا ترتبط Forge Procedural Geometry بالنموذج الذي كُتبت له. ثبّتها مرة واحدة في TypingMind واستخدمها مع GPT-5 أو Claude أو Gemini أو Grok أو DeepSeek أو Mistral أو Llama أو نموذج محلي تشغّله بنفسك — كل ذلك باستخدام مفاتيح API الخاصة بك.

  • تُحمَّل عند الحاجة فقط

    تتضمن مطالبة النظام الاسم والوصف فقط. وتُجلب التعليمات عند أول طلب ذي صلة، لذا لا تستهلك تعليمات المهارة أي توكنات ما دامت المهارة غير مستخدمة.

  • بدّل النماذج أثناء المحادثة

    لأن المهارة تعليمات وليست شيفرة، فإن تغيير النموذج لا يعطّلها — فالنموذج التالي يقرأ ملف SKILL.md نفسه.

تعليمات المهارة

هذا هو محتوى SKILL.md الذي يُحمّله النموذج. اقرأه قبل التثبيت — فالمهارة عبارة عن تعليمات سيتبعها نموذجك.

Generate and render procedural geometry using the forge_shapes.h header-only library. Shapes are unit-scale, centred at origin, Y-up, CCW winding.

Include pattern

One .c file defines the implementation; all others get declarations only:

c
/* In exactly ONE .c file: */
#define FORGE_SHAPES_IMPLEMENTATION
#include "shapes/forge_shapes.h"

/* In all other files: */
#include "shapes/forge_shapes.h"

Generate and upload a shape

c
/* Generate a 32-slice, 16-stack UV sphere */
ForgeShape sphere = forge_shapes_sphere(32, 16);

/* Create GPU buffers for struct-of-arrays layout */
SDL_GPUBuffer *pos_buf = upload_gpu_buffer(device,
    sphere.positions, sphere.vertex_count * sizeof(vec3));
SDL_GPUBuffer *nor_buf = upload_gpu_buffer(device,
    sphere.normals,   sphere.vertex_count * sizeof(vec3));
SDL_GPUBuffer *idx_buf = upload_gpu_buffer_index(device,
    sphere.indices,   sphere.index_count * sizeof(uint32_t));

/* Free CPU-side data after upload */
int index_count = sphere.index_count;
forge_shapes_free(&sphere);

Bind and draw (struct-of-arrays)

c
/* Bind position buffer at vertex slot 0 */
SDL_GPUBufferBinding pos_bind = { .buffer = pos_buf, .offset = 0 };
SDL_BindGPUVertexBuffers(rpass, 0, &pos_bind, 1);

/* Bind normal buffer at vertex slot 1 */
SDL_GPUBufferBinding nor_bind = { .buffer = nor_buf, .offset = 0 };
SDL_BindGPUVertexBuffers(rpass, 1, &nor_bind, 1);

/* Bind index buffer */
SDL_GPUBufferBinding idx_bind = { .buffer = idx_buf, .offset = 0 };
SDL_BindGPUIndexBuffer(rpass, &idx_bind, SDL_GPU_INDEXELEMENTSIZE_32BIT);

/* Draw */
SDL_DrawGPUIndexedPrimitives(rpass, index_count, 1, 0, 0, 0);

Pipeline vertex attributes

Configure two vertex buffer slots matching the struct-of-arrays layout:

c
SDL_GPUVertexBufferDescription vbufs[] = {
    { .slot = 0, .pitch = sizeof(vec3), .input_rate = SDL_GPU_VERTEXINPUTRATE_VERTEX },
    { .slot = 1, .pitch = sizeof(vec3), .input_rate = SDL_GPU_VERTEXINPUTRATE_VERTEX },
};
SDL_GPUVertexAttribute attrs[] = {
    { .location = 0, .buffer_slot = 0, .format = SDL_GPU_VERTEXELEMENTFORMAT_FLOAT3, .offset = 0 },
    { .location = 1, .buffer_slot = 1, .format = SDL_GPU_VERTEXELEMENTFORMAT_FLOAT3, .offset = 0 },
};

Multiple shapes in one scene

c
/* Generate all shapes */
ForgeShape shapes[] = {
    forge_shapes_sphere(32, 16),
    forge_shapes_torus(24, 12, 1.0f, 0.4f),
    forge_shapes_plane(4, 4),
};
int shape_count = sizeof(shapes) / sizeof(shapes[0]);

/* Upload each to GPU, store buffers and counts */
for (int i = 0; i < shape_count; i++) {
    upload_shape_to_gpu(device, &shapes[i], &gpu_shapes[i]);
    forge_shapes_free(&shapes[i]);
}

/* In render loop: draw each with its own model matrix */
for (int i = 0; i < shape_count; i++) {
    set_push_uniforms(rpass, model_matrices[i]);
    bind_and_draw(rpass, &gpu_shapes[i]);
}

Available generators

FunctionDescriptionDefault params
forge_shapes_sphere(slices, stacks)UV sphere, radius 132, 16
forge_shapes_icosphere(subdivisions)Even triangle distribution2
forge_shapes_cylinder(slices, stacks)No caps, height 232, 1
forge_shapes_cone(slices, stacks)Apex at Y=+1, no base32, 1
forge_shapes_torus(slices, stacks, major, tube)Donut in XZ plane32, 16, 1.0, 0.4
forge_shapes_plane(slices, stacks)XZ plane, Y=04, 4
forge_shapes_cube(slices, stacks)6 faces, per-face normals1, 1
forge_shapes_capsule(slices, stacks, cap_stacks, half_h)Cylinder + hemisphere caps32, 4, 4, 1.0

Common mistakes

  1. Forgetting to free — always call forge_shapes_free() after GPU upload
  2. Wrong vertex slot — positions go to slot 0, normals to slot 1; swapping them produces garbled lighting
  3. Using interleaved vertex layout — ForgeShape uses struct-of-arrays; bind separate buffers per attribute, not one interleaved buffer
  4. Missing seam at U=0/U=1 — the sphere has (slices+1) columns to handle the texture seam; this is intentional, not a bug

References

الأسئلة الشائعة

ماذا تفعل مهارة الذكاء الاصطناعي Forge Procedural Geometry؟

Generate procedural 3D geometry using forge_shapes.h — parametric surfaces (sphere, icosphere, cylinder, cone, torus, plane, cube, capsule) with struct-of-arrays layout for GPU upload

لماذا تستخدم Forge Procedural Geometry على TypingMind؟

لأنك تثبّتها مرة واحدة وتستخدمها مع أي نموذج. مهارة Forge Procedural Geometry عبارة عن نص Markdown وليست شيفرة خاصة بمزود بعينه، لذا تعمل المهارة نفسها مع GPT-5 أو Claude أو Gemini أو Grok أو نموذج محلي، ويمكنك تبديل النموذج أثناء المحادثة دون تعطّل المهارة. يعمل TypingMind بمفاتيح API الخاصة بك، فتدفع للمزودين مباشرةً بدلًا من اشتراك لكل مقعد، وتبقى مهاراتك ومحادثاتك في مساحة التخزين الخاصة بك.

كيف أثبّت Forge Procedural Geometry في TypingMind؟

في TypingMind، افتح «الإضافات»، ثم «المهارات»، ثم اختر «التثبيت من GitHub» والصق https://github.com/Nebulavenus/forge-gpu/tree/main/.claude/skills/forge-procedural-geometry. يقرأ TypingMind ملف SKILL.md الخاص بالمهارة ويثبّتها كمهارة يمكنك تفعيلها لكل محادثة على حدة.

ما نماذج الذكاء الاصطناعي التي يمكنها استخدام Forge Procedural Geometry؟

أي نموذج تربطه في TypingMind. مهارات الذكاء الاصطناعي عبارة عن تعليمات Markdown وليست شيفرة خاصة بمزود بعينه، لذا يمكن لكل من GPT وClaude وGemini وGrok والنماذج المحلية تحميل هذه المهارة عندما يتوافق الطلب معها.

كم نموذج ذكاء اصطناعي يمكنني استخدامه مع Forge Procedural Geometry؟

أي عدد تريده. ما دام النموذج يدعم المهارات، يمكنك استخدام Forge Procedural Geometry معه، سواء كان GPT أو Claude أو Gemini أو Grok أو DeepSeek أو Mistral أو Llama أو غيرها، وكل ذلك على TypingMind باستخدام مفاتيح API الخاصة بك.

هل مهارة الذكاء الاصطناعي Forge Procedural Geometry مجانية؟

نعم. نشرها Nebulavenus على GitHub بموجب ترخيص Zlib. لا تدفع إلا لمزود الذكاء الاصطناعي الخاص بك مقابل التوكنات التي تستخدمها.

ما هي مهارات الذكاء الاصطناعي؟

مهارة الذكاء الاصطناعي حزمة تعليمات قابلة لإعادة الاستخدام تعلّم نموذج الذكاء الاصطناعي كيفية تنفيذ مهمة محددة. وتتبع تنسيق Agent Skills المفتوح: ملف SKILL.md يتضمن اسمًا ووصفًا، إلى جانب أي نصوص برمجية أو قوالب أو ملفات مرجعية قد يحتاج إليها النموذج. لا يقرأ النموذج التعليمات إلا عندما يتوافق طلبك مع المهارة، لذا لا تترتب على المهارة المثبتة أي تكلفة حتى تُستخدم.

كيف تختلف مهارات الذكاء الاصطناعي عن الإضافات أو موصلات MCP؟

تمنح الإضافة أو موصل MCP النموذج أدوات جديدة يمكنه استدعاؤها، وهي شيفرة تُنفَّذ في مكان ما وتُرجع نتيجة. أما مهارة الذكاء الاصطناعي فتزوّد النموذج بالمعرفة ومنهجية العمل: كيفية التعامل مع مهمة، والخطوات التي ينبغي اتباعها، وما ينبغي أن تكون عليه المخرجات الجيدة. المهارات عبارة عن نصوص Markdown، لذا لا تحتاج إلى خادم أو مفتاح API أو بيئة تشغيل، وتعمل مع أي نموذج.

عرض الكل

أنشئ مساحة عملك للذكاء الاصطناعي الآن

اشترك في نشرتنا الإخبارية لتصلك أخبار الميزات الجديدة والهدايا القادمة 👇