// SPDX-License-Identifier: MIT // Copyright (c) 2026 Incoprea // Project a point around a cylinder // Not compiled or tested in-world // Setup: Place in a spare owned prim. Set POINT, CENTER, HEIGHT and angular SEAM degrees. Touch for owner-only output. // Stop / restore: Remove/disable. The script calculates only; no scene properties change. // Notes: U wraps around the cylinder; V is measured from center upward. Points on the axis have no unique U. // License: see LICENSE in this distribution. // Original Incoprea. MIT. Planning only. vector POINT=<2.0,2.0,3.0>; vector CENTER=ZERO_VECTOR; float HEIGHT=4.0; float SEAM=0.0; default { touch_start(integer detectedCount) { if(llDetectedKey(0)!=llGetOwner())return; vector p=POINT-CENTER; if(HEIGHT<=0.0||p.x*p.x+p.y*p.y<0.000001) { llOwnerSay("Positive height and point off axis required."); return; } float u=(llAtan2(p.y,p.x)-SEAM*DEG_TO_RAD)/TWO_PI; u-=llFloor(u); llOwnerSay("Cylindrical UV="+(string)); } }