Scatter plot with Jzy3d

143 views Asked by At

I am using Jsy3d to draw a 3d scatter plot in Java. However, I noticed that the drawing order of the points seems to be based on the order of the given List of Points, not on the distance to the camera. Is there a way to fix this?

1

There are 1 answers

0
Martin Pernollet On

You are right, rendering is based on point declaration. Why would you change this?

To change the scatter rendering, simply override Scatter.draw(...)

You may use Camera.getDistance(coord) to get the distance to Camera. This method is already used by BarycenterOrderingStrategy in Graph to order the drawables (but this won't work for your scatter as it is a primitive Drawable).