python - 3d 网格上描述符的着色函数
问题描述
过程是这样的:
我将 3d 网格表示为图形数据结构(邻接矩阵),并从中提取了一些特征,现在我想在网格上可视化这些特征(着色与之相关的顶点)
我可以访问 XYZ 坐标,
图表是这样的,例如:
[[0 0 0 ... 0 0 1]
[0 0 0 ... 0 0 1]
[0 0 0 ... 0 0 1]
...
[0 0 0 ... 0 1 0]
[0 0 0 ... 1 0 0]
[1 1 1 ... 0 0 0]]
提取的特征如下:
[0.31830989 0.13789404 0.18738977 0.21210616 0.09979722 0.25386089
0.16402911 0.29690689 0.26002601 0.12894862 0.07586501 0.48601007
0.45855364 0.20280874 0.0126834 0.54532024 0.46835978 0.34243193
0.13314587 0.09234412 0.03764165 0.159134 0.45475221 0.1222509
0.17898168]
或喜欢
[[ 2.72000000e+03+0.00000000e+00j -3.61459783e+00-2.59278293e+00j
-2.07518936e+00+5.47244984e+01j ... 4.54069829e+00-1.92151511e+01j
-2.07518936e+00-5.47244984e+01j -3.61459783e+00+2.59278293e+00j]
[-3.61459783e+00-2.59278293e+00j 1.58768982e+01+9.65807617e+01j
5.20680975e+01+3.99595074e+01j ... -4.99445026e+01+7.24088068e+00j
9.35655863e+01-1.21058601e+02j 2.50985585e+03-2.57571742e-14j]
[-2.07518936e+00+5.47244984e+01j 5.20680975e+01+3.99595074e+01j
6.55872731e+01+3.73890215e+01j ... 2.02088720e+02-2.45776099e+02j
2.02739503e+03-2.13162821e-14j 9.35655863e+01+1.21058601e+02j]
...
[ 4.54069829e+00-1.92151511e+01j -4.99445026e+01+7.24088068e+00j
2.02088720e+02-2.45776099e+02j ... 8.57571900e+01-4.22466723e+02j
-1.06818420e+02-3.69249733e+01j 4.09731773e+01-3.35297094e+01j]
[-2.07518936e+00-5.47244984e+01j 9.35655863e+01-1.21058601e+02j
2.02739503e+03-3.28626015e-14j ... -1.06818420e+02-3.69249733e+01j
6.55872731e+01-3.73890215e+01j 5.20680975e+01-3.99595074e+01j]
[-3.61459783e+00+2.59278293e+00j 2.50985585e+03-3.95239397e-14j
9.35655863e+01+1.21058601e+02j ... 4.09731773e+01-3.35297094e+01j
5.20680975e+01-3.99595074e+01j 1.58768982e+01-9.65807617e+01j]]
所以问题又来了:我如何在网格上可视化这些特征,基本上它是坐标、边、面。
解决方案
我最终得到了 Marco Musy 的答案,使用他的图书馆vedo
基本上有无数种基于颜色(显然只是一维)或其他对象(如表示矢量的箭头)或其他简单对象(在本例中称为 Glyphs)来可视化网格属性的方法。
要点(我可能错了或者误解了你!)是你只有网格的一部分点的信息,并且你想将这些信息外推到剩余的点。我在这里的回答中解决了这个问题:
https://github.com/marcomusy/vtkplotter/issues/83#issuecomment-574625775
您可能会发现对可视化有用的其他示例可能是:
https://github.com/marcomusy/vtkplotter-examples/blob/master/vtkplotter_examples/basic/glyphs.py
插值向量:
推荐阅读
- android - 自定义 Spinner ImageView 默认显示在 Spinner Title 中
- git - 如何在不强制推送的情况下撤消先前的提交?
- procmail - Procmail 自动创建新文件夹来存储来自新发件人的电子邮件
- c++ - 释放 cgo 库的内存
- java - HASHMAP - 阈值和负载因子和容量
- anychart - 如何将 Anychart Stockchart 与非等距数据点结合起来?
- c# - C# 中的 Azure 信息保护和敏感性选项?
- c# - 如何从.Net Core中的单独类库中获取经过身份验证的用户
- css - PrimeNG 中带有样式的 Turbo 表
- reinforcement-learning - 双摆复位