// SPDX-License-Identifier: MIT // Copyright (c) 2026 Incoprea // Space railing posts on an arc // Not compiled or tested in-world // Setup: Put in a spare owned prim. Set radius, positive sweep up to360 degrees and maximum spacing. Touch to print the plan privately. // Stop / restore: Remove/disable; calculations do not alter objects. // Notes: Both endpoints receive posts. A full circle duplicates the start/end location; omit one endpoint in a closed build. // License: see LICENSE in this distribution. // Original Incoprea. MIT. Calculation only. float RADIUS=4.0; float SWEEP=120.0; float MAX_SPACING=1.2; default { touch_start(integer detectedCount) { if(llDetectedKey(0)!=llGetOwner())return; if(RADIUS<=0.0||SWEEP<=0.0||SWEEP>360.0||MAX_SPACING<=0.0) { llOwnerSay("Invalid arc."); return; } float arc=RADIUS*SWEEP*DEG_TO_RAD; integer intervals=llCeil(arc/MAX_SPACING); llOwnerSay("Posts="+(string)(intervals+1)+" angle step="+(string)(SWEEP/(float)intervals)+" arc spacing="+(string)(arc/(float)intervals)); } }