// SPDX-License-Identifier: MIT // Copyright (c) 2026 Incoprea // Plan a crossed belt route // Not compiled or tested in-world // Setup: Place in a spare owned prim. Set radii and center distance greater than their sum. Touch for private results. // Stop / restore: Disable/remove; no scene properties change. // Notes: Crossed belts reverse relative rotation; a real belt needs clearance where it crosses. This is geometry only. // License: see LICENSE in this distribution. // Original Incoprea. MIT. Planning only. float R1=1.5; float R2=1.0; float DISTANCE=6.0; default { touch_start(integer detectedCount) { if(llDetectedKey(0)!=llGetOwner())return; if(R1<=0.0||R2<=0.0||DISTANCE<=R1+R2) { llOwnerSay("Pulleys need sufficient separation."); return; } float sum=R1+R2; float angle=llAsin(sum/DISTANCE); float straight=llSqrt(DISTANCE*DISTANCE-sum*sum); llOwnerSay("Crossed length="+(string)(2.0*straight+(PI+2.0*angle)*sum)+" wrap degrees="+(string)((PI+2.0*angle)*RAD_TO_DEG)); } }