sc50 function
Implementation
double sc50(double x, double z, double r, NoisePlane n) {
return ((n.noise2(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1]))))
+(n.noise2(x + ((r * MAGIC[158]) - (r * MAGIC[157])), z + ((r * MAGIC[157]) + (r * MAGIC[158]))))
+(n.noise2(x + ((r * MAGIC[127]) - (r * MAGIC[126])), z + ((r * MAGIC[126]) + (r * MAGIC[127]))))
+(n.noise2(x + ((r * MAGIC[97]) - (r * MAGIC[96])), z + ((r * MAGIC[96]) + (r * MAGIC[97]))))
+(n.noise2(x + ((r * MAGIC[129]) - (r * MAGIC[128])), z + ((r * MAGIC[128]) + (r * MAGIC[129]))))
+(n.noise2(x + ((r * MAGIC[67]) - (r * MAGIC[147])), z + ((r * MAGIC[147]) + (r * MAGIC[67]))))
+(n.noise2(x + ((r * MAGIC[73]) - (r * MAGIC[74])), z + ((r * MAGIC[74]) + (r * MAGIC[73]))))
+(n.noise2(x + ((r * MAGIC[159]) - (r * MAGIC[152])), z + ((r * MAGIC[152]) + (r * MAGIC[159]))))
+(n.noise2(x + ((r * MAGIC[107]) - (r * MAGIC[108])), z + ((r * MAGIC[108]) + (r * MAGIC[107]))))
+(n.noise2(x + ((r * MAGIC[20]) - (r * MAGIC[56])), z + ((r * MAGIC[56]) + (r * MAGIC[20]))))
+(n.noise2(x + ((r * MAGIC[34]) - (r * MAGIC[84])), z + ((r * MAGIC[84]) + (r * MAGIC[34]))))
+(n.noise2(x + ((r * MAGIC[133]) - (r * MAGIC[134])), z + ((r * MAGIC[134]) + (r * MAGIC[133]))))
+(n.noise2(x + ((r * MAGIC[98]) - (r * MAGIC[45])), z + ((r * MAGIC[45]) + (r * MAGIC[98]))))
+(n.noise2(x + ((r * MAGIC[136]) - (r * MAGIC[135])), z + ((r * MAGIC[135]) + (r * MAGIC[136]))))
+(n.noise2(x + ((r * MAGIC[54]) - (r * MAGIC[55])), z + ((r * MAGIC[55]) + (r * MAGIC[54]))))
+(n.noise2(x + ((r * MAGIC[25]) - (r * MAGIC[64])), z + ((r * MAGIC[64]) + (r * MAGIC[25]))))
+(n.noise2(x + ((r * MAGIC[124]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[124]))))
+(n.noise2(x + ((r * MAGIC[111]) - (r * MAGIC[110])), z + ((r * MAGIC[110]) + (r * MAGIC[111]))))
+(n.noise2(x + ((r * MAGIC[13]) - (r * MAGIC[39])), z + ((r * MAGIC[39]) + (r * MAGIC[13]))))
+(n.noise2(x + ((r * MAGIC[161]) - (r * MAGIC[160])), z + ((r * MAGIC[160]) + (r * MAGIC[161]))))
+(n.noise2(x + ((r * MAGIC[89]) - (r * MAGIC[30])), z + ((r * MAGIC[30]) + (r * MAGIC[89]))))
+(n.noise2(x + ((r * MAGIC[100]) - (r * MAGIC[99])), z + ((r * MAGIC[99]) + (r * MAGIC[100]))))
+(n.noise2(x + ((r * MAGIC[86]) - (r * MAGIC[44])), z + ((r * MAGIC[44]) + (r * MAGIC[86]))))
+(n.noise2(x + ((r * MAGIC[119]) - (r * MAGIC[120])), z + ((r * MAGIC[120]) + (r * MAGIC[119]))))
+(n.noise2(x + ((r * MAGIC[49]) - (r * MAGIC[75])), z + ((r * MAGIC[75]) + (r * MAGIC[49]))))
+(n.noise2(x + ((r * MAGIC[70]) - (r * MAGIC[69])), z + ((r * MAGIC[69]) + (r * MAGIC[70]))))
+(n.noise2(x + ((r * MAGIC[118]) - (r * MAGIC[130])), z + ((r * MAGIC[130]) + (r * MAGIC[118]))))
+(n.noise2(x + ((r * MAGIC[60]) - (r * MAGIC[59])), z + ((r * MAGIC[59]) + (r * MAGIC[60]))))
+(n.noise2(x + ((r * MAGIC[92]) - (r * MAGIC[131])), z + ((r * MAGIC[131]) + (r * MAGIC[92]))))
+(n.noise2(x + ((r * MAGIC[141]) - (r * MAGIC[142])), z + ((r * MAGIC[142]) + (r * MAGIC[141]))))
+(n.noise2(x + ((r * MAGIC[6]) - (r * MAGIC[5])), z + ((r * MAGIC[5]) + (r * MAGIC[6]))))
+(n.noise2(x + ((r * MAGIC[138]) - (r * MAGIC[121])), z + ((r * MAGIC[121]) + (r * MAGIC[138]))))
+(n.noise2(x + ((r * MAGIC[51]) - (r * MAGIC[50])), z + ((r * MAGIC[50]) + (r * MAGIC[51]))))
+(n.noise2(x + ((r * MAGIC[102]) - (r * MAGIC[101])), z + ((r * MAGIC[101]) + (r * MAGIC[102]))))
+(n.noise2(x + ((r * MAGIC[117]) - (r * MAGIC[116])), z + ((r * MAGIC[116]) + (r * MAGIC[117]))))
+(n.noise2(x + ((r * MAGIC[163]) - (r * MAGIC[162])), z + ((r * MAGIC[162]) + (r * MAGIC[163]))))
+(n.noise2(x + ((r * MAGIC[40]) - (r * MAGIC[14])), z + ((r * MAGIC[14]) + (r * MAGIC[40]))))
+(n.noise2(x + ((r * MAGIC[164]) - (r * MAGIC[140])), z + ((r * MAGIC[140]) + (r * MAGIC[164]))))
+(n.noise2(x + ((r * MAGIC[132]) - (r * MAGIC[88])), z + ((r * MAGIC[88]) + (r * MAGIC[132]))))
+(n.noise2(x + ((r * MAGIC[104]) - (r * MAGIC[103])), z + ((r * MAGIC[103]) + (r * MAGIC[104]))))
+(n.noise2(x + ((r * MAGIC[33]) - (r * MAGIC[37])), z + ((r * MAGIC[37]) + (r * MAGIC[33]))))
+(n.noise2(x + ((r * MAGIC[105]) - (r * MAGIC[150])), z + ((r * MAGIC[150]) + (r * MAGIC[105]))))
+(n.noise2(x + ((r * MAGIC[71]) - (r * MAGIC[23])), z + ((r * MAGIC[23]) + (r * MAGIC[71]))))
+(n.noise2(x + ((r * MAGIC[166]) - (r * MAGIC[165])), z + ((r * MAGIC[165]) + (r * MAGIC[166]))))
+(n.noise2(x + ((r * MAGIC[95]) - (r * MAGIC[94])), z + ((r * MAGIC[94]) + (r * MAGIC[95]))))
+(n.noise2(x + ((r * MAGIC[28]) - (r * MAGIC[29])), z + ((r * MAGIC[29]) + (r * MAGIC[28]))))
+(n.noise2(x + ((r * MAGIC[47]) - (r * MAGIC[48])), z + ((r * MAGIC[48]) + (r * MAGIC[47]))))
+(n.noise2(x + ((r * MAGIC[148]) - (r * MAGIC[149])), z + ((r * MAGIC[149]) + (r * MAGIC[148]))))
+(n.noise2(x + ((r * MAGIC[72]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[72]))))
+(n.noise2(x + ((r * MAGIC[106]) - (r * MAGIC[151])), z + ((r * MAGIC[151]) + (r * MAGIC[106]))))
+(n.noise2(x + ((r * MAGIC[32]) - (r * MAGIC[66])), z + ((r * MAGIC[66]) + (r * MAGIC[32]))))
+(n.noise2(x + ((r * MAGIC[27]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[27])))))*0.02;
}