Python – Intersecting Line With Circle

Ever wondered how people can say with 100% security where a circle intersects a line? No? Me too, but still I have decided to try to show how this is done.

We just need a triangle somewhere to be close to the Elder Wand sign from Harry Potter.

With Python it looks like a piece of cake. Just to calculate the points, you need around 5 lines of code:

And if you want to plot them beautifully, a bit more:

It is completely other idea, if you need to solve it with pen and paper. Anyway, I have tried to do it in the first 10 minutes of this video:

The pdf of the paper is here – Intersecting_Line_With_Circle.pdf.

Enjoy it!

Tagged with: , , , , , ,