Echo-aloha/asphalt-codex-skills-5 / skills/pfc-vedo-postprocess
pfc-vedo-postprocess
VerifiedPost-process exported PFC 5.0 asphalt DEM data with vedo for particle, force-chain, crack, displacement, velocity, slice, figure, and animation workflows.
| File | Kind | Size |
|---|---|---|
| LICENSE | other | 1.1 KB |
| NOTICE.md | markdown | 632 B |
| SKILL.md | skill md | 5.8 KB |
| agents/openai.yaml | config | 312 B |
| icon.svg | other | 630 B |
| references/animation.md | markdown | 1.1 KB |
| references/colormaps.md | markdown | 557 B |
| references/export-schema.md | markdown | 1.4 KB |
| references/vedo-recipes.md | markdown | 1.2 KB |
| scripts/view_balls.py | script | 1.8 KB |
| templates/render_config.yaml | config | 396 B |
references/animation.md
View on GitHub# Time-series Animation Recipe
Key rules:
1. Sort snapshots numerically.
2. Compute global `vmin/vmax` before the frame loop.
3. Fix the camera and use `resetcam=False` after the first frame.
4. Use `offscreen=True` for batch rendering.
```python
import glob, re
import numpy as np
from vedo import Spheres, Plotter, Video
def natural_key(path):
return [int(x) if x.isdigit() else x for x in re.split(r'(\d+)', path)]
files = sorted(glob.glob('pfc_step*.npz'), key=natural_key)
vmax = max(np.linalg.norm(np.load(f, allow_pickle=False)['disp'], axis=1).max() for f in files)
camera = {'pos': (0.3, -0.3, 0.3), 'focal_point': (0, 0, 0), 'viewup': (0, 0, 1)}
plt = Plotter(axes=1, bg='white', offscreen=True, size=(2400, 1800))
vid = Video('pfc_loading.mp4', fps=20, backend='ffmpeg')
for f in files:
d = np.load(f, allow_pickle=False)
pos, rad, disp = d['pos'], d['rad'], d['disp']
dmag = np.linalg.norm(disp, axis=1)
balls = Spheres(pos, r=rad, res=10)
balls.cmap('viridis', dmag, on='points', vmin=0, vmax=vmax)
plt.clear()
plt.show(balls, viewup='z', resetcam=False, camera=camera)
vid.add_frame()
vid.close()
plt.close()
```
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |