Comments (5)
Thanks, I'll keep this open and dive into it later, maybe it is possible more efficiently.
from ipyvolume.
Hi Eric,
I've modified the docs, it is only possible to specify per vertex properties, and these will be interpolated (at least that I know of, for WebGL).
A workaround is thus to duplicate the vertices:
ipv.figure()
colors = np.ones((6,3))*.3
colors[:3, 2] = 1.0
colors[3:, 0] = 1.0
x = [0, 3., 3., 0, 0., 3.]
y = [0, 0., 4., 0, 4., 4.]
z = [1, 0., 1., 1, 0., 1.]
ipv.plot_trisurf(x, y, z,
triangles=[[0, 1, 2], [3, 5, 4]], color=colors)
ipv.show()
Maybe it's an idea to have face_colors supported, that would do this automatically.
I've also updated the documentation for this. Let me know if this solves it.
cheers,
Maarten
from ipyvolume.
Hi Maarten,
Yes, the docs update will be helpful for others, and for now I can duplicate the vertices as you suggest. I'm doing some tests with fairly large meshes β O(10^6) vertices from a research weather radarΒ β so there is some downside to duplicating, but I should still be ok.
In the future, +1 for face_colors support!
Thanks,
Eric
from ipyvolume.
Another thought: I was using the face_colors support in vispy in some earlier tests. Not sure if they also auto-duplicated vertices, or if they used some lower-level GL support for face colors.
from ipyvolume.
I think this can be done at the kernel side first, I guess face_colors
and triangle_colors
arguments to plot_* would need to sort out the duplication of vertices manually.
from ipyvolume.
Related Issues (20)
- Slicing for 3D volume does not work HOT 1
- Notebook with ipyvolume not working : install problem ? HOT 9
- Error in JupyterLab HOT 1
- Creating movie from 3D Arrays
- Ambient lighting example in documentation no longer works
- 404 GET Errors When Trying to Run ipyvolume on Jupyter Notebook HOT 6
- Developer installation HOT 4
- 3D bar chart ? HOT 1
- Update @jupyterlab/builder for better metadata, fewer deps
- Ipyvolume cannot be imported in Jupyterlite: KeyError: 'emscripten' HOT 3
- Multi volume imaging example not working on 0.6.0 HOT 1
- quickvolshow and showvol crashes on VS Code HOT 3
- type object 'DataImage' has no attribute '_instance_inits' when importing ipyvolume HOT 3
- accept python lists in pylab.plot (not only numpy)
- Some frames are empty in animated scatter HOT 1
- Failed to create view for 'ScatterView' from module 'ipyvolume' with model 'ScatterModel' from module 'ipyvolume' undefined HOT 1
- Plots not rendering in Google Colab HOT 3
- Error when changing Camera HOT 2
- Syntaxis error in widgets.py: HOT 2
- Volshow and Scatter plot issues HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ipyvolume.