【问题标题】:gnuplot: 3d chart painted in one color, but with shading effect (as usual 3d model)gnuplot:以一种颜色绘制的 3d 图表,但具有阴影效果(与通常的 3d 模型一样)
【发布时间】:2019-07-29 10:27:02
【问题描述】:

您能告诉我们如何用一种颜色绘制 3d 图表,但带有阴影效果吗?

使用任何pm3d 都会根据 z 的值给出颜色,我不需要,而且实际上(视觉上)不会产生阴影

我希望将图表绘制成普通的 3d 模型(就像普通的 3d 编辑器一样)

现在我正在使用一个我不满意的选项:

    set hidden3d
    set pm3d
    set palette rgbformulae 22,13,-31

    splot inputFullPath using 2:1:4 with pm3d notitle

我想看看这种 3d 图表:

【问题讨论】:

    标签: graph 3d gnuplot shadow


    【解决方案1】:

    在 gnuplot 5.2 版中引入了一个带有镜面高光的简单 3D 光照模型。见help lighting。这是文档中的一段和在线演示集的链接。

    gnuplot> help lighting
    
     By default the colors assigned to pm3d objects are not dependent on orientation
     or viewing angle. This state corresponds to `set pm3d nolighting`.
     The command `set pm3d lighting` selects a simple lighting model consisting of a
     single fixed source of illumination contributing 50% of the overall lighting.
     The strength of this light relative to the ambient illumination can be adjusted
     by `set pm3d lighting primary <fraction>`.  Inclusion of specular highlighting
     can be adjusted by setting a fractional contribution:
          set pm3d lighting primary 0.50 specular 0.0   # no highlights
          set pm3d lighting primary 0.50 specular 0.6   # strong highlights
    

    link to lighting demo from online collection

    【讨论】:

      猜你喜欢
      • 2019-09-17
      • 2021-10-27
      • 1970-01-01
      • 1970-01-01
      • 2018-11-22
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多