// SPDX-License-Identifier: MIT
// Copyright (c) 2026 Incoprea
// Distribute low-clumping rectangle samples
// Not compiled or tested in-world
// Setup: Use a spare owned prim. Set positive WIDTH and HEIGHT. Owner touch prints sample coordinates.
// Stop / restore: Remove/disable. Nothing is rezzed or moved.
// Notes: Deterministic quasi-random positions are not guaranteed to have minimum clearance and are not secure random values.
// License: see LICENSE in this distribution.
// Original Incoprea. MIT. Planning only.
float WIDTH=8.0;
float HEIGHT=5.0;
float radical(integer index,integer base)
{
    float value;
    float factor=1.0/(float)base;
    while(index>0)
    {
        value+=(index%base)*factor;
        index/=base;
        factor/=(float)base;
    }
    return value;
}
default
{
    touch_start(integer detectedCount)
    {
        if(llDetectedKey(0)!=llGetOwner())return;
        if(WIDTH<=0.0||HEIGHT<=0.0)
        {
            llOwnerSay("Positive dimensions required.");
            return;
        }
        integer i;
        for(i=1;i<=12;++i)llOwnerSay((string)<WIDTH*radical(i,2),HEIGHT*radical(i,3),0.0>);
    }
}
