代码之家  ›  专栏  ›  技术社区  ›  Ongky Denny Wijaya

无法在MAPLE中在一个图形中绘制2个曲面(3dplot)

  •  0
  • Ongky Denny Wijaya  · 技术社区  · 10 月前

    我想在MAPLE中绘制一个图形中的球体z=sqrt(4-x^2-y^2)和圆锥体z=sqert(x^2+y^2)。 我只能在一个图形中绘制一个情节。

    plot3d(sqrt(-x^2-y^2+4), x = -2 .. 2, y = -2 .. 2)
    

    如何在MAPLE中在一个图形中绘制两个曲面(3dplot)?

    1 回复  |  直到 10 月前
        1
  •  1
  •   Akhilesh Pandey    10 月前

    在MAPLE中将两个三维曲面绘制在一个图形中,可以使用 display 的函数 plots 包裹以下是如何对球体(z=\sqrt{4-x^2-y^2})和圆锥体(z=\ sqrt{x^2+y^2})执行此操作:

    1. 首先,确保加载 绘图 包裹
    2. 然后,创建两个单独的绘图。
    3. 最后,使用 陈列 作用

    密码

    with(plots):
    
    # Define the sphere surface
    sphere := plot3d(sqrt(4 - x^2 - y^2), x = -2 .. 2, y = -2 .. 2, color = red, transparency = 0.5):
    
    # Define the cone surface
    cone := plot3d(sqrt(x^2 + y^2), x = -2 .. 2, y = -2 .. 2, color = blue, transparency = 0.5):
    
    # Display both plots in one figure
    display([sphere, cone]);
    
    推荐文章