// SPDX-License-Identifier: MIT // Copyright (c) 2026 Incoprea // Calculate a non-oscillating return // Not compiled or tested in-world // Setup: Put in a spare owned prim. Set positive OMEGA, initial OFFSET/VELOCITY and nonnegative TIME. Owner touch prints calculations only. // Stop / restore: Disable/remove. No prim motion or appearance is changed. // Notes: Analytical unit-mass model. Large parameter products may underflow harmlessly toward zero. // License: see LICENSE in this distribution. // Original Incoprea. MIT. Motion planning only. float OMEGA=3.0; float OFFSET=1.0; float VELOCITY=0.0; float TIME=0.8; default { touch_start(integer detectedCount) { if(llDetectedKey(0)!=llGetOwner())return; if(OMEGA<=0.0||TIME<0.0) { llOwnerSay("Invalid frequency/time."); return; } float b=VELOCITY+OMEGA*OFFSET; float decay=llPow(2.718281828,-OMEGA*TIME); float x=(OFFSET+b*TIME)*decay; float v=(b-OMEGA*(OFFSET+b*TIME))*decay; llOwnerSay("Offset="+(string)x+" velocity="+(string)v); } }