Skip to main content
skill CX Codex

physics-rendering-expert — Claude Code skill: setup and guide

physics-rendering-expert guides physics implementation for ropes, cables, and cloth using Position-Based Dynamics (PBD) and Verlet integration. Avoids spring instability and Euler gimbal lock.

MIT 201 installs ★ 274 updated 2026-10-30

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add curiositech/some_claude_skills --skill physics-rendering-expert -a claude-code
Open on GitHub

What physics-rendering-expert does

The skill instructs coding agents on real-time physics for ropes, chains, and leashes. It enforces Position-Based Dynamics (PBD) instead of force-based mass-spring systems. Force springs demand tiny timesteps to avoid explosions, whereas PBD delivers unconditional stability within 5 to 10 solver iterations.

It directs algorithm selection according to the workload. For particle movement, it pairs Verlet integration with quaternion rotations to eliminate gimbal lock entirely. Sequential chains use a Gauss-Seidel solver on the CPU, while large cloth meshes rely on Jacobi solvers suited for GPU execution.

Do not apply this skill to fluid dynamics, fracture FEM solvers, or built-in physics engines like Unity and Unreal. It concentrates on particle constraints, cable dynamics, and multi-rope tangle detection.

What it helps with

  • Implement real-time cable dynamics using PBD
  • Replace explosive spring forces with stable Verlet integration
  • Prevent gimbal lock in rotational joints using quaternions
  • Add collision and tangle detection across multiple ropes
  • Configure Jacobi constraint solvers for GPU parallelization

Example prompts for the agent

  • Implement a three-dog leash simulation using PBD and Verlet integration.
  • Convert this spring-based rope solver to a Gauss-Seidel distance constraint loop.
  • Set up quaternion rotation updates for chained rigid particles.

How to install physics-rendering-expert

1Skills CLI (Vercel)

npx skills add curiositech/some_claude_skills --skill physics-rendering-expert -a claude-code

2Manually: put the files in place

~/.claude/skills/physics-rendering-expert/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/physics-rendering-expert/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about physics-rendering-expert

How to install physics-rendering-expert in Claude Code?

Run npx skills add curiositech/some_claude_skills --skill physics-rendering-expert -a claude-code or save the instructions to ~/.claude/skills/physics-rendering-expert/SKILL.md.

What does physics-rendering-expert do?

It provides algorithmic rules and math routines for real-time rope, cable, and cloth simulation using Position-Based Dynamics. The skill also enforces quaternion math and prevents over-iterating solvers.

Can this skill handle fluid or fracture simulation?

No. The skill explicitly excludes SPH/MPM fluid dynamics, FEM fracture simulation, and standard game physics engines such as Unity or Unreal.

Source text

SKILL.md · MIT
---
name: physics-rendering-expert
description: Real-time rope/cable physics using Position-Based Dynamics (PBD), Verlet integration, and constraint solvers. Expert in quaternion math, Gauss-Seidel/Jacobi solvers, and tangling detection.
  Activate on 'rope simulation', 'PBD', 'Position-Based Dynamics', 'Verlet', 'constraint solver', 'quaternion', 'cable dynamics', 'cloth simulation', 'leash physics'. NOT for fluid dynamics (SPH/MPM), fracture
  simulation (FEM), offline cinematic physics, molecular dynamics, or general game physics engines (use Unity/Unreal built-ins).
allowed-tools: Read,Write,Edit,Bash,mcp__firecrawl__firecrawl_search,WebFetch
metadata:
  category: AI & Machine Learning
  pairs-with:
  - skill: metal-shader-expert
    reason: GPU-accelerated physics rendering
  - skill: native-app-designer
    reason: Physics in app animations
  tags:
  - physics
  - pbd
  - verlet
  - simulation
  - constraints
---

# Physics & Rendering Expert: Rope Dynamics & Constraint Solving

Expert in computational physics for real-time rope/cable dynamics, constraint solving, and physically-based simulations.

## When to Use This Skill

**Use for:**
- Real-time rope/cable/chain simulation (leashes, climbing ropes)
- Position-Based Dynamics (PBD) implementation
- Constraint solvers (Gauss-Seidel, Jacobi)
- Quaternion/dual-quaternion rotation math
- Verlet integration for particle systems
- Tangle detection (multi-rope collisions)

**Do NOT use for:**
- Fluid dynamics → specialized SPH/MPM solvers
- Fracture simulation → requires FEM or MPM
- Offline cinematic physics → different constraints
- Unity/Unreal physics → use built-in systems

## Expert vs Novice Shibboleths

| Topic | Novice | Expert |
|-------|--------|--------|
| **Constraint approach** | Uses spring forces (F=ma) | Uses PBD (directly manipulates positions) |
| **Why PBD** | "Springs work fine" | Springs require tiny timesteps; PBD is unconditionally stable |
| **Solver choice** | "Just iterate until done" | Gauss-Seidel for chains, Jacobi for GPU |
| **Iterations** | 20+ iterations | 5-10 is optimal; diminishing returns after |
| **Rotation** | Uses Euler angles | Uses quaternions (no gimbal lock) |
| **Integration** | Forward Euler | Verlet (symplectic, energy-conserving) |

## Common Anti-Patterns

### Force-Based Springs for Stiff Constraints
| What it looks like | Why it's wrong |
|--------------------|----------------|
| `force = k * (distance - rest_length)` with high k | High k requires tiny dt for stability; low k gives squishy ropes |
| **Instead**: Use PBD - directly move particles to satisfy constraints |

### Euler Angles for Rotation
| What it looks like | Why it's wrong |
|--------------------|----------------|
| `rotation = vec3(pitch, yaw, roll)` | Gimbal lock at 90° pitch; unstable composition |
| **Instead**: Use quaternions - 4 numbers, no gimbal lock, stable SLERP |

### Over-Iteration
| What it looks like | Why it's wrong |
|--------------------|----------------|
| `solver_iterations = 50` | Diminishing returns after 5-10; wastes cycles |
| **Instead**: Use 5-10 iterations; if more needed, use XPBD compliance |

### Single-Threaded Gauss-Seidel for Large Systems
| What it looks like | Why it's wrong |
|--------------------|----------------|
| Gauss-Seidel on 1000+ constraints | Gauss-Seidel is inherently sequential |
| **Instead**: Use Jacobi solver for GPU parallelization |

## Quick Reference

### Why PBD Beats Force-Based Physics

- Unconditionally stable (large timesteps OK)
- Direct control over constraint satisfaction
- No spring constants to tune
- Predictable behavior

### Solver Choice

| Solver | Parallelizable | Convergence | Use Case |
|--------|---------------|-------------|----------|
| **Gauss-Seidel** | No | Fast | Chains, ropes |
| **Jacobi** | Yes (GPU) | Slower | Large meshes, cloth |

### Rotation Representation

- 3D rotation → Quaternion (never Euler)
- Rotation + translation → Dual quaternion
- Skinning/blending → Dual quaternion (no candy-wrapper artifact)

### Performance Targets

| System | Budget | Notes |
|--------|--------|-------|
| Single rope (100 particles) | <0.5ms | 5 iterations sufficient |
| Three-dog leash (60 particles) | <0.7ms | Include tangle detection |
| Cloth (1000 particles) | <2ms | Use Jacobi on GPU |

## Evolution Timeline

| Era | Key Development |
|-----|-----------------|
| Pre-2006 | Mass-spring systems, stability issues |
| 2006-2015 | PBD introduced (Müller et al.), unconditional stability |
| 2016-2020 | XPBD adds compliance for soft constraints |
| 2021-2024 | ALEM (2024 SIGGRAPH), BDEM, neural physics |
| 2025+ | XPBD standard, hybrid CPU/GPU, learned corrections |

## Decision Trees

**Choosing constraint solver:**
- Sequential structure (rope/chain)? → Gauss-Seidel
- Large parallel system (cloth/hair)? → Jacobi (GPU)
- Need soft constraints? → XPBD with compliance

**Choosing integration:**
- Position-only needed? → Basic Verlet
- Need velocity for forces? → Velocity Verlet
- High accuracy required? → RK4 (but PBD usually sufficient)

## Integrates With

- **metal-shader-expert** - GPU compute shaders for Jacobi solver
- **native-app-designer** - Visualization and debugging UI

## Reference Files

| File | Contents |
|------|----------|
| `references/core-algorithms.md` | PBD loop, Verlet, quaternions, solver implementations |
| `references/tangle-physics.md` | Multi-rope collision, Capstan friction, TangleConstraint |

---

**Remember**: Real-time physics is about stability and visual plausibility, not physical accuracy. PBD with 5-10 iterations at 60fps looks great and runs fast.

© curiositech · MIT · curiositech/some_claude_skills

Similar skills

All skills for Game dev and 3D: Unity, Unreal, Godot, Blender →

From the same set180

The whole set →
llm-streaming-response-handler llm-streaming-response-handler builds production LLM streaming interfaces with Server-Sent Events and live token rendering. Helps add AbortController cancellation and stream error recovery. CX Codex +1 205installs skill-architect skill-architect is a Claude Code skill for designing, auditing, and debugging agent skills. It helps diagnose misactivation and organize expertise into three layers. CX Codex +1 204installs mdx-sanitizer mdx-sanitizer escapes angle brackets, TypeScript generics and Liquid templates in MDX before Docusaurus builds. Use it when pre-commit hooks or builds fail on unexpected token. CX Codex +1 202installs github-actions-pipeline-builder github-actions-pipeline-builder writes GitHub Actions workflows: matrix builds, dependency caching, deployments, automated tests, security scans, release automation. Triggers on "GitHub Actions", "CI/CD", "workflow", "deployment pipeline". CX Codex +1 202installs supabase-admin supabase-admin — a skill for Supabase database work: schema design, Row Level Security policies, migrations, and query debugging. It helps when an agent modifies the database structure or figures out why a query returns nothing. CX Codex +1 200installs playwright-e2e-tester playwright-e2e-tester is a Claude Code skill that generates Playwright test suites, sets up Page Object models, and configures CI/CD for browser automation. CX Codex +1 200installs sober-addict-protector sober-addict-protector is a Claude Code skill for daily recovery check-ins, spotting triggers, assessing risk, and planning ways to protect sobriety before a lapse. CX Codex +1 199installs product-appeal-analyzer product-appeal-analyzer is a Claude Code skill that assesses product appeal, trust, and positioning. It reviews landing pages and product messaging. CX Codex +1 199installs

More in the catalog

Project sponsors

Companies that keep this analytics open