I suggest an Asymptote way, for simplicity, like as in the following a 3D figure.
To draw a 3D cone, you need to the height h
and the base circle (center K
, radius r
, and normal n
). Asymptote gives two methods.
1. use the built-in unitcone
from three
module (then one can take geometric transformations like shift
, scale
, rotate
, etc)
surface mycone=shift(K)*scale(r,r,h)*unitcone;
draw(mycone,yellow+opacity(.5));
2. use revolution from solids
module
revolution mycone=cone(K,r,h,n);
draw(surface(mycone),yellow+opacity(.5));

unitsize(1cm);
import three;
import solids;
currentprojection=orthographic(2,2,1,center=true,zoom=.9);
// B,C,D on the XY-plane
triple B=O, D=(0,7,0),C=(5,1.5,0);
triple barycentric(triple A=O, triple B, triple C, real a=1, real b, real c){
return (a*A+b*B+c*C)/(a+b+c);
}
triple incenter(triple A=O, triple B, triple C){
real a=abs(B-C), b=abs(C-A), c=abs(A-B);
return barycentric(A,B,C,a,b,c);
}
triple K=incenter(B,C,D);
real r=.5abs(K-reflect(B,D,Z)*K); // inradius
draw(circle(K,r,Z),red);
dot("$K$",K,red);
real h=5;
triple A=K+h*Z;
draw(A--B^^A--C^^A--D^^B--C--D--cycle,blue);
dot("$A$",A,NW,blue);
dot("$B$",B,NE,blue);
dot("$C$",C,W,blue);
dot("$D$",D,blue);
////// to draw a CONE ///////
// 1st way: nice! (use revolution of solids)
revolution mycone=cone(K,r,h,Z);
draw(surface(mycone),yellow+opacity(.5));
// 2nd way: also nice! (use the built-in unitcone of three)
//surface mycone=shift(K)*scale(r,r,h)*unitcone;
//draw(mycone,yellow+opacity(.5));
Update:

unitsize(1cm);
import three;
import solids;
triple barycentric(triple A=O, triple B, triple C, real a=1, real b, real c){
return (a*A+b*B+c*C)/(a+b+c);
}
triple incenter(triple A=O, triple B, triple C){
real a=abs(B-C), b=abs(C-A), c=abs(A-B);
return barycentric(A,B,C,a,b,c);
}
currentprojection=orthographic(dir(70,25),center=true,zoom=.95);
real a=4;
triple D=O, A=(a,0,0),B=(a,a,0),C=(0,a,0);
triple E=(a,0,a), F=(a,a,a),G=(0,a,a),H=(0,0,a);
draw(box(D,F),blue);
draw(A--H--F--C--H^^A--F,blue);
triple K=incenter(H,F,C);
triple n=normal(H--C--F);
real sHFC=.5*abs(cross(F-H,F-C));
real p=.5*(abs(H-F)+abs(F-C)+abs(H-C));
real r=sHFC/p; // inradius
draw(circle(K,r,n),red);
dot(K,red);
real h=abs(A-K);
revolution mycone=cone(K,r,h,n);
draw(surface(mycone),yellow+opacity(.5));