The Task
This is quite a simple coding task, all your program has to do is place a point on a canvas (or your alternative in another coding language) and connect it to all the dots already placed. Your program must take in one input, the number of dots that should be placed, and output some sort of display with the dots connected. Example
Requirements
- I have to be able to run it, which means that it has to have a compiler/tool to run it either online, or publicly available to download.
- You are allowed to use any library created before this challenge was set, as long as it wasn't designed for the sole purpose of solving this.
- This is a shortest code task, which means characters. Comments, code that changes colour (for prettiness) and libraries will be ignored.
- Your answer must be unique, don't steal other peoples code, shorten it a few characters and repost it.
- It must be able to run in less than 5 minutes, for the values of 5 and 100. It must also use a resolution of at least 200*200 and put each dot in a random location on the canvas using a non-trivial distribution.
Current Leaderboard
Flawr - Matlab - 22 - Confirmed
Falko - Python 2 - 41 - Confirmed
Wyldstallyns - NetLogo - 51 - Confirmed
Ssdecontrol - R - 66 - Confirmed
9214 - Red - 81 - Confirmed
David - Mathematica - 95 - Confirmed
Razetime - Red - 118 - Confirmed
ILoveQBasic - QBasic - 130 - Confirmed
Adriweb - TI-Nspire Lua - 145 - Confirmed
Manatwork - Bash - 148 - Confirmed
Doorknob - Python 2 - 158 - Confirmed
Kevin - TCL - 161 - Confirmed
M L - HPPPL - 231 - Confirmed
Manatwork - HTML/JS - 261 - Confirmed - Improved code of Scrblnrd3
Makando - C# - 278 - Confirmed
Scrblnrd3 - HTML/JS - 281 - Confirmed
Geobits - Java - 282 - Confirmed
If I've missed you out, I'm very sorry, just add a comment to your work saying so and I'll add it as soon as I see it =)
TL;DR
- Input - Number of dots (int, can be hard coded)
- Output - Image of randomly placed dots, all connected to each other (graphic)
- Winner - Shortest code