-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
3d plotting with Julia, OpenGL bindings #418
Comments
Yes, agree on both fronts that plotting is needed, and it needs to be publishable quality. SVG/PDF output is also a must. Is there anything serious for 3d plotting in the browser? |
There some quite good 3d javascript engines, but I have seen/found nothing "that does not look that a weekend hack" for 3d plotting. Examples of not so great 3d plotting in javascript:
Examples of great 3d engines: When looking at the Mayavi examples I realize that writting a "good" 3d plotting seems quite a large task, |
It seems possible in theory to have multiple graphical interfaces, but quite difficult for them not to work against each other. |
I agree... however there are some design issues I fail to see solved in the "let us use a separate web browser" path. When moving to 3d, the data volume grows significantly compared to simple 1d plots... |
Yes, that is a fair point. Although, at any given point, you are only displaying an image on the screen - so one could be intelligent about it. |
Yes, of course. An "advanced" plotter, will request data as needed. So, at the very least, you need bi-directional communication so the plot thread/process can read the data on an "as needed" basis. I am not an VTK expert, but I would expect VTK to handle this "the right way". Anyone has experience with Mayavi/Vtk ? (with respect to memory management when handling large datasets ?) |
Yes - there is no doubt that this would be orders of magnitude easier to do using Mayavi/VTK. We need someone who knows this stuff to start a project. |
@nolta Can winston support 3d graphics? Would we use cairo for that, or want to directly do OpenGL, or use something different altogether like Mayavi/VTK? On the browser side, this is an interesting experiment: |
I once wrote a simple 3d graphing thing using cairo as a backend, but you basically just get depth-sorted polygons, no z-buffering, hardware acceleration, shading, etc. So we need something different; OpenGL bindings would be cool of course. |
Winston is 2d only at the moment. It probably would be best to write a separate 3d plotting package, rather than add 3d to winston. |
For 3d plotting in the web repl, now google provides an interesting example |
Here is one more tool of interest for this issue. RGL, an OpenGL 3d renderer for R, which now has support to export towards WebGL http://www.r-bloggers.com/r-interactive-3d-webgl-plot-of-time-space-cube-with-rgl/ |
@o-jasper has created julia OpenGL bindings here: https://github.com/o-jasper/julia-ffi. This probably deserves to be better known. |
OpenGL package now available. |
with the package system (and an OpenGL package available), what is still required to close this issue? (e.g. the title seems too broad to ever be included in "base" Julia) |
If anyone is still interested in VTK, I am working on bindings in pure Julia (for now..), using clang.jl and a few helper functions to call into the Clang C++ API for information that is not available via libclang. https://github.com/ihnorton/VTK.jl There is a ways to go, but it is reasonably far along now and I could use help with testing or development.. On linux at least, the code currently supports inheritance and automatic base class resolution, static functions (called by mangled name), as well as both member and virtual methods (dispatched on typed-pointer first argument, and parametric to allow calls against subtypes when not overloaded). There are very likely some "unknown-unknown" corner cases that I haven't hit yet... but in the worst case, I will resort to emitting C-exported wrapper code where necessary. |
Wow that is really clever! Using macros to directly generate the code for a virtual call is a nice bit of mad science. |
Stdlib: SparseArrays URL: https://github.com/JuliaSparse/SparseArrays.jl.git Stdlib branch: main Julia branch: master Old commit: 99c99b4 New commit: 54f4b39 Julia version: 1.11.0-DEV SparseArrays version: 1.11.0 Bump invoked by: @ViralBShah Powered by: [BumpStdlibs.jl](https://github.com/JuliaLang/BumpStdlibs.jl) Diff: JuliaSparse/SparseArrays.jl@99c99b4...54f4b39 ``` $ git log --oneline 99c99b4..54f4b39 54f4b39 Fix docs conflict when building as part of full Julia docs (#430) a64ef4f Cleanup reloaded (#426) 4e2d1e4 Respect `IOContext` while displaying a `SparseMatrixCSC` (#423) 3d1eda9 Test suite: activate a temp project if we need to install Aqua.jl during the test suite (#425) 18b7fce Merge pull request #422 from JuliaSparse/jn/cat e2c78b8 test: restore ambiguous test 68afc6e fix inference of SparseVector cat c402d09 cat: ensure vararg is more inferrable 2c4f870 Fix some broken links (#421) 36a5308 bump version (#418) ``` Co-authored-by: Dilum Aluthge <dilum@aluthge.com>
Julia has kick ass features for computation.
However what is the point of computing so much if the data cannot be visualized/inspected ?
Current 2d plotting capabilities are nice, but no real matlab/scilab/scipy competitor would be credible without some kind of 3d plotting.
One way of going would be to "port" mayavi to Julia.
http://github.enthought.com/mayavi/mayavi/auto/examples.html
Mayavi builds on top of VTK, so the 3d system itself would not be reinvented from scratch.
I think this would be relevant feature to have for release 2.0...
ps: 2d or 3d plotting systems in Julia should have SVG/PDF output, so it can be used in scientific publishing...
The text was updated successfully, but these errors were encountered: