File Exchange Pick of the Week

Our best user submissions

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the Original version of the page.

MATLAB 3D Figure to 3D (X)HTML 4

Posted by Guest Picker,

Eric’s pick this week is MATLAB 3D Figure to 3D (X)HTML by Dirk-Jan Kroon.

Dirk-Jan Kroon’s submission makes it easy to transfer 3D MATLAB plots to an interactive graphic on a web page. The tool doesn’t just translate geometry – it even includes transparency and lighting effects! You can build a complex scientific visualization in MATLAB and share it on your research web page.

Dirk-Jan says that the tool currently supports "Axes, Patch, Line, Surface and Light" objects. I decided to try this out on my favorite 3D model, a human femur bone, and added lighting and material effects for good measure. The model has an interesting back story...

In grad school I needed an accurate 3D model of a human femur bone for a project. Somehow, I convinced the university med school to loan me a real human femur bone! I don’t know where this thing came from, but I did get a great 3D scan from it.

Here's the model in MATLAB:

And here's the model in my web browser, where the resulting visualization supports zoom, pan, and rotate operations:

The tool creates both the 3D model as well as a sample web page with the model embedded into it. You can view the page with any of these popular web browsers:

The visualization is based on the x3dom framework. Be sure to read the x3dom supported browser page if you have difficulties displaying the example that Dirk-Jan provided with his submission. Also, if you have an older graphics driver you may need to update it.

Leave us a comment with your thoughts here, or leave a comment for Dirk-Jan.

Get the MATLAB code

Published with MATLAB® 7.12


Comments are closed.

4 CommentsOldest to Newest

Siva Srinivas Kolukula replied on : 2 of 4
Hi I ran these files and saved html version in test folder. I tried to open it with chrome and mozilla which are leatest, I get a blank screen showing X3DOM downloading the secene, but never I am getting the interactive image. Why is it? Any solution? Sreenu
Brett Shoelson replied on : 3 of 4
Siva, I'm sorry you're having problems with the function. Have you considered posting your question directly to the author's submission? Brett
Siva Srinivas Kolukula replied on : 4 of 4
Hi Brett.... I have posted the question directly at the submission...just now.. Thanks Sreenu