Hello there,
im not a good developer so i will let u guys do something out of this ;)
Without further, here my idea and how i think its going to work.
- First we will set a PXL at a random position on the screen.
- Then we will set a random direction 1-4.
- Before a new PXL is placed in the random direction, we will test as followed. ▓=Pixel, ▒=Testet Area, ´=Just a placeholder
▒▒
▒▒▓ :if D=1
▒▒
▒▒▒
▒▒▒ :if D=2
´ ▓
´ ▒▒
▓▒▒ :if D=3
´ ▒▒
´ ▓
▒▒▒ :if D=4
▒▒▒
- In this case there will always be a gap between placed PXL.
- If there is no Pixel, only then there will be placeds a new Pixel.
___
I tried it with for loops, with repeats etc. and so on. But it does not work at all.
But im not a good developer.
I hope u could find a way how to solve.