this is the code of simulating 3d random walking with self avoiding. I want to calculate Rg (root of square x plus z plus y) and then plot the log Rg-log N(number of steps).