I typically run a simulation that draws a line between two random point in 3d space. then I throw two random numbers that represent two line ( see red lines in attachment) starting from the two previuos points and sit on top of the original line. if the lengths of those two lines are such that they cross I update a register. I repeat that J times.
I want to generalize this to higher than 3d. Is that possible and is it unique. Please provide any links to such information.
Thank you for your help.