Get from Ico-github-logo

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from
Plot mesh as animated interactive html

  • x3mesh_deform(f,v, v2, va...
    A simple function to convert a matlab mesh consisting of faces (f) and
  • demo1.m
    This files demos creating a interactive html file from a triangular mesh
  • demo2.m
    More complex example
  • View all files
4.7 | 4 ratings Rate this file 27 Downloads (last 30 days) File Size: 256 KB File ID: #41808 Version: 1.11
image thumbnail

Plot mesh as animated interactive html


Benjamin I (view profile)


21 May 2013 (Updated )

Convert a matlab mesh to a transforming 3D figure on the web

Editor's Notes:

This file was selected as MATLAB Central Pick of the Week

| Watch this File

File Information

This script allows a deforming mesh to be exported to the web. The code creates html files in a subfolder called htmlfigs that can be opened in a browser.
The mesh can be rotated and zoomed in the browser, and transforms between two sets of input vertices.
Example of the output:
(rotate the mesh to see if from a better angle)
See demo1.m and demo2.m to test it out.

This script creates html files that use the awesome x3dom library and require webgl. This is only supported by recent versions of chrome, firefox, opera and safari. IE does not support webgl.

Developed from:

Inspired by:

Let me know if you find any issues or have any ideas...

If you can't view the example then your system/drivers might not support WebGL. Please try this link to check that your system is supported and fix any configuration:

MATLAB release MATLAB 8.0 (R2012b)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (6)
07 Feb 2017 Gerd Kunert

Works with Firefox 51 for me.

06 Feb 2017 Benjamin I

Benjamin I (view profile)

Hi Gerd,

It needs a system that is capable of webgl (i.e. a fairly recent graphics card). Can you try this link and see if you can see a cube?

Otherwise you might need to update your drivers.

Webgl (and therefore this link) works on all modern web browsers.

Comment only
06 Feb 2017 Gerd Kunert

Did not work with Firefox 46.0.1 nor with IE 11.

22 May 2013 Benjamin I

Benjamin I (view profile)

Thanks Sven and Scott. Useful comments. Will see what I can do about axes and octave compatibility.

Comment only
22 May 2013 Sven Koerner

Sven Koerner (view profile)

Very cool work. It is possible to get axis in the diagram?

21 May 2013 Scott Richardson

Wow this is awesome Benjamin. I just with I could get it to work with Octave.

22 Aug 2015 1.1

linked to github

06 Dec 2016 1.11

update title

06 Feb 2017 1.11

add issues section

Contact us