// SPDX-License-Identifier: MIT // Copyright (c) 2026 Incoprea // Check whether planned vertices share a plane // Not compiled or tested in-world // Setup: Place in a spare owned prim. Set at least3 POINTS with a noncollinear first triple and nonnegative tolerance. Touch for private results. // Stop / restore: Disable/remove; no scene properties change. // Notes: A degenerate first triple is rejected rather than searching for another triple. // License: see LICENSE in this distribution. // Original Incoprea. MIT. Planning only. list POINTS=[<0.0,0.0,0.0>,<3.0,0.0,0.0>,<0.0,3.0,0.0>,<2.0,2.0,0.02>]; float TOLERANCE=0.01; default { touch_start(integer detectedCount) { if(llDetectedKey(0)!=llGetOwner())return; integer n=llGetListLength(POINTS); if(n<3||TOLERANCE<0.0) { llOwnerSay("Invalid inputs."); return; } vector origin=llList2Vector(POINTS,0); vector normal=(llList2Vector(POINTS,1)-origin)%(llList2Vector(POINTS,2)-origin); if(llVecMag(normal)<0.000001) { llOwnerSay("First triple is collinear."); return; } normal=llVecNorm(normal); float maximum; integer i; for(i=0;imaximum)maximum=d; } llOwnerSay("Maximum deviation="+(string)maximum+" within tolerance="+(string)(maximum<=TOLERANCE)); } }