【问题】
三棱锥P-ABC中,平面PAB⊥平面ABC,▲PAB和▲ABC均为边长为2的正三角形,问三棱锥P-ABC外接球的半径是多少?
【解一】
找PC中点E,连DE,球心F必在DE上。
设FE=x,外接球半径为r,有
FP=FC=r=FB=FA(上图蓝线)
FP=FB=r
FP*FP=FB*FB
PE^2+EF^2=DF^2+DB^2
(根号6/2)^2+x^2=(根号6/2+x)^2+1
得到x=-1/根号6
r^2=EF^2+EP^2=(-1/根号6)^2+(根号6/2)^2=1/6+6/4=5/3
所以,r=(根号15)/3
最终的实际图像:
【解法二】
找到▲PAC的重心o1,▲ABC的重心o2,过o1做▲PAC的垂线,过o2做▲ABC的垂线,外接球的球心必在两垂线焦点上,设为o3.
DO1=DO2=根号3/3
Do3=根号2*根号3/3=根号6/3
r^2=DO3^2+DB^2=6/9+1=5/3
所以,r=(根号15)/3
【结论】
两种解法结果可互为印证,第二种更巧妙,更省时。
【绘制图像的Canvas代码】
<!DOCTYPE html> <html lang="utf-8"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <head> <title>两正三角形形成的三棱锥求外接球半径 Draft4</title> <style type="text/css"> .centerlize{ margin:0 auto; width:1200px; } </style> </head> <body οnlοad="init();"> <div class="centerlize"> <canvas id="myCanvas" width="12px" height="12px" style="border:1px dotted black;"> 如果看到这段文字说您的浏览器尚不支持HTML5 Canvas,请更换浏览器再试. </canvas> </div> </body> </html> <script type="text/javascript"> <!-- /***************************************************************** * 将全体代码(从<!DOCTYPE到script>)拷贝下来,粘贴到文本编辑器中, * 另存为.html文件,再用chrome浏览器打开,就能看到实现效果。 ******************************************************************/ // canvas的绘图环境 var ctx; // 高宽 const WIDTH=512; const HEIGHT=512; // 舞台对象 var stage; //------------------------------- // 初始化 //------------------------------- function init(){ // 获得canvas对象 var canvas=document.getElementById('myCanvas'); canvas.width=WIDTH; canvas.height=HEIGHT; // 初始化canvas的绘图环境 ctx=canvas.getContext('2d'); ctx.translate(WIDTH/2,HEIGHT/2);// 原点平移 // 准备 stage=new Stage(); stage.init(); // 开幕 animate(); } // 播放动画 function animate(){ stage.update(); stage.paintBg(ctx); stage.paintFg(ctx); // 循环 if(true){ //sleep(100); window.requestAnimationFrame(animate); } } // 舞台类 function Stage(){ // 初始化 this.init=function(){ } // 更新 this.update=function(){ } // 画背景 this.paintBg=function(ctx){ ctx.clearRect(-WIDTH/2,-HEIGHT/2,WIDTH,HEIGHT);// 清屏 } // 画前景 this.paintFg=function(ctx){ // 底色 ctx.save(); ctx.fillStyle = "white"; ctx.fillRect(-WIDTH/2,-HEIGHT/2,WIDTH,HEIGHT); ctx.restore(); const R=210;//基准尺寸 // #1 ctx.save(); var r=R*1.00; var a=createPt(-r,0); var d=createPt2(a.x,a.y,r/Math.sqrt(2),Math.PI/4); var p=createPt2(d.x,d.y,r/Math.sqrt(2)*Math.sqrt(3),-Math.PI/2); var b=createPt2(a.x,a.y,r/Math.sqrt(2)*2,Math.PI/4); var c=createPt(r,0); var ratio=1/3; var o1=createPt(d.x+(p.x-d.x)*ratio,d.y+(p.y-d.y)*ratio); var o2=createPt(d.x+(c.x-d.x)*ratio,d.y+(c.y-d.y)*ratio); var e=createPt(c.x/2+p.x/2,c.y/2+p.y/2); var ratio=1.5; var o3=createPt(d.x+(e.x-d.x)/ratio,d.y+(e.y-d.y)/ratio); ctx.save();// PAB ctx.strokeStyle="black"; ctx.beginPath(); ctx.moveTo(a.x,a.y); ctx.lineTo(b.x,b.y); ctx.lineTo(p.x,p.y); ctx.closePath(); ctx.stroke(); ctx.restore(); ctx.save();// PCB ctx.strokeStyle="black"; ctx.beginPath(); ctx.moveTo(p.x,p.y); ctx.lineTo(c.x,c.y); ctx.lineTo(b.x,b.y); ctx.stroke(); ctx.restore(); ctx.save();// AC ctx.strokeStyle="black"; ctx.setLineDash([5,5]); ctx.beginPath(); ctx.moveTo(a.x,a.y); ctx.lineTo(c.x,c.y); ctx.stroke(); ctx.restore(); ctx.save();// PD ctx.strokeStyle="black"; //ctx.setLineDash([5,5]); ctx.beginPath(); ctx.moveTo(d.x,d.y); ctx.lineTo(p.x,p.y); ctx.stroke(); ctx.restore(); ctx.save();// dc ctx.strokeStyle="black"; ctx.setLineDash([5,5]); ctx.beginPath(); ctx.moveTo(d.x,d.y); ctx.lineTo(c.x,c.y); ctx.stroke(); ctx.restore(); ctx.save();// o1o3 ctx.strokeStyle="black"; ctx.setLineDash([5,5]); ctx.beginPath(); ctx.moveTo(o1.x,o1.y); ctx.lineTo(o3.x,o3.y); ctx.stroke(); ctx.restore(); ctx.save();// o2o3 ctx.strokeStyle="black"; ctx.setLineDash([5,5]); ctx.beginPath(); ctx.moveTo(o2.x,o2.y); ctx.lineTo(o3.x,o3.y); ctx.stroke(); ctx.restore(); ctx.save();// a o3 ctx.strokeStyle="blue"; //ctx.setLineDash([5,5]); ctx.beginPath(); ctx.moveTo(a.x,a.y); ctx.lineTo(o3.x,o3.y); ctx.stroke(); ctx.restore(); ctx.save();// B o3 ctx.strokeStyle="blue"; //ctx.setLineDash([5,5]); ctx.beginPath(); ctx.moveTo(b.x,b.y); ctx.lineTo(o3.x,o3.y); ctx.stroke(); ctx.restore(); // 标注点 writeText(ctx,a.x,a.y,"A",r*0.1+"px consolas","black"); writeText(ctx,b.x,b.y,"B",r*0.1+"px consolas","black"); writeText(ctx,c.x,c.y,"C",r*0.1+"px consolas","black"); writeText(ctx,d.x,d.y,"D",r*0.1+"px consolas","black"); writeText(ctx,p.x,p.y,"P",r*0.1+"px consolas","black"); writeText(ctx,o1.x,o1.y,"o1",r*0.1+"px consolas","black"); writeText(ctx,o2.x,o2.y,"o2",r*0.1+"px consolas","black"); writeText(ctx,o3.x,o3.y,"o3",r*0.1+"px consolas","black"); ctx.restore(); writeText(ctx,WIDTH/2-30,HEIGHT/2-5,"逆火制图","8px consolas","lightgrey");// 版权 } } /*---------------------------------------------------------- 函数:用于绘制矩形 ctx:绘图上下文 x:矩形中心横坐标 y:矩形中心纵坐标 width:矩形宽 height:矩形高 ----------------------------------------------------------*/ function drawRect(ctx,x,y,width,height){ ctx.beginPath(); ctx.moveTo(x-width/2,y-height/2); ctx.lineTo(x+width/2,y-height/2); ctx.lineTo(x+width/2,y+height/2); ctx.lineTo(x-width/2,y+height/2); ctx.closePath(); } /*---------------------------------------------------------- 函数:用于绘制实心圆 ctx:绘图上下文 x:矩形中心横坐标 y:矩形中心纵坐标 r:圆半径 style:填充圆的方案 ----------------------------------------------------------*/ function drawSolidCircle(ctx,x,y,r,style){ ctx.fillStyle=style; ctx.beginPath(); ctx.arc(x,y,r,0,Math.PI*2,false); ctx.closePath(); ctx.fill(); } /*---------------------------------------------------------- 函数:创建一个二维坐标点 baseX:基准点横坐标 baseY:基准点纵坐标 radius:当前点到基准点的距离 theta:当前点到基准点的角度 Pt即Point ----------------------------------------------------------*/ function createPt2(baseX,baseY,radius,theta){ var retval={}; retval.x=baseX+radius*Math.cos(theta); retval.y=baseY+radius*Math.sin(theta); return retval; } /*---------------------------------------------------------- 函数:创建一个二维坐标点 x:横坐标 y:纵坐标 Pt即Point ----------------------------------------------------------*/ function createPt(x,y){ var retval={}; retval.x=x; retval.y=y; return retval; } /*---------------------------------------------------------- 函数:延时若干毫秒 milliseconds:毫秒数 ----------------------------------------------------------*/ function sleep(milliSeconds) { const date = Date.now(); let currDate = null; while (currDate - date < milliSeconds) { currDate = Date.now(); } } /*---------------------------------------------------------- 函数:书写文字 ctx:绘图上下文 x:横坐标 y:纵坐标 text:文字 font:字体 color:颜色 ----------------------------------------------------------*/ function writeText(ctx,x,y,text,font,color){ ctx.save(); ctx.textBaseline="bottom"; ctx.textAlign="center"; ctx.font = font; ctx.fillStyle=color; ctx.fillText(text,x,y); ctx.restore(); } /*------------------------------------------------------------- 当你真的可以靠交易为生,那种状态其实不是兴奋,而是平静。 你不着急证明什么,也不会被行情牵着鼻子走。 你知道自己在做什么,知道什么时候该出手,什么时候该等。 你不再幻想“暴富”,也不再追逐“一单成神”, 而是像个老农一样,播种、等待、收割...... 一切按节奏来。 --------------------------------------------------------------*/ //--> </script>