How do I draw a line between <x,y,z> <x,y,z> points in the 3d sample graph you provide ?
Thanks
I think you can follow the previous 2D post "lines between points" and extend to 3D, though I have not tried it.
What about the z coordinate ? I can't seem to find a 3d constructor for the line type.
Anyone...please ?
in fact it's exactly the same thing than in 2D :
if you just want to draw one line {x1,y1,z1} -> {x2,y2,z2} on your panel : Plot3Panel plot = new Plot3DPanel(); RelativeCoord c1 = new RelativeCoord(new double[] { x1, y1,z1}, plot.getBase()); RelativeCoord c2 = new RelativeCoord(new double[] { x2, y2 ,z2}, plot.getBase()); plot.addPlotable(new Line(c1, c2, Color.red));
that's all...
yann
Log in to post a comment.
How do I draw a line between <x,y,z> <x,y,z> points in the 3d sample graph you provide ?
Thanks
I think you can follow the previous 2D post "lines between points" and extend to 3D, though I have not tried it.
What about the z coordinate ? I can't seem to find a 3d constructor for the line type.
Anyone...please ?
in fact it's exactly the same thing than in 2D :
if you just want to draw one line {x1,y1,z1} -> {x2,y2,z2} on your panel :
Plot3Panel plot = new Plot3DPanel();
RelativeCoord c1 = new RelativeCoord(new double[] { x1, y1,z1}, plot.getBase());
RelativeCoord c2 = new RelativeCoord(new double[] { x2, y2 ,z2}, plot.getBase());
plot.addPlotable(new Line(c1, c2, Color.red));
that's all...
yann