// SPDX-License-Identifier: MIT // Copyright (c) 2026 Incoprea // Preview a suspended-cable curve // Not compiled or tested in-world // Setup: Put in a spare owned prim. Set positive SPAN and shape parameter A; supports are atZ0. Touch to print the plan privately. // Stop / restore: Remove/disable; calculations do not alter objects. // Notes: A controls tension-like shape but this is not a structural simulation. Large span/A ratios can overflow and are rejected. // License: see LICENSE in this distribution. // Original Incoprea. MIT. Calculation only. float SPAN=8.0; float A=5.0; float cosh(float x) { return 0.5*(llPow(2.718281828,x)+llPow(2.718281828,-x)); } default { touch_start(integer detectedCount) { if(llDetectedKey(0)!=llGetOwner())return; if(SPAN<=0.0||A<=0.0||SPAN/A>20.0) { llOwnerSay("Invalid span/shape ratio."); return; } float edge=cosh(SPAN/(2.0*A)); integer i; for(i=0;i<=6;++i) { float x=-SPAN*0.5+SPAN*(float)i/6.0; float z=A*(cosh(x/A)-edge); llOwnerSay((string)); } } }