Talk:Linkability Rules

From Second Life Wiki
Jump to: navigation, search

Although the initial failure mode of unlinkable sets is correct in principle. It doesn't take the fact into account the checking algorithm is 'global coordinate/position based', while linked sets can be rotated over general angles. A new linkability check over a valid linkable set, which is rotated (causing a different order in the prim selection of the linkability check) can cause this set to become invalid.

Linkability checks over already linked sets should be performed using the coordinate system as established by the rotation of the linked set, instead of a global coordinate system, to prevent a rotation of a valid linked set breaking the linked set. Damanios Thetan

I changed the SMALLEST_MAX to be LINK_BONUS, and bumped it from 1.0 to 2.0, as per changes in the code. User:Andrew_Linden

New algorithm overview graphic?

Kelly Linden and I added some attempts at better ways to explain the algorithm in a more-intuitive way. I think there probably needs to be something graphical, though. Assuming I transformed the equations correctly in the 'visualization' section, I'm thinking something like

  • Two identical complicated-looking prims with bounding boxes with nice numbers, like 1.5x2x6 (diameter: 6.5)
  • Show the bounding boxes as shown by the 'stretch' tool
  • Replace the complicated-looking prims by boxes
  • Add a translucent bounding sphere around each prim
  • Add translucent spheres which are triple each bounding sphere
  • Add translucent spheres which are one more meter around
  • Show that the spheres interact, and can be linked

...any good? Celierra Darling 08:24, 3 April 2008 (PDT)

I actually made a graphic before I read this and stuck it in there (the brightly colored prim shapes), but it doesn't cover the details of the math, just the order in which single prims are checked, then the failures are sub-checked, etc. I was trying to explain that part to someone, and the graphic just came about as a result. Perhaps a short animation would better explain the more detailed picture? Tiger Crossing 17:21, 4 April 2008 (PDT)

New Linkability Rule - 2010

If I understand the new link rules properly, then the following should be correct. The only question I'm left with is how the center of a prim is calculated. -- Strife (talk|contribs) 21:02, 2 December 2010 (UTC) <csharp>bool linkable(prim[] prims) {

 if(prims == null || prims.length > 256)
   return false;
 
 if(prims.length < 2)
   return prims.length > 0;
 Vector center = new Vector();
 
 foreach(prim p in prims)
   center += p.center;
 
 center /= prims.length;
 foreach (prim p in prims)
   if((p.center - center).Magnitude >= 54)
     return false;
 
 return true;

}</csharp>

I would put 27, the radius, not 54, the diameter, in that last check. The distance from the center of a sphere to the edge is a radius, and the new rule mentions only a diameter. Windy Schor 19:03, 13 March 2012 (PDT)