feat(editor): add --gen-texture-rope twisted-cordage pattern

51st procedural texture: two interleaved sinusoidal strands
running along the Y axis. Each strand's X position oscillates
as W/4·sin(2π·y/period); the second strand is phase-shifted
by π so the two snake around each other forming the classic
helical twist of a tightened rope.

Within each strand, brightness rises from 0.55 at the edge
to 1.0 at the centerline (cos² falloff) — gives the rounded
3D appearance of cylindrical fibers without a separate
shadow pass.

Useful for hanging ropes, ship rigging, tied-bundle textures,
suspension bridges, market-stall awning ties, and any
"twisted cord" surface where a flat color would read as
ribbon rather than rope.

Default 24-pixel period with 8-pixel strands renders cleanly
at 256x256 with about 10 visible twists.
This commit is contained in:
Kelsi 2026-05-09 11:03:33 -07:00
parent 069e76057e
commit 9031bdb620
3 changed files with 95 additions and 0 deletions

View file

@ -135,6 +135,8 @@ void printUsage(const char* argv0) {
std::printf(" Planks: horizontal floor boards with per-plank tint, grain streaks, and stagger seams\n");
std::printf(" --gen-texture-corrugated <out.png> <bgHex> <hiHex> [period] [v|h] [W H]\n");
std::printf(" Corrugated: smooth cosine ridges between bg and hi (sheet-metal roofing / siding)\n");
std::printf(" --gen-texture-rope <out.png> <bgHex> <ropeHex> [period] [strandW] [W H]\n");
std::printf(" Rope: two interleaved sinusoidal strands with cylindrical highlight (twisted cordage)\n");
std::printf(" --add-texture-to-zone <zoneDir> <png-path> [renameTo]\n");
std::printf(" Copy an existing PNG into <zoneDir> (optionally renaming it on the way in)\n");
std::printf(" --gen-mesh <wom-base> <cube|plane|sphere|cylinder|torus|cone|ramp> [size]\n");