维基上的解释是:牟合方盖是一种几何体,是两个等半径圆柱躺在平面上垂直相交的公共部分,因为像是两个方形的盖子合在一起,所以被称作“牟合方盖”。
说得有点绕,简单说:牟合方盖是两个半径相等并且轴心互相垂直的圆柱体相交而成的三维图形。个人觉得它是一种即方又圆的图形.
相关软件参见:数学图形可视化工具,使用自己定义语法的脚本代码生成数学图形.该软件开源免费.
(1)牟合方盖
vertices = D1:100 D2:100 u = from 0 to (PI*2) D1 v = from (-PI/2) to (PI/2) D2 m = cos(u) n = sin(u) y = sin(v) r = cos(v)*SQRT2 b = abs(m) < abs(n) x = if(b, m*r, sign(m)*r/SQRT2) z = if(b, sign(n)*r/SQRT2, n*r) a = 10 x = x*a y = y*a z = z*a
(2)三圆柱相交
牟合方盖是两个等半径圆柱垂直相交生成的,那么如果再用一个垂直的圆柱与牟合方盖相交,会得到什么图形呢?
下面为三个半径相等并且轴心互相垂直的圆柱体相交而成的三维图形.
vertices = D1:100 D2:100 u = from 0 to (PI*2) D1 v = from (-PI/2) to (PI/2) D2 m = cos(u) n = sin(u) y = sin(v) r = cos(v)*SQRT2 b = abs(m) < abs(n) x = if(b, m*r, sign(m)*r/SQRT2) z = if(b, sign(n)*r/SQRT2, n*r) e = sqrt(x*x + z*z) x = if(e > 1, x/e, x) z = if(e > 1, z/e, z) a = 10 x = x*a y = y*a z = z*a
(3)变异的牟合方盖
这其实是我写脚本代码时,一个变量写错了生成的图形.
vertices = D1:100 D2:100 u = from 0 to (PI*2) D1 v = from (-PI/2) to (PI/2) D2 m = cos(u) n = sin(u) y = sin(v) r = cos(v) b = abs(m) > abs(n) x = if(b, m*r, sign(m)*r/SQRT2) z = if(b, sign(n)*r/SQRT2, n*r) a = 10 x = x*a y = y*a z = z*a
数学图形之牟合方盖
时间: 2024-11-08 18:33:28