Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.
The solution seems indeed obvious when expressed as above rather than in the tell-tale format of the puzzle. Since every triangle has a circumscribed circle, and all points on that circle are obviously at the same distance of the centre O, the three points have to aim at the centre O. Assuming they all move at the same velocity, they will reach O together…
When experimenting with a short R code, I quickly figured out that the circumscribed circles associated with all triplets do not necessarily contain all points. The resolution of this difficulty is however straightforward as it suffices to add an artificial point by considering all circumcentres and their distances to the farthest point, minimising over these distances and adding the extra point at random over the circumference. As in the example below.
dracirc=function(A,B,C){
O=findcentr(A,B,C)
ro=dist(rbind(A,O))
lines(x=O[1]+ro*sin(2*pi*seq(0,1,le=180)),
y=O[2]+ro*cos(2*pi*seq(0,1,le=180)))}
R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.
