/*[[ Name := spirmen Author := Copyright © 2004, nick b Link := Separate Window := Yes First Color := Blue First Draw Type := Line First Symbol := 217 Use Second Data := No Second Color := Red Second Draw Type := Line Second Symbol := 218 ]]*/ Inputs: Length(5); Variables :i(0), j(0), b(0), s(0), Ref(0); Array: R2[1000](0); SetLoopCount(0); if Length<1000 then while Ref+LengthClose[Bars-(R2[j]+Ref+1)] then { b=R2[j]; R2[j]=R2[i]; R2[i]=b; } } } s=0; for i=0 to Length-1 { s+=(R2[i]-i)*(R2[i]-i); } b=1-6*s/(Length*(Length*Length-1)); if (b==0) then b=0.000001; SetIndexValue(Bars-(Ref+Length+1),b); Ref++; }