# How to make ternary Plot 3D in a different situation?

Owing to xzczd, I could make ternary plot with the following code:

r[AA_, BB_, CC_] := 4 Sin[AA/2] Sin[BB/2] Sin[CC/2];
old = {{0, 0}, {Pi, 0}, {0, Pi}};
begin = {{0, 0, 0}, {Pi, 0, 0}, {Pi/2, Sqrt Pi/2, 0}, {0, 0, 0}};
g[AA_, BB_, CC_] := 72 r[AA, BB, CC]^3;
p2 = Plot3D[g[x, y, Pi - x - y], {x, 0, Pi}, {y, 0, Pi},
RegionFunction -> Function[{x, y}, x + y < Pi],
PlotRange -> {0, 10}, PlotStyle -> Opacity[0.5, Cyan]];
{error, ts} = FindGeometricTransform[Most /@ Most@begin, old];
newp2 = p2 /.
GraphicsComplex[pts_, rest__] :>
GraphicsComplex[Join[ts[{#, #2}], {#3}] & @@@ pts, rest];
mhs = Show[newp2, Axes -> {False, False, True}, Boxed -> False,
PlotRange -> All]


The function: g[AA, BB, CC] := 72(4 Sin[AA/2]Sin[BB/2]Sin[CC/2])^3 && AA + BB + CC = Pi.

I am trying in vain to make ternary plot of the following minimum value function: R1[AA_,y_,z_]:=Sqrt[y^2+z^2+2y z Cos[AA]]/Sin[AA]; R2[BB_,z_,x_]:=Sqrt[z^2+x^2+2z x Cos[BB]]/Sin[BB]; R3[CC_,x_,y_]:=Sqrt[x^2+y^2+2x y Cos[CC]]/Sin[CC]; f[AA_,BB_,CC_,x_,y_,z_]:=R1[AA,y,z]^3+R2[BB,z,x]^3+R3[CC,x,y]^3+6R1[AA,y,z]R2[BB,z,x]R3[CC,x,y]; g[AA_,BB_,CC_]:= FindMinValue[{f[AA,BB,CC,x,y,z],x Sin[AA]+y Sin[BB]+z Sin[CC]==2 Sin[AA]Sin[BB]Sin[CC],-1<x<3,-1<y<3,-1<z<3},{{x,1},{y,1},{z,1}}];

The replacement of the former function by the latter function does not produce the result. How should I change the code to obtain its ternary 3D plot?

2019.6.5 I add ListPlot3D of my problem. • What do you mean by "does not produce the result"? Does the code produce e.g. a blank plot or some warning, or the calculation never finishes? – xzczd Jun 3 '19 at 7:41
• The calculation did not finish. After 15 minutes, it was aborted. Should I continue the calculation more than 15 minutes? - seiichikiri – seiichikiri Jun 3 '19 at 12:38
• Does the color of your code become dark blue? If so, you're probably out of memory so the kernel crashes. (Notice FindMinValue is expensive, and, are you sure there exists a minimum when AA, BB or CC tends to 0? ) – xzczd Jun 3 '19 at 17:27
• I computed the above 'f[AA_,BB_,CC_]' discretely. t1 = Table[f[0.1, i, Pi - 0.1 - i], {i, 0.1, 3.0, 0.1}] t2 = Table[f[0.2, i, Pi - 0.2 - i], {i, 0.1, 2.9, 0.1}] ----- t30 = Table[f[3.0, i, Pi - 3.0 - i], {i, 0.1, 0.1, 0.1}] Warnings of iterations and allowable ranges appear. And made its triangular matrix. By it I made 'ListPlot3D[Data]' as follows. In order to compute with original code, can we control the number of computation or divide the area '0 < x < Pi, 0 < y < Pi, x+y < Pi' to several ones, compute them one by one and assemble them to a picture? – seiichikiri Jun 5 '19 at 0:27
• RegionFunction is also an option for ListPlot3D. – xzczd Jun 5 '19 at 2:44