# 2d-RandomWalks with N steps and fixed distance between first and last point

community, I'm trying to figure out a way how to create a 2d list simulating a N-Step-Randomwalk with a fixed distance between first and last point. I already got the RandomWalk with the step size 1:

Input:

RW2D[n_] := Accumulate[Through[{Cos, Sin}[#]] & /@ RandomReal[{0, 2 [Pi]}, n]]

I have no idea how to connect the first and the last point. I'd be happy to receive some help. Thanks alot Greetings.

• Why not use standard features like RandomFunction[RandomWalkProcess[0.5], {0, 10^3}, 2]? – Alex Trounev Nov 14 '18 at 17:18
• I'm relatively new to this software so i find it easier to have the points in a list. – PaladinDanse Nov 14 '18 at 17:27
• Sorry, did not notice that you are walking in a circle. This is 1D and not 2D. – Alex Trounev Nov 14 '18 at 17:28
• But it turns out 2D. I fixed your typo RW2D[n_] := Accumulate[Through[{Cos, Sin}[#]] & /@ RandomReal[{0, 2*Pi}, n]]; ListLinePlot[RW2D[100]] – Alex Trounev Nov 14 '18 at 17:37

RW2D[n_] :=