慢3D旋转抗锯齿Mathematica中7 [英] Slow 3D rotation with antialiasing in Mathematica 7

查看:220
本文介绍了慢3D旋转抗锯齿Mathematica中7的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

数学的7抗锯齿关闭三维表面旋转速度非常快,流畅。然而,打开抗锯齿,甚至在中等水平,大大降低了渲染的帧速率,使得旋转非常不连贯。这发生在一个更大程度的数学的比它在其他的3D应用程序。

3D surface rotation in Mathematica 7 with anti-aliasing turned off is very fast and smooth. However, turning on anti-aliasing, even at a moderate level, drastically reduces the rendered frame rate, making rotation very choppy. This happens to a much greater degree in Mathematica than it does in other 3D applications.

  1. 为什么抗锯齿不成比例放缓的数学的?

一个方法,大大提升了3D图形的感觉是在旋转过程中关闭AA,但打开它,一旦停止旋转。能在这样做的数学的7?

A way to greatly enhance the feel of 3D graphics would be to turn off AA during rotation, but turn it on as soon as rotation is stopped. Can this be done in Mathematica 7?

请求的例子。我会用迈克的code的变化。请尝试使用编辑&gt以下; preferences>外观>图形首选项设置为无抗锯齿然后最高质量。也可以尝试在的设置。对于我来说,除了无抗锯齿任何设置并不顺利。我可以在视觉上区分三个不同层次的AA,所以这不是我的GPU迫使全或无,事项尚未全部都是缓慢的。


An example was requested. I will use a variation of Mike's code. Please try the following with Edit > Preferences > Appearance > Graphics first set to No antialiasing and then Highest quality. Also try the settings in between. For me, any setting besides No antialiasing is not smooth. I can visually distinguish three different levels of AA, so it is not a matter of my GPU forcing all or none, yet all of them are slow.

Animate[Plot3D[{x^2 + y^2, -x^2 - y^2}, {x, -2, 2}, {y, -2, 2},
  ImageSize -> 700,
  ViewPoint -> 
   Dynamic[{Sin[theta] Cos[phi], Sin[theta] Sin[phi], Cos[theta]}]],
 {theta, 0, Pi}, {phi, 0, 2 Pi},
 RefreshRate -> 120
]


更新和观察

在与阿列克谢和迈克的code玩耍,一些奇怪的事情,良好的发生。我突然有流畅的抗锯齿旋转!我不知道是什么precipitated的变化,我也没有关闭的数学的,因为担心它会自动消失,但是这证明了我的怀疑,它可以快速的。


UPDATE and OBSERVATION

While playing around with Alexey and Mike's code, something strange and good happened. I suddenly have smooth antialiased rotation! I don't know what precipitated the change, and I have not closed Mathematica for fear that it will go away, but this proves what I suspected, that it CAN be fast.

更奇怪的,我有慢而快的行为发生的并行的在同一个笔记本上。一个图形旋转顺畅,另一种生产具有相同code是波涛汹涌。我的理论认为一些小区选项运行阿列克谢和迈克的code修饰,它有一个非常理想的效果。我会尽我所能弄清楚它是什么。

More strange, I have the slow and fast behavior happening in parallel in the same notebook. One graphic is rotating smoothly, and another produced with the same code is choppy. I theorize that some cell option was modified by running Alexey and Mike's code, and it is having a very desirable effect. I am going to do my best to figure out what it is.

乐于助人的选择是 RotationAction - > 剪辑,SphericalRegion - >真中出现的阿列克谢的code顺便说一句。这些,或者它们的效果( ViewAngle ),大棒与以同样的方式一个图形的旋转呢,所以我能够不使用这些选项键入新的code过老,并运行它,并仍然得到平滑的旋转(这也解释了我所看到的上面)。请参阅下面的答案一些阐述。

The helpful options were RotationAction -> "Clip", SphericalRegion -> True that appeared in Alexey's code incidentally. These, or their effect (ViewAngle), "stick" with a graphic in the same way that rotation does, therefore I was able to type new code without these options over the old, and run it, and still get the smooth rotation (which explains what I saw above). See answers below for some elaboration.

在一个可行的解决方法已被发现,我仍然有兴趣与机管局在波涛汹涌的旋转的解释。我不相信,装修的图形是一个解释,而仅仅是相关性,由于配件仍然需要发生与AA关闭,但由于旋转平滑。

While a viable workaround has been discovered, I am still interested in an explanation for the choppy rotation with AA on. I do not believe that the "fitting" of the graphic is an explanation, but merely a correlation, as the fitting still needs to take place with AA off, and yet the rotation is smooth.

推荐答案

我似乎已经发现了,我的配置,这似乎是一个神奇的选项,可实现平滑的3D旋转与全抗锯齿。这适用于所有的3D绘图型我都试过了,因此除非这也神奇地停止工作,我有我的解决方案。我很有兴趣知道,如果这对其他系统相同的效果。

I appear to have discovered, for my configuration, what appears to be a magic option that allows for smooth 3D rotation with full antialiasing on. This works for every 3D plot type I have tried, therefore unless this also magically stops working, I have my solution. I am very interested to know if this has the same effect on other systems.

神奇的选项是 ViewAngle 。任何数值似乎工作; 自动不会。

The magic option is ViewAngle. Any numeric value appears to work; Automatic does not.

评价的code以下,第一图形旋转不佳,并且第二图形平滑地转动。

Evaluating the code below, the first graphic rotates poorly, and the second graphic rotates smoothly.

Plot3D[Sin[x + y^2], {x, -3, 3}, {y, -2, 2}, ImageSize -> 900]

Plot3D[Sin[x + y^2], {x, -3, 3}, {y, -2, 2}, ImageSize -> 900, ViewAngle -> 0.43]


我有一个问题,Mike的 RotationAction - > 剪辑方法,当旋转图形我得到意想不到的,有时甚至极端的裁剪。然而,加入 SphericalRegion - >真恢复,我得到与 ViewAngle 的行为,角度会自动选择:


I have a problem with Mike's RotationAction -> "Clip" method, in that I get unexpected and sometimes extreme cropping when rotate the graphic. However, adding SphericalRegion -> True restores the behavior that I get with ViewAngle, and the angle is chosen automatically:

Plot3D[{x^2 + y^2, -(x^2 + y^2)}, {x, -2, +2}, {y, -2, +2}, 
 ImageSize -> 700, SphericalRegion -> True, RotationAction -> "Clip"]

这篇关于慢3D旋转抗锯齿Mathematica中7的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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