Mathematica里面,一般的绘制函数图像的号令,都有响应的三维模式。如:Plot和Plot3D,ParametricPlot和ParametricPlot3D,ContourPlot和ContourPlot3D。可是,PolarPlot的三维模式是什么?也就是,平面极坐标的三维模式是什么?谜底是:球坐标。





东西/原料
- 电脑
- Mathematica
方式/步调
- 1
球坐标的画图,用SphericalPlot3D。
举个例子:
SphericalPlot3D[ 1 + 2 Cos[2 \[Theta]], {\[Theta], 0, Pi}, {\[Phi], 0, 2 Pi}]
- 2
画三个齐心半球:
SphericalPlot3D[{1, 2, 3}, {\[Theta], 0, Pi}, {\[Phi], 0, Pi}, PlotPoints -> 30]
- 3
再举一例,此次涉及到复变函数:
SphericalPlot3D[
Re[Sin[\[Theta]] Cos[\[Theta]] Exp[2 I*\[CurlyPhi]]], {\[Theta],
0, \[Pi]}, {\[CurlyPhi], 0, 2 \[Pi]}]
- 4
画图时,去失落坐标轴:
SphericalPlot3D[ 1 + 2 Cos[2 \[Theta]], {\[Theta], 0, Pi}, {\[Phi], 0, 2 Pi}, Axes -> False]
- 5
画图时,去失落外框:
SphericalPlot3D[{1, 2, 3}, {\[Theta], 0, Pi}, {\[Phi], 0, Pi},
PlotPoints -> 30, Boxed -> False]
- 6
画图时,去失落网格线:
SphericalPlot3D[
Re[Sin[\[Theta]] Cos[\[Theta]] Exp[2 I*\[CurlyPhi]]], {\[Theta],
0, \[Pi]}, {\[CurlyPhi], 0, 2 \[Pi]}, Mesh -> None]
- 7
红色,不透明,高光:
SphericalPlot3D[
1 + 2 Cos[2 \[Theta]], {\[Theta], 0, Pi}, {\[Phi], 0, 2 Pi},
PlotStyle -> Directive[Red, Opacity[1], Specularity[White, 10]],
Mesh -> None, PlotPoints -> 30, Axes -> False, Boxed -> False]
蓝色,半透明,高光:
SphericalPlot3D[
1 + 2 Cos[2 \[Theta]], {\[Theta], 0, Pi}, {\[Phi], 0, 2 Pi},
PlotStyle -> Directive[Blue, Opacity[0.7], Specularity[White, 6]],
Mesh -> None, PlotPoints -> 30, Axes -> False, Boxed -> False]
- 8
绿色的半透明“仙人掌”:
SphericalPlot3D[
Re[Sin[\[Theta]] Cos[\[Theta]] Exp[2 I*\[CurlyPhi]]], {\[Theta], 0,
Pi}, {\[CurlyPhi], 0, 2 Pi},
PlotStyle -> Directive[Green, Opacity[0.5], Specularity[White, 6]],
Mesh -> None, PlotPoints -> 30, Axes -> False, Boxed -> False]
- 9
五个楞的“什么瓜”:
SphericalPlot3D[
1 + Sin[5 \[Phi]]/5, {\[Theta], 0, Pi}, {\[Phi], 0, 2 Pi},
PlotStyle -> Directive[Green, Opacity[0.5], Specularity[White, 10]],
Mesh -> None, PlotPoints -> 30, Axes -> False, Boxed -> False]
- 10
色彩渐变:
SphericalPlot3D[
Re[Sin[\[Theta]] Cos[\[Theta]] Exp[2 I*\[CurlyPhi]]], {\[Theta], 0,
Pi}, {\[CurlyPhi], 0, 2 Pi},
ColorFunction -> (ColorData["Rainbow"][#6] &), Mesh -> None,
PlotPoints -> 25, Boxed -> False, Axes -> False]
和
SphericalPlot3D[
1 + Sin[5 \[Phi]]/5, {\[Theta], 0, Pi}, {\[Phi], 0, 2 Pi},
ColorFunction -> (ColorData["Rainbow"][#6] &), Mesh -> None,
PlotPoints -> 25, Boxed -> False, Axes -> False]
注重事项
- Specularity决议图形的高光反射结果。
- Opacity决议图形的透明度。
- 要学会用ColorFunction。
来源:百闻(微信/QQ号:9397569),转载请保留出处和链接!
本文链接:https://www.ibaiwen.com/web/228152.html
- 上一篇: css设置滚动条
- 下一篇: win7系统下,怎么在桌面创建程序的快捷方式
- 热门文章
-
WB蒙特利尔(WB Montreal)——欧美十大最差视频游戏开发商
迅猛龙(Velociraptor)——欧美史前十大死亡动物
什么是果酱猫(What Marmalade Cats)?
神奇蜘蛛侠2(The Amazing Spider-Man 2)——欧美最佳蜘蛛侠电影
希瑟(Heather)——欧美十大最佳柯南灰歌
二人梭哈
奥兹奥斯本(Ozzy Osbourne)——欧美十大高估歌手
faceu激萌怎么把瘦脸开到最大
什么是小脑前下动脉(Anterior Inferior Cerebellar Artery)?
我应该知道康涅狄格州的什么(What Should I Know About Connecticut)?
- 热评文章
- 最新评论
-
- 最近访客
-
- 站点信息
-
- 文章总数:200248
- 页面总数:9
- 分类总数:1
- 标签总数:0
- 评论总数:0
- 浏览总数:497