【问题标题】:Does JZY3D-API support "plot3(...)" function in Matlab?JZY3D-API 是否支持 Matlab 中的“plot3(...)”函数?
【发布时间】:2018-01-17 12:48:28
【问题描述】:

Matlab 支持用 plot3 函数绘制 3D 线图。但我想用 JZY3D API 做到这一点。 JZY3D api是否像matlab一样支持这个操作?如果是,这条线是用哪种方法绘制的?请帮帮我!!

谢谢

【问题讨论】:

    标签: java maven plot jzy3d


    【解决方案1】:

    可以像这样使用 LineStrip 形状来完成:

    public class LineTest extends AbstractAnalysis {
    
        public static void main(String[] args) throws Exception {
            AnalysisLauncher.open(new LineTest());
        }
    
        @Override
        public void init() throws Exception {
            chart = AWTChartComponentFactory.chart(Quality.Fastest, getCanvasType());
            LineStrip lineStrip = new LineStrip(
                new Point(new Coord3d(0.0, 1.0, 3.0)),
                new Point(new Coord3d(1.0, 2.0, 3.0))
        );
            lineStrip.setWireframeColor(Color.RED);
            chart.getScene().getGraph().add(lineStrip);
        }
    }
    

    它只显示带有线条的 2D 平面,但是如果您在场景中添加更多 3d 形状,您会发现线条是 3 维的。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-12-04
      相关资源
      最近更新 更多