#! /usr/bin/dc 10k 0 0 :X 0 0 :Y 0.5 1 :X 0.87 1 :Y 1 2 :X 0 2 :Y 0 0 sx sy 0.77777 sr # Repeat [ 1 - r d x r d 0 !=R] sR [#PLOT 2]p [o]p [e]p # Generate pseudo random number [1 lr - lr * 4 * sr lr 100000 * 0k 1 / 3 % 10k si # Choose coordinate with the randomly generated index i # and calculate the new position based on the current position and # the chosen destination li ;X lx - 2 / lx + sx li ;Y ly - 2 / ly + sy # Plot [p ]P lx n [ ]P ly p sz ] # Repeat 10000 times 10000 lR x [x]p