5.0

5.0 | 2 ratings Rate this file 17 Downloads (last 30 days) File Size: 3.51 KB File ID: #27333
image thumbnail

Create 3D-interactive HTML File from MATLAB surface

by

 

This function uses the abiliy from MuPad to create javaview-files (jvd, jvx) and html - documents.

| Watch this File

File Information
Description

Syntax:
   javaview(surface_handle, filename, destination, source, open_html)

Description:
   This function generates output files for Javaview (www.javaview.de).
   It allows to display and interact with 3D-Graph not only in the
   javaview engine, but also in html-Documents. See javaview
   documentation for more information about how to interact.

   There are 4 output files:
       a) first file (.stl) is generated by the surf2stl function (Many
          thanks to Bill McDonald, this function is availabe at the MCFE
          and was pick of the week on June 5th, 2009)
       b) the second and third file (jvx) and (jvd) are input files for
          javaview and are generated by mupad. The jvx-file describes the
          3d-graph, the jvd file descrribes scene options
       c) the last file is an html file, were the 3d-Graph is displayed

  Because the applet in html file need the javaruntime for javaview the
  jars directory from the "source" (input parameter) directory is copied
  to the destination folder.
  open_html is true or false. When it is true your standard webbrowser is
  opened and you will see the surface in the html file.

  Parameter:
      1. surface_handle - handle to surface graph
      2. filename - filename for *.stl, .jvx, *.jvd, *.html
      3. destination - folder where all files are saved
      4. source - source folder of jars (see jvaview installation path)
      5. open_html - shows the result html in your standard webbrowser

 Sorry for the work around with the handmade copy and paste when to
 generate the javaview files. But evalin(symengine, ...) does not produce
 the required files.

Online Example:
      http://wwwpub.zih.tu-dresden.de/~s9034647/peaksurface.html

Example:
      [X,Y,Z] = peaks(30);
      h = surf(X,Y,Z);
      javaview(h, 'peaksurface', 'C:\Users\sk\Desktop\3d-PDF\jvtest', 'C:\Program Files (x86)\JavaView\jars', 1)
      

Bugs and suggestions:
   Please send to Sven Koerner: koerner(underline)sven(add)gmx.de

You need to download and install first:
   www.javaview.de
   http://blogs.mathworks.com/pick/2009/06/5/writing-to-stl-files/
   Symbolic Math Toolbox with MuPad

Acknowledgements

This file inspired Export Figure To 3 D Interactive Pdf.

Required Products Symbolic Math Toolbox
MATLAB release MATLAB 7.8 (R2009a)
Other requirements www.javaview.de http://blogs.mathworks.com/pick/2009/06/5/writing-to-stl-files/
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (6)
09 Mar 2013 Sven Koerner

Hi David
some text should appear. The command to draw the jvd data.
This is an typical windows command (copy & paste)

25 Jan 2013 David

Hello, when we type stvg-v and ENTER into MuPad what should we expect to happen?

This does not seem to be a valid MuPad command.

15 Aug 2010 Igor  
26 Apr 2010 pluton schmidt

hum, it looks like yes!! I have to investigate further to make sure. U3d files can now be directly embedded within a pdf file, that's why I was asking. Thanks

22 Apr 2010 Sven Koerner

Hi pluton,
do you mean something like this: http://www.mathworks.com/matlabcentral/fileexchange/27245-generate-vertices-faces-and-color-for-u3d-format

22 Apr 2010 pluton schmidt

Nice job. What about a generalization to the u3d format?
http://en.wikipedia.org/wiki/Universal_3D

Contact us