{"id":16976263,"url":"https://github.com/johnyf/fig2u3d","last_synced_at":"2025-06-19T00:04:18.628Z","repository":{"id":47097332,"uuid":"12260146","full_name":"johnyf/fig2u3d","owner":"johnyf","description":"Export MATLAB figure as U3D file or directly to 3D interactive PDF","archived":false,"fork":false,"pushed_at":"2021-08-04T00:38:37.000Z","size":165,"stargazers_count":66,"open_issues_count":15,"forks_count":25,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-04-11T09:52:18.452Z","etag":null,"topics":["export","graphics","latex","matlab","matlab-figure","pdf","three-dimensions","u3d"],"latest_commit_sha":null,"homepage":"http://www.mathworks.com/matlabcentral/fileexchange/37640-export-figure-to-3d-interactive-pdf","language":"MATLAB","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/johnyf.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-08-21T03:19:19.000Z","updated_at":"2025-03-13T19:38:57.000Z","dependencies_parsed_at":"2022-09-03T19:11:11.193Z","dependency_job_id":null,"html_url":"https://github.com/johnyf/fig2u3d","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/johnyf/fig2u3d","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnyf%2Ffig2u3d","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnyf%2Ffig2u3d/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnyf%2Ffig2u3d/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnyf%2Ffig2u3d/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/johnyf","download_url":"https://codeload.github.com/johnyf/fig2u3d/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnyf%2Ffig2u3d/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260654627,"owners_count":23042672,"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":["export","graphics","latex","matlab","matlab-figure","pdf","three-dimensions","u3d"],"created_at":"2024-10-14T01:25:29.538Z","updated_at":"2025-06-19T00:04:13.609Z","avatar_url":"https://github.com/johnyf.png","language":"MATLAB","funding_links":[],"categories":[],"sub_categories":[],"readme":"Export figure to 3D interactive PDF\n===================================\n\nSummary\n-------\nExport figure as a U3D file or directly to 3D interactive graphics within a PDF.\nLicensed under 2-clause BSD.\n\n[Documentation](https://github.com/johnyf/binaries/raw/master/fig2u3d/fig2u3d_manual.pdf)\n\n[PDF created](https://github.com/johnyf/binaries/raw/master/fig2u3d/example.pdf) for figure below (3d \u003cfont color=\"red\"\u003eneeds\u003c/font\u003e [Adobe Reader](http://get.adobe.com/reader/)).\n\n\u003cimg src=\"https://raw.githubusercontent.com/johnyf/binaries/master/fig2u3d/logo.png\" width=200\u003e\n\nThe `LaTeX` needed looks like:\n\n```\n\\documentclass{article}\n\\usepackage{graphicx}\n\\usepackage[dvipdfmx]{media9}\n\n\\begin{document}\n\t\\begin{figure}\n\t\t\\centering\n\t\t\\includemedia[\n\t\t\twidth=0.8\\textwidth,\n\t\t\tactivate=pagevisible,\n\t\t\t%deactivate=pageinvisible,\n\t\t\t3Dtoolbar,\n\t\t\t3Dviews=./example_supercyclide.vws\n\t\t]{\n\t\t\t\\includegraphics[width=0.8\\textwidth]{example_supercyclide.pdf}\n\t\t}{./example_supercyclide.u3d}\n\t\t\\caption{An implicitly defined elliptic supercyclide.}\n\t\t\\label{fig:example_supercyclide}\n\t\\end{figure}\n\\end{document}\n```\n\n## Description\n`fig2u3d` saves the figure as a `U3D` file for inclusion as an interactive 3-dimensional figure within a `PDF`. Either `LaTeX` or Adobe Acrobat can be used to embed the `U3D` file in the `PDF`.\n\nThe `idtf2u3d` executables are included from [this project](http://sourceforge.net/projects/u3d/) (see dependencies below).\n\nA `vws` file is also created, which contains the current camera view of the axes saved. This file can be used to set the figure's default view in the PDF to be the same with the open figure window in `MATLAB`.\n\nThe [media9](http://www.ctan.org/tex-archive/macros/latex/contrib/media9) LaTeX package can import U3D files with their associated VWS files in a PDF document.\n\nFor PDF readers which do not render 3D figures, it is possible to include an alternative 2D image as a substitute to the 3D object. For conveniency, the script saves a 2D image together with U3D file. File type and other options for exporting this 2D image can be specified as additional arguments.\n\n`fig2pdf3d` Converts the figure directly to a PDF containing only an interactive 3D graphics object.\n\nGraphics object supported for export include:\n\n- line\n- surface\n- patch\n- quivergroup\n- contourgroup\n\nLine colors and marker styles, surfaces and `quivers` with `NaN`s and surface shading are supported. Multiple instances of various objects can be plotted in the same axes and exported. Note that some limitations apply, for example filled contours are not yet supported.\n\n\u003cimg src=\"https://raw.githubusercontent.com/johnyf/binaries/master/fig2u3d/fig2u3d_workflow.png\" width=400\u003e\n\n## Installation\n\nDownload \u0026 unpack from the [release](https://github.com/johnyf/fig2u3d/releases) the:\n\n- `MATLAB` code,\n- idtf2u3d converter Mac OS X, Linux, Windows binaries, place this under `idtf2u3d/bin` (result: `idtf2u3d/bin/glx…` etc),\n- required `MATLAB` packages, place them anywhere.\n\nAdd all the above and their subdirectories to your `MATLAB` path, e.g. using the `pathtool` command.\n\n### Optional\n- `fig2pdf3d` needs a latex distribution (e.g. [MikTeX](http://miktex.org/), [TeXLive](http://www.tug.org/texlive/), [MacTeX](http://tug.org/mactex/)) and [`media9`](http://www.ctan.org/pkg/media9) (preferred) or [`movie15`](http://www.ctan.org/pkg/movie15) LaTeX package (replaced by `media9`).\n\n## Acknowledgments\n- [idtf2u3d converter](http://sourceforge.net/projects/u3d/) binaries packaging taken from [here](http://www.mathworks.com/matlabcentral/fileexchange/25383-matlab-mesh-to-pdf-with-3d-interactive-object)\n\n### Dependencies included\n- [MATLAB mesh to PDF with 3d interactive object](http://www.mathworks.com/matlabcentral/fileexchange/25383-matlab-mesh-to-pdf-with-3d-interactive-object)\n- [Generate vertices, faces and color for U3D format](http://www.mathworks.com/matlabcentral/fileexchange/27245-generate-vertices-faces-and-color-for-u3d-format)\n- [Generate U3D files from STL models for making multi-layer 3D PDF figures](http://www.mathworks.com/matlabcentral/fileexchange/31413-generate-u3d-files-from-stl-models-for-making-multilayer-3d-pdf-figures)\n- [Arclength](http://www.mathworks.com/matlabcentral/fileexchange/34871-arclength)\n- [Vectorized MeshGrid](http://www.mathworks.com/matlabcentral/fileexchange/35036-vectorized-meshgrid)\n- [Plot 2/3d Point(s)](http://www.mathworks.com/matlabcentral/fileexchange/34731-plot-23d-points)\n- [Plot 2/3d Vector(s)](http://www.mathworks.com/matlabcentral/fileexchange/35224-plot-23d-vectors)\n- [Take \u0026 restore hold](http://www.mathworks.com/matlabcentral/fileexchange/36641-take-restore-hold)\n- [Normalize n-dim vectors](http://www.mathworks.com/matlabcentral/fileexchange/36248-normalize-n-d-vectors-in-single-matrix-or-n-component-matrices)\n- [Cell Extrema](http://www.mathworks.com/matlabcentral/fileexchange/35983-cell-extrema)\n- [Vector Norm](http://www.mathworks.com/matlabcentral/fileexchange/10708-vector-norm)\n- [Verbatim](http://www.mathworks.com/matlabcentral/fileexchange/23194-verbatim-get-the-text-of-a-block-comment)\n\n### Other\n- [Create 3d interactive html file from MATLAB figure](http://www.mathworks.com/matlabcentral/fileexchange/27333-create-3d-interactive-html-file-from-matlab-surface)\n- [MATLAB 3d figure to 3d xhtml](http://www.mathworks.com/matlabcentral/fileexchange/32207-matlab-3d-figure-to-3d-xhtml)\n- [Remnan](http://www.mathworks.com/matlabcentral/fileexchange/10863-remnan)\n- [Export Fig](http://www.mathworks.com/matlabcentral/fileexchange/23629-exportfig)\n\n## License\nThis project is licensed under the 2-clause BSD license.\nThe license file includes the authors of all dependencies, so that they can be distributed with this project.\n\n## Hosted\nDevelopment on [github](https://github.com/johnyf/fig2u3d), releases here and also via [File Exchange](http://www.mathworks.com/matlabcentral/fileexchange/37640-export-figure-to-3d-interactive-pdf).\n\n## Keywords\n3d, u3d, graphics, export, save, plot, surface, vector, quiver, quivergroup, mesh, contourgroup, contour, data export, mathematics, vision, latex, pdf, media9, movie15, pdflatex, xelatex\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnyf%2Ffig2u3d","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjohnyf%2Ffig2u3d","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnyf%2Ffig2u3d/lists"}