top | item 34282430

(no title)

ynfnehf | 3 years ago

By cheating with a Python script to move the mouse, I managed to get 99.9%. Seems difficult to get higher than that, perhaps due to the mouse position having integer coordinates.

discuss

order

majkinetor|3 years ago

I literray came here to see who is going to proclaim automation first (and in what way) :) Unsurprinsingly, it was the first comment.

100% perfect circle is a pure math thing and can't be achieved with drawing in any way.

yarg|3 years ago

In a similar vein, people claim it's impossible to draw a heptagon with a straight edge and ruler.

Sure, but good luck pulling of a perfect octagon either, given the limitations of pen and paper.

And there's a perfectly good approximation that'll very quickly produce a theoretical heptagon with error margins less than the thickness of a pencil.

1/7 ~= 1/8 + 1/64 + 1/512 + 1/4096

(1/n = sum(1...infinity) of 1/((n + 1) ^ i)

(A perfect heptagon requires infinitely many steps.)

dmix|3 years ago

A mac or windows app controlling the mouse I presume?

ynfnehf|3 years ago

I used the pyautogui library on Linux. Then just a simple loop with an incrementing angle, with some overshoot in the end in order for the webpage to recognize that the circle was complete. First time using the library, worked pretty well, except I had to figure out that I had to use pyautogui.PAUSE = 0 to make it not pause between mouse movements.

chrischen|3 years ago

Arduino controlling a robotic arm holding a mouse, written in C.