This is the same question as this question except that the random triangles do not need to necessarily touch the circle and I am only interested in the distribution for the perimeter. And I am interested in the exact closed form for the PDF, if that is possible even though it would be complicated.
Here are 4 random examples:
For the case when the $r=1$, the maximum perimeter is still the same, namely $3\sqrt{3}$
When I ran $100000$ trials I got a distribution that looks like:
With the corrected code, the expected value is simply the same as what was mentioned in the comments, namely, $\frac{128}{15\pi}$. The empirical results matched it.
For all the related problems of finding the geometric probabilities, the pdf's have all involved the Beta distribution somehow. I don't know why.
The Mathematica code that I had used was:
(* Clear all variables and global definitions *)
ClearAll["Global`*"]
data=Table[Perimeter[Polygon[RandomPoint[Disk[],3]]],{i,1,100000}];
Mean[data]
SmoothHistogram[data,Automatic,"PDF",Filling->Axis]