|
| 1 | +Export figure to 3D interactive PDF |
| 2 | +=================================== |
| 3 | + |
| 4 | +Summary |
| 5 | +------- |
| 6 | +Export figure as a U3D file or directly to 3D interactive graphics within a PDF. |
| 7 | +Licensed under 2-clause BSD. |
| 8 | + |
| 9 | +Description |
| 10 | +----------- |
| 11 | +`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`. |
| 12 | + |
| 13 | +The `idtf2u3d` executables are needed from [this project](http://sourceforge.net/projects/u3d/). To obtain them download [this](http://www.mathworks.com/matlabcentral/fileexchange/25383-matlab-mesh-to-pdf-with-3d-interactive-object) and place the `bin` directory in the `idtf2u3d` directory of the `fig2u3d` distribution. |
| 14 | + |
| 15 | +A `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`. |
| 16 | + |
| 17 | +The [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. |
| 18 | + |
| 19 | +For 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. |
| 20 | + |
| 21 | +`fig2pdf3d` Converts the figure directly to a PDF containing only an interactive 3D graphics object. |
| 22 | + |
| 23 | +Graphics object supported for export include: |
| 24 | + |
| 25 | +- line |
| 26 | +- surface |
| 27 | +- patch |
| 28 | +- quivergroup |
| 29 | +- contourgroup |
| 30 | + |
| 31 | +Line 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. |
| 32 | + |
| 33 | +Dependencies |
| 34 | +------------ |
| 35 | + |
| 36 | +- `fig2u3d` needs the idtf2u3d converter executable by downloading [this](http://www.mathworks.com/matlabcentral/fileexchange/25383-matlab-mesh-to-pdf-with-3d-interactive-object) and placing the `bin` directory in the `idtf2u3d` directory of the `fig2u3d` distribution. |
| 37 | + |
| 38 | +- `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`). |
| 39 | + |
| 40 | +Included |
| 41 | +-------- |
| 42 | +The distribution archive includes these dependencies (not in the git repository): |
| 43 | + |
| 44 | +- [MATLAB mesh to PDF with 3d interactive object](http://www.mathworks.com/matlabcentral/fileexchange/25383-matlab-mesh-to-pdf-with-3d-interactive-object) |
| 45 | +- [Generate vertices, faces and color for U3D format](http://www.mathworks.com/matlabcentral/fileexchange/27245-generate-vertices-faces-and-color-for-u3d-format) |
| 46 | +- [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) |
| 47 | +- [Arclength](http://www.mathworks.com/matlabcentral/fileexchange/34871-arclength) |
| 48 | +- [Vectorized MeshGrid](http://www.mathworks.com/matlabcentral/fileexchange/35036-vectorized-meshgrid) |
| 49 | +- [Plot 2/3d Point(s)](http://www.mathworks.com/matlabcentral/fileexchange/34731-plot-23d-points) |
| 50 | +- [Plot 2/3d Vector(s)](http://www.mathworks.com/matlabcentral/fileexchange/35224-plot-23d-vectors) |
| 51 | +- [Take & restore hold](http://www.mathworks.com/matlabcentral/fileexchange/36641-take-restore-hold) |
| 52 | +- [Normalize n-dim vectors](http://www.mathworks.com/matlabcentral/fileexchange/36248-normalize-n-d-vectors-in-single-matrix-or-n-component-matrices) |
| 53 | +- [Cell Extrema](http://www.mathworks.com/matlabcentral/fileexchange/35983-cell-extrema) |
| 54 | +- [Vector Norm](http://www.mathworks.com/matlabcentral/fileexchange/10708-vector-norm) |
| 55 | +- [Verbatim](http://www.mathworks.com/matlabcentral/fileexchange/23194-verbatim-get-the-text-of-a-block-comment) |
| 56 | + |
| 57 | +Acknowledgments |
| 58 | +--------------- |
| 59 | +- [Create 3d interactive html file from MATLAB figure](http://www.mathworks.com/matlabcentral/fileexchange/27333-create-3d-interactive-html-file-from-matlab-surface) |
| 60 | +- [MATLAB 3d figure to 3d xhtml](http://www.mathworks.com/matlabcentral/fileexchange/32207-matlab-3d-figure-to-3d-xhtml) |
| 61 | +- [Remnan](http://www.mathworks.com/matlabcentral/fileexchange/10863-remnan) |
| 62 | +- [Export Fig](http://www.mathworks.com/matlabcentral/fileexchange/23629-exportfig) |
| 63 | + |
| 64 | +License |
| 65 | +------- |
| 66 | +This project is licensed under the 2-clause BSD license. |
| 67 | +The license file includes the authors of all dependencies, so that they can be distributed with this project. |
| 68 | + |
| 69 | +Hosted |
| 70 | +------ |
| 71 | +Development on [github](https://github.com/johnyf/fig2u3d) and releases distributed also via the `MATLAB` [File Exchange](http://www.mathworks.com/matlabcentral/fileexchange/37640-export-figure-to-3d-interactive-pdf). |
| 72 | + |
| 73 | +Keywords |
| 74 | +-------- |
| 75 | +3d, u3d, graphics, export, save, plot, surface, vector, quiver, quivergroup, mesh, contourgroup, contour, data export, mathematics, vision, latex, pdf, media9, movie15, pdflatex, xelatex |
0 commit comments