问题标签 [vispy]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
259 浏览

python - Vispy 转盘相机 - 滚动选项不起作用

我遇到了滚动角在 vispy 转盘相机中不起作用的问题。

即使我给出 30 度的滚动角度,视图也不会旋转。但是方位角、仰角和中心完美地工作。

我在这里的主要目的是为了动画目的滚动相机而不是滚动坦克。(晃动研究)。

在此处输入图像描述

0 投票
1 回答
63 浏览

vispy - 在 vispy 中使用 MatrixTransform 更改立方体的维度

在上面的代码中,如果我添加一个 MatrixTransform,然后旋转立方体然后应用缩放,立方体变成了一个菱形

我想要实现的是在画布中旋转立方体并仅在 X 方向上缩放它,而不会影响其他尺寸

0 投票
0 回答
125 浏览

opengl - 如何将值传递给 vispy 程序中着色器内部声明的结构?

我的片段着色器包含以下结构变量。

在 vispy 上使用

我收到以下错误

我正在使用正确的着色器程序并链接了正确的片段着色器。我认为 vispy 还不支持结构类型,是否有任何解决方法可以传递这些值?

0 投票
1 回答
83 浏览

vispy - 如何使用 vispy 绘制多尺寸?

我使用以下代码在 vispy 中绘制点云

如您所见,我可以为整个数据设置定点大小。
如何在一个数据中设置多种尺寸?

0 投票
1 回答
192 浏览

vispy - 如何使用 vispy 创建图像动画

我发现为不同的程序运行 vispy 非常快,但不幸的是没有教程。

如何使用 vispy 创建图像动画?

0 投票
0 回答
372 浏览

python - 实时绘制动态频谱图

我基本上在三个单独的 numpy 数组中有三个数据点,我想沿 x 轴绘制时间,沿 y 轴绘制频率,幅度应该代表颜色。但这一切都是实时发生的,所以它应该看起来像频谱图在数据更新时自己绘制。

我已经简化了代码以显示我正在运行一个最多需要 10 毫秒才能运行的循环,并且在此期间我从函数中获取新数据。

理想情况下,我希望它尽可能快,而不必重新绘制整个频谱图。似乎 matplolib 不适合绘制动态频谱图,而且我还没有遇到任何动态频谱图示例,所以我想知道如何做到这一点?

0 投票
1 回答
396 浏览

python - How to dynamically add an object to a scene in vispy canvas embedded in wxpython

I want to add an arrow (some object) upon the press of a button. The code is a modified version of the example given in the vispy repository.

I have created the Canvas as given in the example and tried to instantiate it from the mainFrame. All the objects that are given in the __init__ of the Canvas class are created. If I want to add any new object after the GUI is created with the press of a button, I am unable to access the view in the Canvas class from the mainFrame. Or is there any other way to achieve this.

Update: Here is the code after following the suggestions given in the comments:

The code now runs without any error which means the arrow is probably added but the scene is not updated.

0 投票
2 回答
189 浏览

python-3.x - `vispy.visuals.GraphVisual` 没有可用的示例。我的代码只显示空白屏幕

我尝试使用谷歌搜索并拼凑来自许多来源的示例。这是我所拥有的:

输出是一个空白(黑色)屏幕,没有其他任何显示。

我的目标是使用 VisPy 显示一个简单的网络图。你有没有让这个工作,你能发布你的代码/相关代码吗?

0 投票
1 回答
131 浏览

python - Spyder IDE 不显示 VispyWidget / Vispy 绘图

我对 python 和 spyder IDE 很陌生。

我有一个问题,spyder IDE 无法从 vispy 示例中绘制示例。

我使用的示例是 gpuimages.py,您可以在下面的链接中查看源代码:

https://github.com/vispy/vispy/blob/master/examples/basics/gloo/gpuimage.py

Spyder 的输出:

但是,如果我使用命令提示符手动运行脚本,它将顺利运行该图。使用 python 命令

我能够得到输出。

那么,帮助我如何配置 spyder 来运行 Vispy 示例?

0 投票
1 回答
148 浏览

python - 使用 vispy Rectangle 创建条形图

我正在尝试使用 Vispy 创建条形图,因为我倾向于使用 opengl 来处理大量数据。

从 vispy 文档中,我找到了 visuals.Rectangle 类,它为我提供了一个“栏”。不幸的是,这个类只需要一组点,所以我试图在一个循环中创建多个矩形。此时,情节已经在几个矩形处变慢了,100-1000 已经很糟糕了。显然,这是创建将我带到这里的图表的错误方法。如何在不单独添加每个矩形的情况下创建多个矩形?

这是一个片段: