• <noscript id="ecgc0"><kbd id="ecgc0"></kbd></noscript>
    <menu id="ecgc0"></menu>
  • <tt id="ecgc0"></tt>

    Mathematica繪制函數圖像—三維“極坐標”

            Mathematica里面,一般的繪制函數圖像的號令,都有響應的三維模式。如:Plot和Plot3D,ParametricPlot和ParametricPlot3D,ContourPlot和ContourPlot3D。可是,PolarPlot的三維模式是什么?也就是,平面極坐標的三維模式是什么?謎底是:球坐標

    東西/原料

    • 電腦
    • Mathematica

    方式/步調

    1. 1

              球坐標的畫圖,用SphericalPlot3D

              舉個例子:

      SphericalPlot3D[ 1 + 2 Cos[2 \[Theta]], {\[Theta], 0, Pi}, {\[Phi], 0, 2 Pi}]

    2. 2

              畫三個齊心半球:

      SphericalPlot3D[{1, 2, 3}, {\[Theta], 0, Pi}, {\[Phi], 0, Pi},  PlotPoints -> 30]

    3. 3

              再舉一例,此次涉及到復變函數:

      SphericalPlot3D[

       Re[Sin[\[Theta]] Cos[\[Theta]] Exp[2 I*\[CurlyPhi]]], {\[Theta], 

        0, \[Pi]}, {\[CurlyPhi], 0, 2 \[Pi]}]

    4. 4

              畫圖時,去失落坐標軸:

      SphericalPlot3D[ 1 + 2 Cos[2 \[Theta]], {\[Theta], 0, Pi}, {\[Phi], 0, 2 Pi},  Axes -> False]

    5. 5

              畫圖時,去失落外框:

      SphericalPlot3D[{1, 2, 3}, {\[Theta], 0, Pi}, {\[Phi], 0, Pi}, 

       PlotPoints -> 30, Boxed -> False]

    6. 6

              畫圖時,去失落網格線:

      SphericalPlot3D[

       Re[Sin[\[Theta]] Cos[\[Theta]] Exp[2 I*\[CurlyPhi]]], {\[Theta], 

        0, \[Pi]}, {\[CurlyPhi], 0, 2 \[Pi]}, Mesh -> None]

    7. 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. 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. 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. 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。
    • 發表于 2018-07-26 00:00
    • 閱讀 ( 1519 )
    • 分類:其他類型

    0 條評論

    請先 登錄 后評論
    聯系我們:uytrv@hotmail.com 問答工具
  • <noscript id="ecgc0"><kbd id="ecgc0"></kbd></noscript>
    <menu id="ecgc0"></menu>
  • <tt id="ecgc0"></tt>
    久久久久精品国产麻豆