Giter Site home page Giter Site logo

wrangers / fig2u3d Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dmytrosytnyk/fig2u3d

0.0 1.0 0.0 16.65 MB

Export MATLAB figure as U3D file or directly to 3D interactive PDF

Home Page: http://www.mathworks.com/matlabcentral/fileexchange/37640-export-figure-to-3d-interactive-pdf

License: BSD 2-Clause "Simplified" License

MATLAB 98.38% Makefile 0.22% TeX 1.40%

fig2u3d's Introduction

Export figure to 3D interactive PDF

Summary

Export figure as a U3D file or directly to 3D interactive graphics within a PDF. Licensed under 2-clause BSD.

Documentation

PDF created for figure below (3d needs Adobe Reader).

The LaTeX needed looks like:

\documentclass{article}
\usepackage{graphicx}
\usepackage[dvipdfmx]{media9}

\begin{document}
	\begin{figure}
		\centering
		\includemedia[
			width=0.8\textwidth,
			activate=pagevisible,
			%deactivate=pageinvisible,
			3Dtoolbar,
			3Dviews=./example_supercyclide.vws
		]{
			\includegraphics[width=0.8\textwidth]{example_supercyclide.pdf}
		}{./example_supercyclide.u3d}
		\caption{An implicitly defined elliptic supercyclide.}
		\label{fig:example_supercyclide}
	\end{figure}
\end{document}

Description

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.

The idtf2u3d executables are included from this project (see dependencies below).

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.

The media9 LaTeX package can import U3D files with their associated VWS files in a PDF document.

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.

fig2pdf3d Converts the figure directly to a PDF containing only an interactive 3D graphics object.

Graphics object supported for export include:

  • line
  • surface
  • patch
  • quivergroup
  • contourgroup

Line colors and marker styles, surfaces and quivers with NaNs 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.

Installation

Download & unpack from the release the:

  • MATLAB code,
  • idtf2u3d converter Mac OS X, Linux, Windows binaries, place this under idtf2u3d/bin (result: idtf2u3d/bin/glx… etc),
  • required MATLAB packages, place them anywhere.

Add all the above and their subdirectories to your MATLAB path, e.g. using the pathtool command.

Optional

Acknowledgments

Dependencies included

Other

License

This project is licensed under the 2-clause BSD license. The license file includes the authors of all dependencies, so that they can be distributed with this project.

Hosted

Development on github, releases here and also via File Exchange.

Keywords

3d, u3d, graphics, export, save, plot, surface, vector, quiver, quivergroup, mesh, contourgroup, contour, data export, mathematics, vision, latex, pdf, media9, movie15, pdflatex, xelatex

Fix bug

rm command

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.