bugmens 發表於 2020-1-19 13:40
[img]https://math.pro/db/attachment.php?aid=5324&k=d39faf8a3a50b8cc20bfe17a0fe2d360&t=1579408620&noupdate=yes¬humb=yes[/img]
數學圖形素描教室:用旋轉曲面、多面體、拓樸形狀來創作!結合數學與美學的全新領域
数学デッサン教室 描いて楽しむ数学のかたち
作者: 瑞慶山 香佳
譯者: 陳朕疆
出版社:台灣東販
出版日期:2019/10/28
節錄書中蘋果曲面參數式
◎蘋果曲面的製作方法
該怎麼建構出蘋果曲面呢?讓我們來看看製作方法吧。
①建構出一個環面。
\(\cases{x=(4+cos u)cos v \cr y=(4+cos u)sin v \cr z=5 sin u},-\pi \le u \le \pi,0 \le v \le 2 \pi\)
②調整成接近角狀環面的形狀。
\(\cases{x=(4+3.8cos u)cos v \cr y=(4+3.8 cos u)sin v \cr z=5sin u},-\pi \le u \le \pi,0\le v \le 2 \pi\)
③調整成上方較胖,下方較瘦的形狀。
\(\cases{x=(4+3.8 cos u)cos v \cr y=(4+3.8 cos u)sin v \cr z=5sin u+2 cos u},-\pi \le u \le \pi,0\le v \le 2\pi\)
④建構出蘋果的芯。
\(\cases{x=(4+3.8 cos u)cos v \cr y=(4+3.8 cos u)sin v \cr z=-5log_{10}(1-0.315u)+5sin u+2 cos u},-\pi \le u \le \pi,0\le v \le 2\pi\)
[color=green]以前要先載入draw.lisp才能使用draw3d指令
但現在draw3d已經是maxima內建指令不再需要先載入draw.lisp[/color]
[color=red](%i1)[/color] [color=blue]load("draw");[/color]
[color=red](%o1)[/color] [i]C:/maxima-5.43.0/share/maxima/5.43.0/share/draw/draw.lisp[/i]
[color=green]以vtk當作渲染器[/color]
[color=red](%i2)[/color] [color=blue]draw_renderer: 'vtk;[/color]
[color=red](%o2)[/color] [i]vtk[/i]
[color=green]①建構出一個環面[/color]
[color=red](%i6)[/color]
[color=blue]x: (4+cos(u))*cos(v);
y: (4+cos(u))*sin(v);
z:5*sin(u);
draw3d(enhanced3d=true,
parametric_surface(x,y,z,u,-%pi,%pi,v,0,2*%pi));[/color]
[color=red](x)[/color] \((cos(u)+4)cos(v)\)
[color=red](y)[/color] \((cos(u)+4)sin(v)\)
[color=red](z)[/color] \(5sin(u)\)
[color=red](%o6)[/color] [i]done[/i]
[img]https://math.pro/db/attachment.php?aid=5325&k=bd81c55c7444b8f7841f035f11a97f60&t=1579408620&noupdate=yes¬humb=yes[/img]
[color=green]②調整成接近角狀環面的形狀[/color]
[color=red](%i10)[/color]
[color=blue]x: (4+3.8*cos(u))*cos(v);
y: (4+3.8*cos(u))*sin(v);
z:5*sin(u);
draw3d(enhanced3d=true,
parametric_surface(x,y,z,u,-%pi,%pi,v,0,2*%pi));[/color]
[color=red](x)[/color] \((3.8cos(u)+4)cos(v)\)
[color=red](y)[/color] \((3.8cos(u)+4)sin(v)\)
[color=red](z)[/color] \(5sin(u)\)
[color=red](%o10)[/color] [i]done[/i]
[img]https://math.pro/db/attachment.php?aid=5326&k=edb7a6516cab6720e702795349792cb9&t=1579408620&noupdate=yes¬humb=yes[/img]
[color=green]③調整成上方較胖,下方較瘦的形狀[/color]
[color=red](%i14)[/color]
[color=blue]x: (4+3.8*cos(u))*cos(v);
y: (4+3.8*cos(u))*sin(v);
z:5*sin(u)+2*cos(u);
draw3d(enhanced3d=true,
parametric_surface(x,y,z,u,-%pi,%pi,v,0,2*%pi));[/color]
[color=red](x)[/color] \((3.8cos(u)+4)cos(v)\)
[color=red](y)[/color] \((3.8cos(u)+4)sin(v)\)
[color=red](z)[/color] \(5sin(u)+2cos(u)\)
[color=red](%o14)[/color] [i]done[/i]
[img]https://math.pro/db/attachment.php?aid=5327&k=4796a570931385c04f99ba40430e12ec&t=1579408620&noupdate=yes¬humb=yes[/img]
[color=green]④建構出蘋果的芯[/color]
[color=red](%i18)[/color]
[color=blue]x: (4+3.8*cos(u))*cos(v);
y: (4+3.8*cos(u))*sin(v);
z:-5*log(1-0.315*u)/log(10)+5*sin(u)+2*cos(u);
draw3d(enhanced3d=true,
parametric_surface(x,y,z,u,-%pi,%pi,v,0,2*%pi));[/color]
[color=red](x)[/color] \((3.8cos(u)+4)cos(v)\)
[color=red](y)[/color] \((3.8cos(u)+4)sin(v)\)
[color=red](z)[/color] \(\displaystyle 5sin(u)+2cos(u)-\frac{5log(1-0.315u)}{log(10)}\)
[color=red](%o18)[/color] [i]done[/i]
[img]https://math.pro/db/attachment.php?aid=5328&k=936c2b8e2dd1331c0d7714ae1eebd557&t=1579408620&noupdate=yes¬humb=yes[/img]