Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
Looking for a library or framework to aid me with the following:
I receive (x,y,z) vectors every few milliseconds telling me how an object is moving. I want to draw a point in the center of the screen to start, and have it move about - outlining its path - until I tell it to stop.
Being in 3D, I'd need some easy way to rotate or pan around this animation to get different perspectives.
Any recommendations for what to use in Python to accomplish this? Maybe a simple game/graphics library?
I believe that PyOpenGL will give you access directly to OpenGL from python.
You could use pyqtgraph. I have been using it for 3d graphics plots. It has a method scatterplot that is quick in updating a point on the screen. You can also access the view with azimuth and elevation to orbit around the object. http://www.pyqtgraph.org/documentation/3dgraphics/glscatterplotitem.html it uses pyopengl underneath, but its a fast and simple way to access those functions.
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
As part of my UI, I want to display graphs. The requirements are:
The graph must respond to events (e.g. mouse clicks).
If the graph is directed I want nice arrows.
If there are several edges spanning two nodes I want to display several edges.
The layout must be nice.
Now, there are two libraries: networkx and graphviz that can do some of those things. networkx can do 1 and (with some major hacks) 2. graphviz can do 2 and 3. 4 can be done by either library.
I would actually prefer to use graphviz because that would eliminate some dependencies; however, its inability to interact with matplotlib is a major problem.
Therefore, at the moment I am stuck with networkx, have to use a hack for arrows and abandon the idea of parallel edges.
My question is: Is this the state of the art or there is some other approach I could try?
Another question: Is it better to use a different language for graph visualization? For example, would it make sense to move all UI/visualization to JavaScript, while keeping Python only for data analysis?
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
Just wondering if there was any easy way to create collision events on a Tkinter canvas, as I am attempting to create a game in Tkinter.
I have seen some complex ways, but I was wondering if there was a simple solution.
I have been using Tkinter much longer than I have been using pygame, so I would prefer to stick to Tkinter.
There is no built-in collision detection, other than the find_overlapping and find_enclosed methods of the canvas which can find objects that overlap or are enclosed by a rectangular region (and the fact that you can get the rectangular bounding box of any object).
You can create your own with tkinter's bbox to check if the collisions happen or to make your desired effect. you can use other great words in that link to help you on get your collision engine be nice and running.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 3 years ago.
Improve this question
I am looking for a library, example or similar that allows me to loads a set of 2D projections of an object and then converts it into a 3D volume.
For example, I could have 6 pictures of a small toy and the program should allow me to view it as a 3D volume and eventually save it.
The object I need to convert is very similar to a cylinder (so the program doesn't have to 'understand' what type of object it is).
There are several things you can mean, I think none of which currently exists in free software (but I may be wrong about that), and they differ in how hard they are to implement:
First of all, "a 3D volume" is not a clear definition of what you want. There is not one way to store this information. A usual way (for computer games and animations) is to store it as a mesh with textures. Getting the textures is easy: you have the photographs. Creating the mesh can be really hard, depending on what exactly you want.
You say your object looks like a cylinder. If you want to just stitch your images together and paste them as a texture over a cylindrical mesh, that should be possible. If you know the angles at which the images are taken, the stitching will be even easier.
However, the really cool thing that most people would want is to create any mesh, not just a cylinder, based on the stitching "errors" (which originate from the parallax effect, and therefore contain information about the depth of the pictures). I know Autodesk (the makers of AutoCAD) have a web-based tool for this (named 123-something), but they don't let you put it into your own program; you have to use their interface. So it's fine for getting a result, but not as a basis for a program of your own.
Once you have the mesh, you'll need a viewer (not view first, save later; it's the other way around). You should be able to use any 3D drawing program, for example Blender can view (and edit) many file types.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 3 years ago.
Improve this question
I am currently working on a project where I generate several images and then transform them into a video.
I am using OpenCV for the whole image processing thing, and especially cv.WriteFrame.
Even though it is working quite well, I would like to add some effects for image transition.
Simple things in fact, I would like the images to blend into each other to avoid the "violent" way it is currently done.
I also have problems with the fps in cv.WriteFrames (which is not accurate).
I searched on the internet without finding any library/utility to do that, so I started thinking about implementing it by myself. It would be quite a hassle though.
Would you know about an option to do such a thing?
I am open to any solution !
Thanks
To have a smooth transition you most likely have to put some extra frames between the 2 images. Those extra frames could be the 2 images progressively adding each other.
Usually opencv addWeighted is used to blend 2 images, it has parameters to set the weights.
addWeighted docs:
http://docs.opencv.org/modules/core/doc/operations_on_arrays.html#addweighted
Well, I've never worked with OpenCV, but if you want to do a fade in or fade out I could envision doing something like creating frames that have progressively more alpha transparency and adding them into the stack thats being written to the video file. Something like that could be done in just a few lines of code with PIL.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
I have a program written in python using the module networkx to create a dynamic graph. It is a planer graph where the vertices remain constant but the edges change. Now I'm looking for a library that allows me to do two things, in a fast and quick manner preferably:
Drawing the vertices as the lattice points inside a rectangle, i.e.
Being able to select edges and vertices to change their color, position, weights, etc. as shown in the picture.
Thanks
For modest graph sizes, any good python graphics library should provide sufficient primitives to address this issue. For example, either Pyglet or PyGame would be suitable.