Intermediate results

Viviani’s theorem states that the sum of the distances from any interior point to the sides of an equilateral triangle equals the length of the triangles’s altitude.
First, construct the constraints describing an equilateral triangle centered on the origin, with the distance to each vertex equal to 1. For different size equilateral triangles, the results will scale.
In[]:=
(*defineapackingregionwhichis=0alonglinealong{x1,y1}and{x2,y2}andpositiveonoriginside,ifpointsarechosencounter-clockwise*)​​boundaryLine[{{x1_,y1_},{x2_,y2_}}]=(y1-y2)x+(x2-x1)y+x1y2-x2y1;
In[]:=
(*listofhalf-planeregionstodefineaconvexpolygonpackingregion,pointsdefinedcounterclockwise*)​​boundaryLines[pts_List]:=boundaryLine/@Partition[pts,2,1,{1,1}]
In[]:=
trilines=boundaryLines[CirclePoints[3]]
Out[]=

3
2
-
3x
2
-
3
y
2
,
3
2
+
3x
2
-
3
y
2
,
3
2
+
3
y
Thread[ trilines > = 0] is the region inside the triangle and Thread[ trilines < = 0] is the region outside the triangle
In[]:=
(*Calculatethedistancesfromapoint{x0,y0}tothethreesidesofthetriangle*)​​dists=MinValue[{Sqrt[
2
(x-x0)
+
2
(y-y0)
],trilines〚#〛<=0},{x,y}]&/@Range[3]
Out[]=

1
2
3
2
x0
+2
3
x0(-1+y0)+
2
(-1+y0)
3x0+
3
y0≤
3
0
True
,
1
2
3
2
x0
-2
3
x0(-1+y0)+
2
(-1+y0)
-3x0+
3
y0≤
3
0
True
,
1
2
2
(1+2y0)
3
y0≥-
3
2
0
True

In[]:=
(*findthealtitudeofthetriange*)​​MaxValue[y,Thread[trilines>=0],{x,y}]-MinValue[y,Thread[trilines>=0],{x,y}]
Out[]=
3
2
In[]:=
(*findthesumofthethreedistances*)​​sumDists=Total[dists〚All,1,1,1〛]
Out[]=
1
2
3
2
x0
-2
3
x0(-1+y0)+
2
(-1+y0)
+
1
2
3
2
x0
+2
3
x0(-1+y0)+
2
(-1+y0)
+
1
2
2
(1+2y0)
In[]:=
(*constructtheconstraintsfor{x0,y0}tobeinsidethetriangle*)​​trix0y0=Thread[(trilines/.{x->x0,y->y0})>=0]
Out[]=

3
2
-
3x0
2
-
3
y0
2
≥0,
3
2
+
3x0
2
-
3
y0
2
≥0,
3
2
+
3
y0≥0
In[]:=
(*useReducetofindthetotalofthethreedistancesinsidethetriangle*)​​Reduce[res==sumDists&&Sequence@@trix0y0,{res,x0,y0},Reals]
Out[]=
res
3
2
&&x0-
3
2
&&y0-
1
2
||-
3
2
<x0≤0&&-
1
2
≤y0≤
3
+3x0
3
||0<x0<
3
2
&&-
1
2
≤y0≤
3
-3x0
3
||x0
3
2
&&y0-
1
2