# by 落霜枫舞

by：落霜枫舞

R = 25; h = 50; CurveFunction[x_] := Sqrt[R^2 - (R - x)^2]; Manipulate[ Block[ {rotateAngle := ArcTan[(\[Lambda] (l - CurveFunction[d/2]) Sin[\[Alpha]])/( CurveFunction[d/2] - CurveFunction[(n - 1/2) d] + \[Lambda] (l - CurveFunction[d/2]) Cos[\[Alpha]])]}, Show[ (*画桌面*) Graphics3D[ Table[Cuboid[{-CurveFunction[(n - 1/2) d], (n - 1) d, 0}, {CurveFunction[(n - 1/2) d], n d, 3}], {n, 1, (2 R)/d}], BaseStyle -> {Opacity[0.5], Cyan}], (*画一侧桌腿*) Graphics3D[ Table[Rotate[ Cuboid[{CurveFunction[(n - 1/2) d], (n - 1) d, 0}, {CurveFunction[(n - 1/2) d] + l - CurveFunction[(n - 1/2) d], n d, 3}], If[rotateAngle < 0, \[Pi] + rotateAngle, rotateAngle], {0, 1, 0}, {CurveFunction[(n - 1/2) d], 0, 0}], {n, 1, (2 R)/d}]], (*画另一侧桌腿*) Graphics3D[ Table[Rotate[ Cuboid[{-CurveFunction[(n - 1/2) d], (n - 1) d, 0}, {-(CurveFunction[(n - 1/2) d] + l - CurveFunction[(n - 1/2) d]), n d, 3}], If[rotateAngle < 0, \[Pi] + rotateAngle, rotateAngle], {0, -1, 0}, {-CurveFunction[(n - 1/2) d], 0, 0}], {n, 1, (2 R)/d}]], (*画一侧钢筋*) Graphics3D[{Black, Opacity[1], Cylinder[{{(l - CurveFunction[d/2]) \[Lambda] Cos[\[Alpha]] + CurveFunction[d/2] + (3 Sin[\[Alpha]])/ 2, -2, -((l - CurveFunction[d/2]) \[Lambda] Sin[\[Alpha]] - ( 3 Cos[\[Alpha]])/ 2)}, {(l - CurveFunction[d/2]) \[Lambda] Cos[\[Alpha]] + CurveFunction[d/2] + (3 Sin[\[Alpha]])/2, 2 R + 2, -((l - CurveFunction[d/2]) \[Lambda] Sin[\[Alpha]] - ( 3 Cos[\[Alpha]])/2)}}]}], (*画另一侧钢筋*) Graphics3D[{Black, Opacity[1], Cylinder[{{-((l - CurveFunction[d/2]) \[Lambda] Cos[\[Alpha]] + CurveFunction[d/2] + (3 Sin[\[Alpha]])/ 2), -2, -((l - CurveFunction[d/2]) \[Lambda] Sin[\[Alpha]] - ( 3 Cos[\[Alpha]])/ 2)}, {-((l - CurveFunction[d/2]) \[Lambda] Cos[\[Alpha]] + CurveFunction[d/2] + (3 Sin[\[Alpha]])/2), 2 R + 2, -((l - CurveFunction[d/2]) \[Lambda] Sin[\[Alpha]] - ( 3 Cos[\[Alpha]])/2)}}]}], (*画阴影*)Graphics3D[{EdgeForm[None], Black, Polygon[{{(l - CurveFunction[d/2]) Cos[\[Alpha]] + CurveFunction[d/2] + 3 Sin[\[Alpha]], 0, -h}, {(l - CurveFunction[d/2]) Cos[\[Alpha]] + CurveFunction[d/2] + 3 Sin[\[Alpha]], 2 R, -h}, {-((l - CurveFunction[d/2]) Cos[\[Alpha]] + CurveFunction[d/2] + 3 Sin[\[Alpha]]), 2 R, -h}, {-((l - CurveFunction[d/2]) Cos[\[Alpha]] + CurveFunction[d/2] + 3 Sin[\[Alpha]]), 0, -h}}]}], Boxed -> False ] ], {{\[Alpha], ArcSin[h/(l - CurveFunction[d/2])], "桌腿张角"}, 0, ArcSin[h/(l - CurveFunction[d/2])]}, {{\[Lambda], 0.5, "钢筋位置"}, 0, 1}, {{d, 2.5, "木条宽度"}, 0, 10}, {{l, 60, "桌脚长度"}, h + CurveFunction[d/2], 200}]

Mma们，继续投稿，不分领域，不限内容，你肯定懂的...

284 篇文章52 人订阅

0 条评论

## 相关文章

1192

3777

### Openlayers中热力图的实现

Heatmap 是用来呈现一定区域内的统计度量，最常见的网站访问热力图就是以特殊高亮的形式显示访客热衷的页面区域和访客所在的地理区域的图示。Heatmap.j...

5063

1493

2886

2513

2978

4018

### linux基础命令6

tr命令 # tr 'a-z' 'A-Z' < /etc/fstab # # /ETC/FSTAB # CREATED BY ANACONDA ON THU ...

2877

### Best Bluemix Content

image.png Watson Services for Bluemix Sample Apps: Watson Films App (Video) Wats...

2784