2011-09-15 31 views
5

Làm thế nào để vẽ đồ thị ví dụ một mặt phẳng và một đường thẳng trong cùng một ô 3D?Lô, mặt phẳng, điểm, đường thẳng, hình cầu trong cùng một ô 3D. Nhiều số liệu trong cùng một lô trong Mathematica

+2

Y Bạn có thể muốn nghiên cứu một số tài liệu tham khảo trong http://reference.wolfram.com/mathematica/guide/SymbolicGraphicsLanguage.html và http://reference.wolfram.com/mathematica/tutorial/GraphicsAndSoundOverview.html –

Trả lời

8

ShowPlot3D có thể xử lý. Có lẽ có nhiều cách khác.

l = Line[{{-2, -2, 41}, {6, 4, -10}}]; 

Show[{Plot3D[{2 x + 7 y}, {x, -2, 5}, {y, -2, 5}, AxesLabel -> {x, y, z}], 
     Graphics3D[{Thick, l}]}] 

Plot3D

8

Chỉ cần khoe: enter image description here

Manipulate[ 

Show[ 
    {Plot3D[ {1}, {x, -1, 1}, {y, -1, 1}, PlotRange -> {-1, 1}, Mesh -> False], 
    Plot3D[{-1}, {x, -1, 1}, {y, -1, 1},      Mesh -> False], 
    ParametricPlot3D[{{[email protected], [email protected], 1}, {[email protected], [email protected], -1}}, {t, 0, 2 Pi}], 
    Graphics3D[ 
    {Table[{Hue[n/10], Thick, Line[{{Re[#], Im[#], 1}, {-z Re[#], -z Im[#], z}}&@ 
     Exp[n 2 I Pi/10]]}, {n, 10}], 
    Sphere[{0, 0, 0}, .3]}]}], 
    {z, 1, -1}] 
+0

Disco disco :) god việc làm! – Joelmob

+0

Có lẽ một liên lạc của 'BoxRatios' sẽ làm tốt. Quả cầu là một tad phẳng ... –

+0

@Sjoerd Đó là nghệ sĩ bên trong tôi –

7

tôi không thể cưỡng lại một trong hai ...

enter image description here

GraphicsGrid[ 
{ 
    {ContourPlot3D[x + 2 y + 3 z , {x, -2, 2}, {y, -2, 2}, {z, -2, 2}, 
    Contours -> {0}, Axes -> None, ColorFunction -> (White &), 
    Lighting -> "Neutral"], 
    Style["One plane", FontFamily -> "Comic Sans MS", 36, Bold]}, 
    {ContourPlot3D[x + 2 y + 3 z , {x, -2, 2}, {y, -2, 2}, {z, -2, 2}, 
    Contours -> {0, 5}, Axes -> None, ColorFunction -> (Green &), 
    Lighting -> "Neutral"], 
    Style["Two plane", FontFamily -> "Comic Sans MS", 36, Bold]}, 
    {ContourPlot3D[x + 2 y + 3 z , {x, -2, 2}, {y, -2, 2}, {z, -2, 2}, 
    Contours -> {0}, Axes -> None, ColorFunction -> (Red &), 
    Lighting -> "Neutral"], 
    Style["Red plane", FontFamily -> "Comic Sans MS", 36, Bold]}, 
    {Show[ 
    ContourPlot3D[x + 2 y + 3 z , {x, -2, 2}, {y, -2, 2}, {z, -2, 2}, 
    Contours -> {0}, Axes -> None, ColorFunction -> (Blue &), 
    Lighting -> "Neutral"], 
    Graphics3D[{Orange, Thickness[0.01], 
     Line[{{-2, -2, -2}, {2, 2, 2}}]}] 
    ], Style["Blue plane", FontFamily -> "Comic Sans MS", 36, Bold]} 
    } 
] 
+3

@David Trước khi bạn nhận xét: Tôi biết số nhiều của 'mặt phẳng' ;-) –

+0

Tất nhiên. BTW, tôi đánh giá cao sự tham khảo của Tiến sĩ Zeuss. – DavidC

+0

@David Đối với những người không phải là Dr. Seuss-enlightened, hãy xem http://en.wikipedia.org/wiki/One_Fish_Two_Fish_Red_Fish_Blue_Fish –

Các vấn đề liên quan