Replies: 3 comments
-
You are right, there is no real (projection) based 3D rendering in chart-fx. We added a MultiDimDataSet with the 11.1.3 release, which could hold xyz-data like your matlab sample. Then there's MountainRangeRenderer and ContourDataSetRenderer (and HistoryRenderer kind of also fits here) but they work on data points on a cartesian grid (xmesh, ymesz, zz in matlab notation I believe). Originally this was covered by the DataSet3D interface, but now we only require a DataSet with matching sizes on the first 3 dimensions. I suppose this could be implemented similar to the PolarPlot, which also does a transformation and has its own custom axes. Interactive features like zooming/panning would probably need a lot of additional work or a completely different implementation (They are not usable for PolarPlots at the moment). Another concern is performance, which for more complex 3D data will probably become a problem. There where recent developments around the BufferedImage API, but we did not find a good way to exploit that for chart-fx, yet. |
Beta Was this translation helpful? Give feedback.
-
@ennerf thanks again for your faithful testing and quick and constructive bug and feature reports. A bit of context from our side: plotting 3D is also a strategic goal for us and the DataSet interface -- which we maintain internally both for Java/C++ -- should also be flexible enough to handle this. As @wirew0rm mentioned, we may need to iterate on the specific 3D data storage example implementation as there are many different ways to do this and we want to minimise copying of data (ideally zero-copy) which has high penalties in Java (boxing/unboxing issues, lack of templates, ...) prior to being able to plot the data. However, the main issue I am struggling -- and the primary reasons why there isn't a XYZChart or 3DChart (the MountainRangeRenderer and ContourDataSetRenderer provide 3D->2D projections only) -- is for me to find a performant, reliable and maintainable 3D backend rendering engine for/in JavaFX that -- beyond the very simple examples -- can handle the typical amount of data and update rates found in test & instrumentation. For the earlier Swing-based ('JDataViewer') iteration we used JOGL as an augmentation, made a prototype implementation but the support was a bit flaky and one of the issues with JOGL is the platform supportability (it's based internally on JNI and OS/HW specific C libraries). Since iOS moved away from OpenGL and Windows prefers DirectX this becomes more of a low-level HW/driver issue... if necessary/useful, one could write something custom or add to the JavaFX eco-system but the reward/effort ratio isn't great these days especially since there are other tools that already solved this. @ennerf your thoughts on this would be appreciated. Btw. may we get in contact with you directly? For an external user, you seem to track our developments quite tightly. Maybe we can bring you into the fold. 😁 |
Beta Was this translation helpful? Give feedback.
-
Our use cases for 3D are a bit different from 2D and don't require the same update rates. We would typically do one of: (1) show a full 3D representation of the physical system (e.g. .obj models) and update the transformations I have done some tests with Jzy3d (JOGL based) and FXyz (JavaFX based) years ago, and I think that the performance of JavaFX's built-in 3D engine should be good enough for at least these use cases. The most complex JavaFX 3D project I've seen so far is probably still Oracle's JavaOne Chess demo from 2013. Jzy3d would have done everything we were looking for looking for, but we unfortunately also ran into too many issues with drivers and dependencies. Sure, I'd like to be more involved. I've contacted you on LinkedIn. We can figure out contact details there. |
Beta Was this translation helpful? Give feedback.
-
I'm currently trying to plot data in a 3D line chart similar to MATLAB's
plot3
command. I haven't used the 3D interface yet, but if I understand correctly there is currently no actual 3D grid/view, right?What do you think would be the best way to implement something like this?
MATLAB sample code
view 1
view 2
Beta Was this translation helpful? Give feedback.
All reactions