MATLAB Figure Rendering:OpenGL vs.Painters? [英] MATLAB Figure Rendering: OpenGL vs. Painters?

查看:393
本文介绍了MATLAB Figure Rendering:OpenGL vs.Painters?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于将哪个渲染器用于MATLAB图形或何时重要,我一无所知,但是我遇到了某些确实重要的示例:

I'm clueless when it comes to which renderer to use for MATLAB figures or when it matters, but I have come across certain examples where it does matter:

plot(0,0,'ko','markersize',50,'linewidth',8);
set(gcf,'renderer','opengl');
set(gcf,'renderer','painters');

左= OpenGL,右=画家:

(运行Windows 7 Professional和MATLAB R2015b)

(running Windows 7 Professional and MATLAB R2015b)

使用OpenGL渲染器有时会比Painters产生更好的结果吗?通常,两个渲染器有何不同?

Are there times when using the OpenGL renderer produces better results than Painters? In general how do the two renderers differ?

推荐答案

这些是我所知道的差异

  • OpenGL是默认渲染器
  • OpenGL允许绘制透明度而Painter不允许
  • 如果使用OpenGL时出现图形错误或Matlab崩溃,请使用Painter
  • 选择Painter以后记格式导出图形.使用OpenGL 当图形变得过于复杂时,Matlab将另存为位图,并且您将无法对其进行编辑.
  • OpenGL is the default renderer
  • OpenGL allows to plot transparency and Painter does not
  • If there is a graphical bug when using OpenGL or if Matlab crashes, use Painter
  • Select Painter to export figures in postscript format. Using OpenGL when the figure gets too complex, Matlab saves as Bitmap and you cannot edit it.

Mathworks网站(向下滚动到渲染器"):

  • 'opengl'-OpenGL®渲染器.该选项使MATLAB可以访问 图形硬件(如果系统上可用). OpenGL的 渲染器显示按从前到后的顺序排序的对象,如 显示器.线始终在同一面时在面的前面绘制 在显示器平面上的位置.

  • 'opengl' — OpenGL® renderer. This option enables MATLAB to access graphics hardware if it is available on your system. The OpenGL renderer displays objects sorted in front to back order, as seen on the monitor. Lines always draw in front of faces when at the same location on the plane of the monitor.

'painters'-画家渲染器.此选项对轴中的轴效果很好 2D视图.在2-D中,Painters渲染器按以下方式对图形对象进行排序 子订单(指定的订单).在3-D中,Painters渲染器进行排序 对象从前到后的顺序.但是,它可能无法正确绘制 在3D中相交的多边形.

'painters' — Painters renderer. This option works well for axes in a 2-D view. In 2-D, the Painters renderer sorts graphics objects by child order (order specified). In 3-D, the Painters renderer sorts objects in front to back order. However, it might not correctly draw intersecting polygons in 3-D.

另请参见以下链接有关解决OpenGL的低级图形问题.

See also this link on fixing low level graphics issues with OpenGL.

这篇关于MATLAB Figure Rendering:OpenGL vs.Painters?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆