the function for radius and parameter of r has been added with a comment.