// SPDX-License-Identifier: MIT // Copyright (c) 2026 Incoprea // Three-point curve sampler // Not compiled or tested in-world // Setup: Put in a spare prim you own. Edit start A, control B, and end C. Touch to print normalized parameters and positions. // Stop / restore: Disable or remove the script. It only reports to its owner and does not change prim properties. Reset clears its temporary state. // Notes: The curve usually does not pass through B. Equal parameter steps are not equal spatial distances. // License: see LICENSE in this distribution. // Original Incoprea example. MIT. Owner-only calculation; no scene changes. vector A = <0.0,0.0,0.0>; vector B = <4.0,0.0,6.0>; vector C = <8.0,0.0,0.0>; vector curve(float t) { float u = 1.0 - t; return u*u*A + 2.0*u*t*B + t*t*C; } default { touch_start(integer detectedCount) { if (llDetectedKey(0) != llGetOwner()) return; integer i; for (i = 0; i <= 5; ++i) { float t = (float)i / 5.0; llOwnerSay((string)t + ": " + (string)curve(t)); } } changed(integer change) { if (change & CHANGED_OWNER) llResetScript(); } }