{"id":13842360,"url":"https://github.com/tanling8334/Matplot3D-for-Java","last_synced_at":"2025-07-11T15:31:26.399Z","repository":{"id":37743156,"uuid":"114752647","full_name":"tanling8334/Matplot3D-for-Java","owner":"tanling8334","description":"Matplot3D for java. It is a library for drawing 3D plot ","archived":false,"fork":false,"pushed_at":"2024-05-08T08:21:20.000Z","size":74218,"stargazers_count":315,"open_issues_count":0,"forks_count":29,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-08-05T17:31:31.967Z","etag":null,"topics":["3d","3d-engine","3d-graphics","3d-models","java","matplot"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tanling8334.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-12-19T10:38:47.000Z","updated_at":"2024-07-26T05:07:00.000Z","dependencies_parsed_at":"2024-04-24T08:59:46.303Z","dependency_job_id":"b6d28b72-b26c-4c64-a4d6-420a42803ccf","html_url":"https://github.com/tanling8334/Matplot3D-for-Java","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tanling8334%2FMatplot3D-for-Java","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tanling8334%2FMatplot3D-for-Java/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tanling8334%2FMatplot3D-for-Java/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tanling8334%2FMatplot3D-for-Java/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tanling8334","download_url":"https://codeload.github.com/tanling8334/Matplot3D-for-Java/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225736858,"owners_count":17516250,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["3d","3d-engine","3d-graphics","3d-models","java","matplot"],"created_at":"2024-08-04T17:01:32.954Z","updated_at":"2024-11-21T13:30:30.846Z","avatar_url":"https://github.com/tanling8334.png","language":"Java","readme":"# Matplot3D for Java\n\n\n### 概述\n\n  在数据科学和工程领域，数据可视化是理解和交流复杂信息的关键工具。如果您是一位Java开发者，寻找一个强大的、本地化的三维图形绘图库，那么Matplot3D for JAVA（V5.0）值得你关注。该组件旨在为Java开发者提供类似于Python中Matplotlib的三维绘图功能，让Java也能轻松绘制出令人印象深刻的3D图形图表。\n\n  **Matplot3D for JAVA（V5.0）** 是一个基于JAVA SE环境开发的三维图形图表组件。 组件由纯JAVA SE 实现（Pure Java） ，封装为一个jar包，jar文件大小只有300多KB。内含自主研发的软件三维几何造型和绘制算法，无需依赖OpenGL、DriectX、JAVA 3D或JAVAFX等等第三方库，其只依托JRE自带的默认类库即可（即只需安装了JAVA就可使用）。\n\n  **Matplot3D for JAVA（V5.0）** 提供简洁明了的API设计，这使得即使是没有太多数据可视化工经验的开发者也可以快速上手构建出交互式的可视化应用。可用于大数据可视化、科学数学数据分析可视化等领域。它利用Java的自带的GUI框架构建界面同，确保了良好的跨平台兼容性同时能方便的集成到自己JAVA GUI程序中。也可以在服务端直接生成图片对象或文件，用于动态Web页面显示。\n\n---\n\n### 应用场景\n  \n\n- 教学和研究：用于展示数学模型、物理现象和数据等。\n- 数据科学：在数据分析过程中可视化三维数据，帮助发现潜在模式。\n- 其他需要数据可视化的Java应用和系统\n\n\n---\n\n### 包文件说明\n\n **Matplot3d_4j_sydh_x64_V5.0.jar** 为应用所需要依赖的包，仅将此包文件导入项目即可使用。\n\n **Matplot3d_4j_sydh_x64_V5.0_demo.jar** 为演示DEMO的可执行的JAR文件，内含展示效果及部分示例代码， **使用时不需要引用这个包** 。在安装有64bit的JRE的电脑上一般双击运行即可（或者用命令行或批处理文件运行 ，运行的命令是：  \"C:\\Program Files\\Java\\....你的java安装根目录...\\bin\\java.exe\" -jar Matplot3d_4j_sydh_x64_V5.0_demo.jar）。  \n\n---\n### 作者联系方式\n **email:ta8334@126.com  ;  QQ :17746302** \n\n---\n\n### 效果展示\n\n**C60分子结构**\n\n![C60分子结构](pic/C60.gif \"C60分子结构\")     \n\u003cbr/\u003e \n\u003cbr/\u003e \n￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣\n\n**电荷矢量场**\n\n![电荷矢量场](pic/GIF8.gif \"地形数据动图\")  \n\u003cbr/\u003e \n\u003cbr/\u003e \n￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣\n\n**地形数据**\n\n![地形数据动图](pic/demo.gif \"地形数据动图\")  \n\u003cbr/\u003e \n\u003cbr/\u003e \n￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣\n\n**网格曲面** \n\n![网格曲面](pic/网格曲面.jpg \"网格曲面\")  \n简单样例代码\n```\npublic class MobiusStripDemo {\n\tpublic static void main(String[] args) throws Exception {\n\n\t\tGridMeshProcessor processer = new GridMeshProcessor();\n\n\t\tMatplot3D4JMgr matPlot3DMgr = new Matplot3D4JMgr(processer);\n\n\t\tGridMeshMapper f = new GridMeshMapper() {\n\n\t\t\tpublic Point3D f(double d1, double d2) {\n\n\t\t\t\tdouble sita = d1;\n\t\t\t\tdouble offset = d2;\n\n\t\t\t\tdouble baseR = 12;// 半径\n\n\t\t\t\tdouble r = 3.6 * Math.cos(sita * 3 / 2) + baseR;\n\n\t\t\t\tdouble fai;// 自旋角\n\n\t\t\t\tfai = sita * 1.75;// 自旋角是方位角的1.75\n\n\t\t\t\tdouble x = (r + (offset * Math.cos(fai))) * Math.cos(sita);\n\t\t\t\tdouble y = (r + (offset * Math.cos(fai))) * Math.sin(sita);\n\t\t\t\tdouble z = offset * Math.sin(fai) + 3.6 * Math.sin(sita * 3 / 2);\n\n\t\t\t\treturn new Point3D(x, y, z);\n\t\t\t}\n\n\t\t\tpublic void setAdditionalPrar(Object additionalprar) {}\n\t\t};\n\n\t\tdouble[] sita = FunctionSpaceUtil.lineSpace(0, Math.PI * 4, 300);\n\n\t\tdouble[] offset = FunctionSpaceUtil.lineSpace(-3.1, 3.1, 5);\n\n\t\tprocesser.addData(f, sita, offset, \"1\",new TopBottomColorStyle(ColorStyle.DEFAULT_COLORS_REVERSE_ARRAY) ,1f);\n\n\t\tmatPlot3DMgr.setCoordianteSysShowType(matPlot3DMgr.COORDINATE_SYS_ALWAYS_FURTHER);\n\t\tmatPlot3DMgr.setTitle(\"Mobius strip demo\");\n\n\t\tmatPlot3DMgr.show();\n\t}\n}\n```\n\u003cbr/\u003e \n\u003cbr/\u003e \n￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣\n\n**矢量场流线** \n\n![矢量场流线](pic/线圈电流磁场.gif \"矢量场流线\") \n\n简单样例代码\n```\npublic class SimpleVectorFieldDemo {\n\tpublic static void main(String[] args) {\n\n\t\tVectorFieldProcessor processer = new VectorFieldProcessor();\n\n\t\tMatplot3D4JMgr matPlot3DMgr = new Matplot3D4JMgr(processer);\n\n\t\tVector3D v1 = new Vector3D(1, 0, 0);\n\t\tVector3D v2 = new Vector3D(-0.1, 0, 0);\n\t\tVector3D vNull = new Vector3D(0, 0, 0);\n\n\t\tclass MyMapper1 implements Point3dVector3dMapper {\n\t\t\tpublic Vector3D f(Point3D p) {\n\t\t\t\tif (p.y() \u003e 0) {\n\t\t\t\t\treturn v1;\n\t\t\t\t} else {\n\t\t\t\t\treturn vNull;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tpublic void setAdditionalPrar(Object additionalprar) {}\n\t\t}\n\n\t\tclass MyMapper2 implements Point3dVector3dMapper {\n\t\t\tpublic Vector3D f(Point3D p) {\n\t\t\t\tif (p.y() \u003c 0) {\n\t\t\t\t\treturn v2;\n\t\t\t\t} else {\n\t\t\t\t\treturn vNull;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tpublic void setAdditionalPrar(Object additionalprar) {}\n\t\t}\n\n\t\tprocesser.addData(new MyMapper1(), \"1\", Color.RED, new Range(-9, 9), new Range(-9, 9), new Range(-9, 9));\n\n\t\tprocesser.addData(new MyMapper2(), \"2\", Color.BLUE, new Range(-9, 9), new Range(-9, 9), new Range(-9, 9));\n\n\t\tList\u003cPoint3D\u003e seeds = new ArrayList\u003cPoint3D\u003e();\n\n\t\tfor (double z = -9; z \u003c= 9; z += 1.2) {\n\t\t\tfor (double y = -9; y \u003c= 9; y += 1.2) {\n\t\t\t\tseeds.add(new Point3D(0, y, z));\n\t\t\t}\n\t\t}\n\n\t\tprocesser.setPropertyToAll(\"seeds\", seeds);\n\t\tprocesser.setPropertyToAll(\"alphaNoise\", 0.0);\n\n\t\tmatPlot3DMgr.setTitle(\"矢量场流线\");\n\t\tmatPlot3DMgr.setAppearanceTheme(Matplot3D4JMgr.APPEARANCE_THEME_DARK);\n\n\t\tmatPlot3DMgr.setCoordianteSysShowType(Matplot3D4JMgr.COORDINATE_SYS_ALWAYS_FURTHER);\n\n\t\tmatPlot3DMgr.showMotion(-1, 15, 0);\n\t}\n}   \n \n```\n\n\u003cbr/\u003e \n\u003cbr/\u003e \n￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣\n\n**数据阵列曲面** \n\n![数据阵列曲面](pic/数据阵列曲面.jpg \"数据阵列曲面\")  \n\n简单样例代码\n```\npublic class FunctionSurfaceDemo {\n\n\tpublic static void main(String[] args) {\n\n\t\tDataGridProcessor processor = new DataGridProcessor();\n\t\t\n\t\tfinal Matplot3D4JMgr mgr=new Matplot3D4JMgr(processor);\t\t\n\n\t\t//定义二维函数，根据xy值求y值\n\t\tFunction f = new Function() {\n\t\t\tpublic Double f(double x, double y) {\n\t\t\t\treturn Math.sin(y * x / 2.2) * 0.8;\n\t\t\t}\n\t\t};\n\n\t\tdouble pi = Math.PI;\n\n\t\t//将二维函数加入处理器，设置XY方向显示范围和采样分段数\n\t\tRange rangeX = new Range(-1.5 * pi, 1.5 * pi);\n\t\tRange rangeY = new Range(-1.5 * pi, 1.5 * pi);\n\n\t\t// 将二维函数加入处理器，设置XY方向显示范围和采样分段数\n\t\tprocessor.addData(FunctionSpaceUtil.getDataByFunction(f, rangeX, rangeY, 60, 60), \"\", rangeX, rangeY, new TopBottomColorStyle(Colors.Jet), 1f);\n\t\t\n\t\tprocessor.setPropertyToAll(\"isDoubleSide\", true);\n\n\t\tmgr.setScaleZ(1.5);\n\t\tmgr.setScaleX(1.3);\n\t\tmgr.setScaleY(1.3);\n\n\t\tmgr.setElevation(1.3);\n\t\tmgr.setAzimuth(1.1);\n\n\t\tmgr.setTitle(\"Demo : 函数曲面绘制   [ z =  0.8 * sin(y*x/2.2) ]\");\n\n\t\tmgr.setCoordianteSysShowType(mgr.COORDINATE_SYS_ALWAYS_FURTHER);\n\n\t\tmgr.show();\n\t}\n} \n \n```\n\u003cbr/\u003e \n\u003cbr/\u003e \n￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣\n\n**通用网格** \n\n![通用网格](pic/通用网格.jpg \"通用网格\")  \n\u003cbr/\u003e \n\u003cbr/\u003e \n￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣\n\n**曲面云图** \n\n![曲面云图](pic/曲面云图.jpg \"曲面云图\")  \n\n简单样例代码\n```\npublic class ContourDataGridDemo {\n\tpublic static void main(String[] args) {\n\t\t\n\t\tContourDataGridProcessor processor = new ContourDataGridProcessor();\n\t\t\n\t\tMatplot3D4JMgr mgr=new Matplot3D4JMgr(processor);\t\t\n\t\t\n\t\t//=======================================\n\t\t//准备你的高度数据，是一个二维Double数组。表示均匀分布的网格点，数组内的值表示高度\n\t\t//数据一般来源于具体应用的非规则函数数据，例如某区域的DEM地形高程数据\n\t\t//以下代码创造一些虚拟数据用于展示如何使用\n\t\t\n\t\tDouble[][] datas=new Double[100][100];\n\t\t\n\t\tfor(int i=0;i\u003cdatas.length;i++) {\n\t\t\tfor(int j=0;j\u003cdatas[0].length;j++) {\n\t\t\n\t\t\t\tdatas[i][j]=-0.1*Math.pow(100d-i-j,2)+1000;\n\t\t\t\t\n\t\t\t}\n\t\t}\n\n\t\t//=======================================\n\t\t//准备你的显示数据values，是一个二维Double数组，。表示均匀分布的网格点，数组内的值表示非xyz的第四维标量数据\n\t\t//values的行列分布可以不与datas一致，但建议最好一致以优化显示效果\n\t\t//以下代码创造一些虚拟数据用于展示如何使用\n\t\t\n\t\tDouble[][] values=new Double[50][50];\n\t\tfor(int i=0;i\u003cvalues.length;i++) {\n\t\t\tfor(int j=0;j\u003cvalues[0].length;j++) {\n\t\t\t\tdouble temp=Math.sqrt(Math.pow(i-25d,2)+Math.pow(j-25d,2));\n\t\t\t\tvalues[i][j]=temp;\n\t\t\t}\n\t\t}\n\n\t\tColor baseColor=Color.GRAY;//云图需要一个基色\n\t\t\n\t\tprocessor.addData(datas, values,baseColor, \"my_name\", new Range(0, 100), new Range(100, 200), 20, 20, 1f);\n\t\t\n\t\tprocessor.setClose3DObject(true);//设置是否是封闭三维对象\n\n\t\tmgr.setCoordianteSysShowType(Matplot3D4JMgr.COORDINATE_SYS_ALWAYS_FURTHER);\n\t\t\n\t\tmgr.setScaleX(5);\n\t\tmgr.setScaleY(5);\n\t\tmgr.setScaleZ(0.2);\n\n\t\tmgr.setTitle(\"曲面云图简单样例\");\n\t\t\n\t\tmgr.show();\n\t}\n}\n \n```\n\u003cbr/\u003e \n\u003cbr/\u003e \n￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣\n\n**柱状图** \n\n![柱状图](pic/柱状图.jpg \"柱状图\")  \n\n简单样例代码\n```\npublic class BarsDemo {\n\n\tpublic static void main(String[] args) {\n\n\t\tBarProcessor processor = new BarProcessor();\n\n\t\tMatplot3D4JMgr mgr = new Matplot3D4JMgr(processor);\n\n\t\t// ===========================================\n\t\t// 在此准备数据\n\t\tDouble[][] ds1 = new Double[][] { { 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 },\n\t\t\t\t{ 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0 }, { 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0 } };\n\n\t\tColor c1 = Color.RED;\n\t\tColor c2 = Color.GREEN;\n\t\tColor c3 = new Color(80, 80, 255);\n\n\t\tColor[][] colors = new Color[][] { { c1, c1, c1, c1, c1, c1, c1, c1 }, { c2, c2, c2, c2, c2, c2, c2, c2 },\n\t\t\t\t{ c3, c3, c3, c3, c3, c3, c3, c3 } };\n\n\t\tColor ce = Color.BLACK;\n\n\t\tColor[][] ecolors = new Color[][] { { ce, ce, ce, ce, ce, ce, ce, ce }, { ce, ce, ce, ce, ce, ce, ce, ce },\n\t\t\t\t{ ce, ce, ce, ce, ce, ce, ce, ce } };\n\t\t\n\n\t\tprocessor.addData(\"项目1\", ds1,colors,ecolors);\n\n\n\t\tprocessor.setBarWidthX(2);\n\t\tprocessor.setBarWidthY(2);\n\n\t\tprocessor.setxSpace(0.2);\n\t\tprocessor.setySpace(1);\n\t\tprocessor.setSpaceInGroup(0.3);\n\n\t\t//自定义标签图例面板\n\t\tKeyLabelLegend legend = new KeyLabelLegend();\n\t\tlegend.put(\"项目A\", c1);\n\t\tlegend.put(\"项目B\", c2);\n\t\tlegend.put(\"项目C\", c3);\n\n\t\tmgr.addLegend(legend);\n\n\t\tmgr.setScaleZ(1.5);\n\t\tmgr.setScaleX(1.3);\n\n\t\tmgr.setTitle(\"柱状图\");\n\n\t\tmgr.setElevation(0.2);\n\t\tmgr.setAzimuth(2.2);\n\n\t\tmgr.setOutlineAntiAliasing(false);//可以关闭外廓反锯齿\n\n\t\tmgr.show();\n\t}\n\n}\n \n```\n\u003cbr/\u003e \n\u003cbr/\u003e \n￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣\n\n**瀑布图** \n\n![瀑布图](pic/瀑布图.jpg \"瀑布图\")  \n\n简单样例代码\n```\npublic class SimpleWaterfallDemo {\n\tpublic static void main(String[] args) {\n\t\n\t\tWaterfall3DProcessor processer = new Waterfall3DProcessor();\n\t\tMatplot3D4JMgr mgr = new Matplot3D4JMgr(processer);\n\n\t\tint stepC = 300;\n\t\tdouble step = 0.05;\n\n\t\tprocesser.setGroupSpacing(1);//设置间距为1\n\n\t\t//第一组图形\n\t\tList\u003cPoint2D.Double\u003e li1 = new ArrayList\u003cPoint2D.Double\u003e();\n\n\t\tfor (int i = 0; i \u003c stepC; i++) {\n\t\t\tli1.add(new Point2D.Double(i * step, Math.sin(i * step)));\n\t\t}\n\n\t\tprocesser.addData(\"Item 1\", null, li1);\n\t\t\n\t\t//第二组图形\n\t\tList\u003cPoint2D.Double\u003e li2 = new ArrayList\u003cPoint2D.Double\u003e();\n\n\t\tfor (int i = 0; i \u003c stepC; i++) {\n\t\t\tli2.add(new Point2D.Double(i * step, Math.cos(i * step)));\n\t\t}\n\n\t\tprocesser.addData(\"Item 2\", null, li2);\n\n\t\tprocesser.setBaseZ(-1); \n\n\t\tmgr.setScaleZ(1.5);\n\n\t\tmgr.show();\n\t}\n}\n \n```\n \u003cbr/\u003e \n\u003cbr/\u003e \n￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣\n\n**点云散点** \n\n![点云散点](pic/点云散点.jpg \"点云散点\")  \n\n简单样例代码\n```\npublic class DotsDemo {\n\n\tpublic static void main(String[] args) throws Exception {\n\t\n\t\tScatterDataProcessor processor = new ScatterDataProcessor();\n\n\t\tfinal Matplot3D4JMgr mgr=new Matplot3D4JMgr(processor);\t\t\n\t\t\n\t\t//*************************************************************//\n\t\t//在此准备数据，将Point3D对象放入List\u003cPoint3D\u003e容器中\n\t\t//prepare your data here\n\n\t\tList\u003cPoint3D\u003e dos1=new ArrayList\u003cPoint3D\u003e();\n\t\tList\u003cPoint3D\u003e dos2=new ArrayList\u003cPoint3D\u003e();\n\t\tList\u003cPoint3D\u003e dos3=new ArrayList\u003cPoint3D\u003e();\n\t\t\n\t\tRandom ram=new Random();\n\t\t\n\t\tfor(int i=0;i\u003c100;i++) {\n\t\t\t\n\t\t\tdos1.add(new Point3D(ram.nextDouble()+1,ram.nextDouble(),ram.nextDouble()+1));\n\t\t\tdos2.add(new Point3D(ram.nextDouble()+1,ram.nextDouble()+1,ram.nextDouble()));\n\t\t\tdos3.add(new Point3D(ram.nextDouble(),ram.nextDouble()+1,ram.nextDouble()));\n\t\t}\n\t\t\n\t\t//加入第一组数据\n\t\tprocessor.addData(\"Item 1\", dos1);\n\t    \n\t\t//加入第二组数据\n\t\tprocessor.addData(\"Item 2\", dos2);\n\t\t\n\t\t//加入第三组数据\n\t\tprocessor.addData(\"Item 3\", dos3);\n\t\t\n\t\tprocesser.setPropertyToAll(\"isShowEdge\", true);\n\n\t\tmgr.setTitle(\"散点图\");\n\n\t\t//坐标参考平面不会遮挡数据\n\t\tmgr. setCoordianteSysShowType( Matplot3D4JMgr.COORDINATE_SYS_ALWAYS_FURTHER);\n\n\t\tmgr.show();\n\t}\n}\n \n```\n \u003cbr/\u003e \n\u003cbr/\u003e \n￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣\n\n**简单几何体** \n\n![简单几何体](pic/简单几何体.jpg \"简单几何体\")  \n\n简单样例代码\n```\npublic class SimpleElementsDemo {\n\tpublic static void main(String[] args) throws Exception {\n\t\t\n\t\tSimple3DElementProcessor processor = new Simple3DElementProcessor();\n\n\t\tfinal Matplot3D4JMgr mgr=new Matplot3D4JMgr(processor);\t\t\n\t\t\n\t\tprocessor.addSphere(new Point3D(-1.5,1.5,0 ), 1,39,20, Color.YELLOW);\n\t\t\n\t\tprocessor.addCuboid(new Point3D(1.5,1.5,0 ), 1.3,1.5,1.7, Color.GREEN);\n\n\t\tprocessor.addCone(new Point3D(-1.5,-1.5,-0.9 ), new Point3D(-1.5,-1.5,1.0 ),1,30, Color.RED);\n\t\t\n\t\tprocessor.addCylinder(new Point3D(1.5,-1.5,-0.9 ), new Point3D(1.5,-1.5,1.0 ),1,30, Color.BLUE);\n\n\t\tmgr.setTitle(\"简单几何体\");\n\n\t\tmgr.show();\n\t}\n}\n \n```\n \u003cbr/\u003e \n\u003cbr/\u003e \n￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣\n\n**折线曲线** \n\n![折线曲线](pic/折线曲线.jpg \"折线曲线\")  \n\n简单样例代码\n```\npublic class CurveDemo {\n\n\tpublic static void main(String[] args) throws Exception {\n\t\n\t\tCurveProcessor processor = new CurveProcessor();\n\n\t\tfinal Matplot3D4JMgr mgr=new Matplot3D4JMgr(processor);\t\t\n\t\t\n\t\tList\u003cPoint3D\u003e list=new ArrayList\u003cPoint3D\u003e();\n\t\t\n\t\tlist.add(new Point3D(0, 0, 0));\n\t\tlist.add(new Point3D(0, 0, 1));\n\t\tlist.add(new Point3D(1, 0, 1));\n\t\tlist.add(new Point3D(1, 0.3, 0));\n\t\tlist.add(new Point3D(1, 0.7, 0));\n\t\tlist.add(new Point3D(1, 1, 1));\n\t\tlist.add(new Point3D(0, 1, 1));\n\t\tlist.add(new Point3D(0, 1, 0));\n\t\t\n\t\tprocessor.addData(list, \"折线A\", Color.RED, 1);\n\n\t\tmgr.setTitle(\"三维折线\");\n\t\t\n\t\tmgr.setElevation(0.06);\n\t\tmgr.setAzimuth(0.36);\n\n\t\tmgr.show();\n\t}\n}\n \n```\n \u003cbr/\u003e \n\u003cbr/\u003e \n\n\n\n\n\n\n    \n\n\n\n","funding_links":[],"categories":["Others (1002)","Others","Java"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftanling8334%2FMatplot3D-for-Java","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftanling8334%2FMatplot3D-for-Java","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftanling8334%2FMatplot3D-for-Java/lists"}