Skip to content

Commit 1692afe

Browse files
committed
updated readme
1 parent 5b7d25e commit 1692afe

File tree

2 files changed

+53
-18
lines changed

2 files changed

+53
-18
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,5 +85,6 @@ syntax: glob
8585
*.mp4
8686
# site-specific
8787
idtf2u3d/bin/*
88+
dist/*
8889
*.u3d
8990
*.vws

README.md

Lines changed: 52 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,41 @@ Summary
66
Export figure as a U3D file or directly to 3D interactive graphics within a PDF.
77
Licensed under 2-clause BSD.
88

9-
Description
10-
-----------
9+
[Documentation](https://www.cds.caltech.edu/~ifilippi/temp/releases/matlab/fig2u3d/fig2u3d_manual.pdf)
10+
11+
[PDF created](https://www.cds.caltech.edu/~ifilippi/temp/releases/matlab/fig2u3d/example.pdf) for figure below (3d <font color="red">needs</font> [Adobe Reader](http://get.adobe.com/reader/)).
12+
13+
<img src="https://www.cds.caltech.edu/~ifilippi/temp/releases/matlab/fig2u3d/logo.png" width=200>
14+
15+
The `LaTeX` needed looks like:
16+
17+
```
18+
\documentclass{article}
19+
\usepackage{graphicx}
20+
\usepackage[dvipdfmx]{media9}
21+
22+
\begin{document}
23+
\begin{figure}
24+
\centering
25+
\includemedia[
26+
width=0.8\textwidth,
27+
activate=pagevisible,
28+
%deactivate=pageinvisible,
29+
3Dtoolbar,
30+
3Dviews=./example_supercyclide.vws
31+
]{
32+
\includegraphics[width=0.8\textwidth]{example_supercyclide.pdf}
33+
}{./example_supercyclide.u3d}
34+
\caption{An implicitly defined elliptic supercyclide.}
35+
\label{fig:example_supercyclide}
36+
\end{figure}
37+
\end{document}
38+
```
39+
40+
## Description
1141
`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`.
1242

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.
43+
The `idtf2u3d` executables are included from [this project](http://sourceforge.net/projects/u3d/) (see dependencies below).
1444

1545
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`.
1646

@@ -30,17 +60,25 @@ Graphics object supported for export include:
3060

3161
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.
3262

33-
Dependencies
34-
------------
63+
<img src="https://www.cds.caltech.edu/~ifilippi/temp/releases/matlab/fig2u3d/fig2u3d_workflow.png" width=400>
3564

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.
65+
## Installation
3766

67+
Download & unpack from the [release](https://github.com/johnyf/fig2u3d/releases) the:
68+
69+
- `MATLAB` code,
70+
- idtf2u3d converter Mac OS X, Linux, Windows binaries, place this under `idtf2u3d/bin` (result: `idtf2u3d/bin/glx…` etc),
71+
- required `MATLAB` packages, place them anywhere.
72+
73+
Add all the above and their subdirectories to your `MATLAB` path, e.g. using the `pathtool` command.
74+
75+
### Optional
3876
- `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`).
3977

40-
Included
41-
--------
42-
The distribution archive includes these dependencies (not in the git repository):
78+
## Acknowledgments
79+
- [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)
4380

81+
### Dependencies included
4482
- [MATLAB mesh to PDF with 3d interactive object](http://www.mathworks.com/matlabcentral/fileexchange/25383-matlab-mesh-to-pdf-with-3d-interactive-object)
4583
- [Generate vertices, faces and color for U3D format](http://www.mathworks.com/matlabcentral/fileexchange/27245-generate-vertices-faces-and-color-for-u3d-format)
4684
- [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)
@@ -54,22 +92,18 @@ The distribution archive includes these dependencies (not in the git repository)
5492
- [Vector Norm](http://www.mathworks.com/matlabcentral/fileexchange/10708-vector-norm)
5593
- [Verbatim](http://www.mathworks.com/matlabcentral/fileexchange/23194-verbatim-get-the-text-of-a-block-comment)
5694

57-
Acknowledgments
58-
---------------
95+
### Other
5996
- [Create 3d interactive html file from MATLAB figure](http://www.mathworks.com/matlabcentral/fileexchange/27333-create-3d-interactive-html-file-from-matlab-surface)
6097
- [MATLAB 3d figure to 3d xhtml](http://www.mathworks.com/matlabcentral/fileexchange/32207-matlab-3d-figure-to-3d-xhtml)
6198
- [Remnan](http://www.mathworks.com/matlabcentral/fileexchange/10863-remnan)
6299
- [Export Fig](http://www.mathworks.com/matlabcentral/fileexchange/23629-exportfig)
63100

64-
License
65-
-------
101+
## License
66102
This project is licensed under the 2-clause BSD license.
67103
The license file includes the authors of all dependencies, so that they can be distributed with this project.
68104

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).
105+
## Hosted
106+
Development 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).
72107

73-
Keywords
74-
--------
108+
## Keywords
75109
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

Comments
 (0)