Skip to content

Echo-aloha/asphalt-codex-skills-5 / skills/pfc-vedo-postprocess

pfc-vedo-postprocess

Verified

Post-process exported PFC 5.0 asphalt DEM data with vedo for particle, force-chain, crack, displacement, velocity, slice, figure, and animation workflows.

FileKindSize
LICENSEother1.1 KB
NOTICE.mdmarkdown632 B
SKILL.mdskill md5.8 KB
agents/openai.yamlconfig312 B
icon.svgother630 B
references/animation.mdmarkdown1.1 KB
references/colormaps.mdmarkdown557 B
references/export-schema.mdmarkdown1.4 KB
references/vedo-recipes.mdmarkdown1.2 KB
scripts/view_balls.pyscript1.8 KB
templates/render_config.yamlconfig396 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()
```
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: 198kUpdated Claude CodeCodexVerifiedInstall
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: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
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: 194kUpdated Claude CodeCodexVerifiedInstall