Math Pro 數學補給站's Archiver

記住該記住的,忘記該忘記的。
改變能改變的,接受不能改變的

bugmens 發表於 2018-3-17 12:37

多圓柱相交的體積

之前做兩圓柱相交的體積
[url]https://math.pro/db/viewthread.php?tid=162&page=4#pid17835[/url]

最近在做三圓柱相交的體積,有問題想請各位網友提供意見
我參考這裡的資料
[url]http://calculus.nctu.edu.tw/upload/calculus_web/maple/Site/lab91_1/maple/The%20intersection%20of%20Three%20Cylinders/ans_porj_cylind.html[/url]
在18.bmp的\( z=\sqrt{1-x^2} \)轉換成19.bmp的\( z=\sqrt{1-(r cos \theta)^2} \)
要怎麼用動畫直觀表達出\( x=r cos \theta \)

參考資料的圓柱坐標用\( (r,\theta,z) \),wiki用的是\( (\rho,\phi,z) \)
[url]https://zh.wikipedia.org/wiki/圓柱坐標系[/url]
大家覺得這個有需要改嗎?

107.4.6
目前沒有網友回應,先做成gif動畫
 \(\displaystyle 16 \int_0^{\frac{\pi}{4}} \int_0^1 \int_0^{\sqrt{1-(r cos \theta)^2}}r dz dr d \theta \)
\(\displaystyle =16 \int_0^{\frac{\pi}{4}} \int_0^1 rz \Bigg\vert\;_{z=0}^{z=\sqrt{1-(r cos \theta)^2}} dr d \theta\)
\( \displaystyle =16 \int_0^{\frac{\pi}{4}} \int_0^1 r\sqrt{1-(rcos\theta)^2} dr d\theta \)
\(\displaystyle =16 \int_0^{\frac{\pi}{4}} -\frac{(1-(rcos\theta)^2)^{\frac{3}{2}}}{cos \theta} \Bigg\vert\;_{r=0}^{r=1}d \theta \)
\(\displaystyle =16 \int_0^{\frac{\pi}{4}} \frac{1-sin^3 \theta}{3cos^2 \theta}d\theta\)
\(\displaystyle =\frac{16}{3}(tan\theta-sec\theta-cos\theta)\Bigg\vert\;_{\theta=0}^{\theta=\frac{\pi}{4}}\)
\(\displaystyle =\frac{16}{3}(3-\frac{3\sqrt{2}}{2})\)
\(=16-8\sqrt{2}\)

bugmens 發表於 2018-9-23 14:21

Moreton Moore在1974年發表一篇關於多圓柱相交的體積的論文,他設定圓柱的直徑為2\((d=2)\),\(S_n\)代表\(n\)對稱圓柱相交的體積。
二圓柱相交的體積\( \displaystyle S_2=\frac{2}{3}d^3=\frac{16}{3}\)
[attach]4707[/attach]
三圓柱相交的體積\( S_3=(2-\sqrt{2})d^3=8(2-\sqrt{2}) \)
四圓柱相交的體積\( \displaystyle S_4=\frac{3}{2}\sqrt{2}(2-\sqrt{3})d^3=12(2\sqrt{2}-\sqrt{6}) \)
[attach]4708[/attach]
六圓柱相交的體積\( \displaystyle S_6=\frac{2}{3}(3+2\sqrt{3}-4\sqrt{2})d^3=\frac{16}{3}(3+2\sqrt{3}-4\sqrt{2})\)
[attach]4709[/attach]


徒手畫四圓柱和六圓柱相交的圖形非常麻煩,要借助SketchUp的Ruby程式畫出圖形。

1.設定立方體8個頂點坐標為
\((1,-1,1),(1,1,1),(-1,1,1),(-1,-1,1)\)
\((1,-1,-1),(1,1,-1),(-1,1,-1),(-1,-1,-1)\)
立方體邊長2,中心為\((0,0,0)\)

2.從立方體8個頂點對角兩兩連線形成四圓柱相交的模型
圓柱1:\((-1,-1,-1)\)和\((1,1,1)\)連線
圓柱2:\((1,-1,-1,)\)和\((-1,1,1)\)連線
圓柱3:\((1,1,-1)\)和\((-1,-1,1)\)連線
圓柱4:\((-1,1,-1)\)和\((1,-1,1)\)連線

3.轉換成\(SketcuUp\)程式碼
ent=Sketchup.active_model.entities
center=[[-1,-1,-1],[1,-1,-1],[1,1,-1],[-1,1,-1]]
normal=[[2,2,2],[-2,2,2],[-2,-2,2],[2,-2,2]]
for i in 0..3
  circle=ent.add_circle center[ i ],normal[ i ],1,60
  circle_face=ent.add_face circle
  circle_face.pushpull 4
  ent.add_group circle_face.all_connected
end
程式碼解釋可以看底下參考資料的"當SketchUp遇見Ruby-邁向程式化建模之路"

4.將程式碼儲存成4intersection.rb,將檔案放到SketchUp目錄下
SketchUp2017
C:\Program Files\SketchUp\SketchUp 2017\ShippedExtensions
SketchUp 8
C:\Program Files (x86)\Google\Google SketchUp 8\Plugins

執行SketchUp可以看到四圓柱的模型,但要得到四圓柱交集後的結果,要另外安裝OScoolean plugins。

6.安裝OScoolean plugins
到[url]http://www.plotyuki.sakura.ne.jp/blog/blog.cgi?n=28&category=01[/url]下載OSCoolean_2013.zip
將解壓縮的檔案放到SketchUp目錄下
SketchUp2017
C:\Program Files\SketchUp\SketchUp 2017\ShippedExtensions
SketchUp 8
C:\Program Files (x86)\Google\Google SketchUp 8\Plugins

7.重新執行SketchUp,全選四個圓柱,按下滑鼠右鍵選"實心工具/交集",得到四圓柱交集後的模型。

===========================================================

取立方體12個邊中點對角兩兩連線形成六圓柱相交的圖形
圓柱1:\((1,-1,0)\)和\((-1,1,0)\)連線
圓柱2:\((-1,-1,0)\)和\((1,1,0)\)連線
圓柱3:\((1,0,1)\)和\((-1,0,-1)\)連線
圓柱4:\((-1,0,1)\)和\((1,0,-1)\)連線
圓柱5:\((0,-1,1)\)和\((0,1,-1)\)連線
圓柱6:\((0,-1,-1)\)和\((0,1,1)\)連線

轉換成\(SketcuUp\)程式碼
ent=Sketchup.active_model.entities
center=[[1,-1,0],[-1,-1,0],[1,0,1],[-1,0,1],[0,-1,1],[0,-1,-1]]
normal=[[-2,2,0],[2,2,0],[-2,0,-2],[2,0,-2],[0,2,-2],[0,2,2]]
for i in 0..5
  circle=ent.add_circle center[ i ],normal[ i ],1,60
  circle_face=ent.add_face circle
  circle_face.pushpull 3
  ent.add_group circle_face.all_connected
end
其餘部分就和前面相同
但交集後的模型在6條線的交點處會有折線或斷線,這是比較可惜的地方


參考資料
Moore, M. "Symmetrical Intersections of Right Circular Cylinders." Math. Gaz. 58, 181-185, 1974.
[url]http://mathworld.wolfram.com/SteinmetzSolid.html[/url]
當SketchUp遇見Ruby-邁向程式化建模之路,[url]https://books.google.com.tw/books?id=TsBqCgAAQBAJ&printsec=frontcover&hl=zh-TW#v=onepage&q&f=false[/url]

Joy091 發表於 2022-5-6 16:49

利用牟合方蓋的結果,計算三圓柱相交的體積

另一種想法供參考:
利用對稱性,可將三圓柱相交的體積拆解為6塊局部的牟合方蓋,
再一一貼於某個正立方體的六個面上。

頁: [1]

論壇程式使用 Discuz! Archiver   © 2001-2022 Comsenz Inc.