// SPDX-License-Identifier: MIT // Copyright (c) 2026 Incoprea // Fit a circular footprint in a rectangle // Not compiled or tested in-world // Setup: Use a spare owned prim. Set circle X/Y/RADIUS and rectangular width/height from origin. Touch for owner-only calculation output. // Stop / restore: Remove/disable. Does not sense, collide with, or modify actual objects. // Notes: Negative clearance identifies a boundary violation; the rectangle is axis-aligned inXY. // License: see LICENSE in this distribution. // Original Incoprea. MIT. Ideal geometry only. float X=2.0; float Y=1.5; float RADIUS=0.8; float WIDTH=6.0; float HEIGHT=4.0; default { touch_start(integer detectedCount) { if(llDetectedKey(0)!=llGetOwner())return; if(RADIUS<0.0||WIDTH<=0.0||HEIGHT<=0.0) { llOwnerSay("Invalid dimensions."); return; } float gap=X-RADIUS; float other=WIDTH-X-RADIUS; if(other