<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/237269</link>
    <title>MATLAB Central Newsreader - Import a 3D model into Matlab and rotate/translate it</title>
    <description>Feed for thread: Import a 3D model into Matlab and rotate/translate it</description>
    <language>en-us</language>
    <copyright>&amp;copy;1994-2012 by MathWorks, Inc.</copyright>
    <webmaster>webmaster@mathworks.com</webmaster>
    <generator>MATLAB Central Newsreader</generator>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <ttl>60</ttl>
    <image>
      <title>MathWorks</title>
      <url>http://www.mathworks.com/images/membrane_icon.gif</url>
    </image>
    <item>
      <pubDate>Thu, 09 Oct 2008 15:08:01 -0400</pubDate>
      <title>Import a 3D model into Matlab and rotate/translate it</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/237269#604443</link>
      <author>Alexander </author>
      <description>Hi, &lt;br&gt;
&lt;br&gt;
I would like to import a 3D model file (like from Maya, 3DSMax, or something else) into Matlab in order to access its coordinates and the rotation angles. &lt;br&gt;
&lt;br&gt;
Can you tell me how this is possible? &lt;br&gt;
My aim is actually to animate the rotation of a fairly simple 3D model (using either drawnow or movie for animation). Will Matlab be able to handle this on a relatively up-to-date machine?&lt;br&gt;
&lt;br&gt;
Bye, &lt;br&gt;
&lt;br&gt;
Alexander</description>
    </item>
    <item>
      <pubDate>Thu, 09 Oct 2008 16:01:52 -0400</pubDate>
      <title>Re: Import a 3D model into Matlab and rotate/translate it</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/237269#604455</link>
      <author>Rune Allnor</author>
      <description>On 9 Okt, 17:08, &quot;Alexander &quot; &amp;lt;alexander.erl...@gmail.com&amp;gt; wrote:&lt;br&gt;
&amp;gt; Hi,&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; I would like to import a 3D model file (like from Maya, 3DSMax, or something else) into Matlab in order to access its coordinates and the rotation angles.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Can you tell me how this is possible?&lt;br&gt;
&lt;br&gt;
In principle this is easy: Just get a description&lt;br&gt;
of whatever file format you import from, and read&lt;br&gt;
the data into the data structures internal to matlab.&lt;br&gt;
&lt;br&gt;
In practice there are two problems: Obtaining the&lt;br&gt;
file format descriptions and selecting what data&lt;br&gt;
structures to use internal to matlab.&lt;br&gt;
&lt;br&gt;
&amp;gt; My aim is actually to animate the rotation of a fairly simple 3D model (using either drawnow or movie for animation). Will Matlab be able to handle this on a relatively up-to-date machine?&lt;br&gt;
&lt;br&gt;
Probably. Just be aware that 3D graphics is one&lt;br&gt;
of the more demanding computational tasks around,&lt;br&gt;
both what memory and algorithms are concerned, and&lt;br&gt;
that matlab is notoriously inefficient what memory&lt;br&gt;
and algorithms are concerned.&lt;br&gt;
&lt;br&gt;
Rune</description>
    </item>
    <item>
      <pubDate>Fri, 10 Oct 2008 21:56:03 -0400</pubDate>
      <title>Re: Import a 3D model into Matlab and rotate/translate it</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/237269#604717</link>
      <author>Alexander </author>
      <description>Thank you Rune, &lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&amp;gt; In practice there are two problems: Obtaining the&lt;br&gt;
&amp;gt; file format descriptions and selecting what data&lt;br&gt;
&amp;gt; structures to use internal to matlab.&lt;br&gt;
&lt;br&gt;
yeah, I've seen that there is a file converter from CAD to Matlab, but I understand that there is no simple, Mathworks-predefined way. So I guess I'll have to change my plans a little.&lt;br&gt;
&lt;br&gt;
Actually, what my goal is, is to build a simulation of a spinning top. For the beginning, some simple, symmetric looking object would suffice. I need access to its Euler angles as I receive them from numerically solving the differential equations. If all of that was given, I could simply update the three Euler angles frame by frame using drawnow or movie.   &lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&amp;gt; Probably. Just be aware that 3D graphics is one&lt;br&gt;
&amp;gt; of the more demanding computational tasks around,&lt;br&gt;
&amp;gt; both what memory and algorithms are concerned, and&lt;br&gt;
&amp;gt; that matlab is notoriously inefficient what memory&lt;br&gt;
&amp;gt; and algorithms are concerned.&lt;br&gt;
&lt;br&gt;
Actually, if sometime in the distant future I will realize doing the 3D grapics stuff in Matlab is too slow, is there an easy way to use a different renderer, like openGL? I mean, can I operate and update things from Matlab just like I described it, but address openGL directly?</description>
    </item>
    <item>
      <pubDate>Fri, 10 Oct 2008 22:12:32 -0400</pubDate>
      <title>Re: Import a 3D model into Matlab and rotate/translate it</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/237269#604720</link>
      <author>Rune Allnor</author>
      <description>On 10 Okt, 23:56, &quot;Alexander &quot; &amp;lt;alexander.erl...@gmail.com&amp;gt; wrote:&lt;br&gt;
&amp;gt; Thank you Rune,&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; In practice there are two problems: Obtaining the&lt;br&gt;
&amp;gt; &amp;gt; file format descriptions and selecting what data&lt;br&gt;
&amp;gt; &amp;gt; structures to use internal to matlab.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; yeah, I've seen that there is a file converter from CAD to Matlab, but I understand that there is no simple, Mathworks-predefined way. So I guess I'll have to change my plans a little.&lt;br&gt;
&lt;br&gt;
Not necessarily. It is perfectly possible to write&lt;br&gt;
your own routine to read the files if you can get&lt;br&gt;
the file format spec.&lt;br&gt;
&lt;br&gt;
&amp;gt; &amp;gt; Probably. Just be aware that 3D graphics is one&lt;br&gt;
&amp;gt; &amp;gt; of the more demanding computational tasks around,&lt;br&gt;
&amp;gt; &amp;gt; both what memory and algorithms are concerned, and&lt;br&gt;
&amp;gt; &amp;gt; that matlab is notoriously inefficient what memory&lt;br&gt;
&amp;gt; &amp;gt; and algorithms are concerned.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Actually, if sometime in the distant future I will realize doing the 3D grapics stuff in Matlab is too slow, is there an easy way to use a different renderer, like openGL? I mean, can I operate and update things from Matlab just like I described it, but address openGL directly?&lt;br&gt;
&lt;br&gt;
'Easy' and 'fast 3d graphics' are contradictions in terms.&lt;br&gt;
You can configuure matlab to use the openGL renderer,&lt;br&gt;
but the bottleneck is not necessarily to render the graphics,&lt;br&gt;
but several factors distributed more or less evenly throughout&lt;br&gt;
everything, from data formats (matlab uses matrices of double-&lt;br&gt;
precision floating points by default) to memory access (you have&lt;br&gt;
to pay very carful attention to how you store stuff or you might&lt;br&gt;
get cache misses on every other data access).&lt;br&gt;
&lt;br&gt;
Rune</description>
    </item>
  </channel>
</rss>

