I am trying to draw figure of the Problem 21 https://artofproblemsolving.com/wiki/index.php/2019_AMC_10A_Problems/Problem_21

A sphere with center $O$ has radius 6. A triangle with sides of length $15$, $15$, and $24$ is situated in space so that each of its sides are tangent to the sphere. I tried

    (0,0,0)  coordinate  (O);

    \fill[ball color=gray!10,tdplot_screen_coords] (O)  circle[radius=6]; 

How can I draw triangle?


This is a version that computes the points from the inputs with pgf methods. The output is much less spectacular than minthien_2016's nice answer, I do not (in this answer) distinguish between visible and hidden parts of the triangle and circle. The steps are:

  1. compute the radius r of the incircle;
  2. compute the height h of the plane containing the triangle;
  3. compute the distances of the points where the incircle touches the triangle to the corners of the triangle and the angles of the triangle;
  4. add the corners. One edge can be taken to be parallel to the x axis. So two corners are at z=h, y=-r and x at the respective touching distances. The third corner can then be reconstructed from the angles.

This is the result:

\pgfkeys{/pgf/fpu,/pgf/fpu/output format=fixed}% 
 \path (0,0,0)  coordinate  (O);
 % compute radius of incircle
 % compute height of circle
 % compute angles of triangle
 % compute distances from the corners of the triangle to the points where
 % the triangle touches the circle
  \fill[ball color=gray!10,tdplot_screen_coords] (O)  circle[radius=6]; 
  \path (-\touchA,-\inradius,\haux) coordinate[label=right:$A$](A)
   (\touchB,-\inradius,\haux) coordinate[label=left:$B$](B)
   (0,-\inradius,\haux) coordinate (TAB)
    coordinate (TAC)
    coordinate (TBC)
    (0,0,\haux) coordinate (M);
  \draw (A) -- (B) -- (C) -- cycle;
  \begin{scope}[canvas is xy plane at z=\haux]
   \draw[blue,thick] (M) circle[radius=\inradius];
  \foreach \X in {A,B,C,M,TAB,TAC,TBC}
  {\fill (\X) circle[radius=3pt];}

enter image description here

| improve this answer | |

With some calculations, I have this code

\begin{tikzpicture}[tdplot_main_coords,scale=1/2,line join = round, line cap = round,declare function={R=6;r=4;h=2*sqrt(5); Angle=acos(r/R);}] 
 (-3, -4,h) coordinate (A)
(12, -4,h) coordinate (B)
(-36/5, 52/5,h)  coordinate (C)
(0,0,h)  coordinate  (I)
(0,0,0)  coordinate  (O)
(0,-4,h)  coordinate  (H)
(-96/25, -28/25, h)  coordinate  (K)
  \fill[ball color=gray!10,tdplot_screen_coords] (O)  circle (R); 
  \tdplotCsDrawLatCircle[blue, thick]{R}{{Angle}}
   \draw[thick] (A) -- (B) -- (C) -- cycle;
  \draw[dashed] (O) -- (I) -- (H) -- cycle (I) -- (K) -- (O);
  \foreach \p in {A,B,C,I,O,H,K}
  \draw[fill=black] (\p) circle (2.5pt);
  \foreach \p/\g in {A/90,B/-90,C/-90,I/90,O/-90,H/90,K/90}
  \path (\p)+(\g:6mm) node{$\p$};

enter image description here

| improve this answer | |

enter image description here

Asymptote version with removed top of the sphere, suitable for general triangle:

// file tri-tan-sphere.asy
// run "asy -f png -render=4 tri-tan-sphere.asy"
// to get tri-tan-sphere.png
import graph3; size(200,0);
triple f(pair t){return (cos(t.y)*cos(t.x),cos(t.y)*sin(t.x),sin(t.y));}
real R=6, a=15, b=20, c=24,
triple O,A,B,C,I,At,Bt,Ct;
A=O; B=(c,0,0); C=(b*Cos(alpha),b*Sin(alpha),0);
transform3 t=shift(Z*h-I); 
A=t*A; B=t*B; C=t*C; I=t*I;
guide3 gt=A--B--C--cycle;
At=B+(rho-b)/a*(C-B); Bt=C+(rho-c)/b*(A-C); Ct=A+(rho-a)/c*(B-A);
surface s=surface(gt);
triple[] P={O,A,B,C,I,At,Bt,Ct,};
string[] L={"O","A","B","C","I","A_t","B_t","C_t",};
triple[] T={Z+Y,A-I,B-I,C-I,Z+Y,I-A,I-B,I-C,};
for(int i=0;i<P.length;++i){dot(P[i]); label("$"+L[i]+"$",P[i],2unit(T[i]));}
surface sc=scale3(R)*surface(f,(0,-pi/2),(2pi,acos(r/R)),Spline);

Alternatively, command asy -f html tri-tan-sphere.asy generates tri-tan-sphere.html with interactive 3D vector WebGL graphics.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.