Comments (3)
In 3D, rotation is a bit more complex because there are 3 axes to rotate around rather than just one which means that you'll need 6 keys instead of just 4 to control them all (assuming you're interested in all 3).
As for actually controlling the orientation, the only function vtkplotlib provides is view() which sets absolute orientations using unit vectors but I imagine that you want the exact opposite - to incrementally adjust the orientation using yaw, pitch and roll angles. In which case you can use VTK's own methods directly. The camera is located at fig.camera
. To give you an example:
import vtkplotlib as vpl
fig = vpl.figure()
vpl.mesh_plot(vpl.data.get_rabbit_stl())
text = vpl.text("", color="r")
while True:
text.text = "Incrementing Yaw"
for i in range(120):
fig.camera.Yaw(3)
fig.reset_camera()
fig.update()
text.text = "Incrementing Pitch"
for i in range(120):
fig.camera.Pitch(3)
fig.reset_camera()
fig.update()
text.text = "Incrementing Roll"
for i in range(120):
fig.camera.Roll(3)
fig.reset_camera()
fig.update()
from vtkplotlib.
Thank you - that was very useful!
from vtkplotlib.
You're welcome.
from vtkplotlib.
Related Issues (14)
- "Ghost" artifact of other open tabs during screenshot - Ubuntu 18.04 HOT 16
- Object manipulation with draggable arrows HOT 7
- Background transparency HOT 6
- Performance improvement HOT 8
- TRABAJO CON vtkplotlib HOT 1
- Save stl data into image files (jpg, png,...)
- How to change 2d text dynamicly? HOT 1
- Problem with non interactive visualization? HOT 13
- Displaying images as 3D objects HOT 2
- Display overlapping meshes HOT 2
- How to add stl display to tkinter? HOT 1
- Error with Sys module when trying to make pipenv with extended test dependencies HOT 2
- Saving mesh_plot to image?
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 vtkplotlib.