// SPDX-License-Identifier: MIT // Copyright (c) 2026 Incoprea // Intersection line of two planes // Not compiled or tested in-world // Setup: Use a spare owned prim. Set normal N1/N2 and scalar offsets D1/D2 for equations n dot x = d. Touch for owner-only results. // Stop / restore: Disable/remove. No scene properties change. // Notes: Normals need not be unit length. Nearly parallel planes are rejected; output is an infinite line. // License: see LICENSE in this distribution. // Original Incoprea. MIT. vector N1=<0.0,0.0,1.0>; float D1=2.0; vector N2=<1.0,1.0,0.0>; float D2=4.0; default { touch_start(integer detectedCount) { if(llDetectedKey(0)!=llGetOwner())return; vector direction=N1%N2; float denominator=direction*direction; if(denominator<0.000001) { llOwnerSay("Parallel planes or zero normals."); return; } vector point=((D1*N2-D2*N1)%direction)/denominator; llOwnerSay("Point="+(string)point+"; direction="+(string)llVecNorm(direction)); } }