<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/242958</link>
    <title>MATLAB Central Newsreader - Building a 3D surface by giving coordinates (in a struct)</title>
    <description>Feed for thread: Building a 3D surface by giving coordinates (in a struct)</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>Fri, 23 Jan 2009 06:55:04 -0500</pubDate>
      <title>Building a 3D surface by giving coordinates (in a struct)</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/242958#623370</link>
      <author>Daniel Drori</author>
      <description>Hey there!!&lt;br&gt;
&lt;br&gt;
I'm trying to build a 3D surface.&lt;br&gt;
I used a struct to build my data-base witch includes 3 fields &quot;x&quot;, &quot;y&quot;, &quot;z&quot;.&lt;br&gt;
Now, after my bata base is built and ready and have all the coordinates I collected, I want, simply, to show all the 3-coordinates-points and connect them with a curvey surface.&lt;br&gt;
&lt;br&gt;
Can anyone please help me out with it?&lt;br&gt;
1)  How to release the coordinates from the struct?&lt;br&gt;
2)  How to use those coordinates for building the surface?&lt;br&gt;
&lt;br&gt;
Thanx alot,&lt;br&gt;
Daniel.  </description>
    </item>
    <item>
      <pubDate>Fri, 23 Jan 2009 09:12:02 -0500</pubDate>
      <title>Re: Building a 3D surface by giving coordinates (in a struct)</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/242958#623385</link>
      <author>Daniel Drori</author>
      <description>&quot;Daniel Drori&quot; &amp;lt;dandul_d@yahoo.com&amp;gt; wrote in message &amp;lt;glbpk8$ig7$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; Hey there!!&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I'm trying to build a 3D surface.&lt;br&gt;
&amp;gt; I used a struct to build my data-base witch includes 3 fields &quot;x&quot;, &quot;y&quot;, &quot;z&quot;.&lt;br&gt;
&amp;gt; Now, after my bata base is built and ready and have all the coordinates I collected, I want, simply, to show all the 3-coordinates-points and connect them with a curvey surface.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Can anyone please help me out with it?&lt;br&gt;
&amp;gt; 1)  How to release the coordinates from the struct?&lt;br&gt;
&amp;gt; 2)  How to use those coordinates for building the surface?&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Thanx alot,&lt;br&gt;
&amp;gt; Daniel.  &lt;br&gt;
&lt;br&gt;
Please help...</description>
    </item>
    <item>
      <pubDate>Fri, 30 Jan 2009 17:05:04 -0500</pubDate>
      <title>Re: Building a 3D surface by giving coordinates (in a struct)</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/242958#625043</link>
      <author>David Doria</author>
      <description>[X,Y] = meshgrid(x,y);&lt;br&gt;
Z = griddata(x,y,z, X, Y);&lt;br&gt;
figure;&lt;br&gt;
surf(X,Y,Z);&lt;br&gt;
&lt;br&gt;
Who knows why they don't provide a function to do this...?&lt;br&gt;
&lt;br&gt;
Hope that helps!&lt;br&gt;
Dave</description>
    </item>
    <item>
      <pubDate>Fri, 30 Jan 2009 18:26:01 -0500</pubDate>
      <title>Re: Building a 3D surface by giving coordinates (in a struct)</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/242958#625057</link>
      <author>us</author>
      <description>&quot;David Doria&quot; &lt;br&gt;
&amp;gt; [X,Y] = meshgrid(x,y);&lt;br&gt;
&amp;gt; Z = griddata(x,y,z, X, Y);&lt;br&gt;
&amp;gt; figure;&lt;br&gt;
&amp;gt; surf(X,Y,Z);&lt;br&gt;
&amp;gt; Who knows why they don't provide a function to do this...&lt;br&gt;
&lt;br&gt;
simply to give CSSMers something to do for the rest of their lives...&lt;br&gt;
&lt;br&gt;
:-)&lt;br&gt;
us</description>
    </item>
    <item>
      <pubDate>Wed, 04 Feb 2009 21:47:01 -0500</pubDate>
      <title>Re: Building a 3D surface by giving coordinates (in a struct)</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/242958#626194</link>
      <author>Daniel Drori</author>
      <description>&quot;us &quot; &amp;lt;us@neurol.unizh.ch&amp;gt; wrote in message &amp;lt;glvgnp$3h0$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &quot;David Doria&quot; &lt;br&gt;
&amp;gt; &amp;gt; [X,Y] = meshgrid(x,y);&lt;br&gt;
&amp;gt; &amp;gt; Z = griddata(x,y,z, X, Y);&lt;br&gt;
&amp;gt; &amp;gt; figure;&lt;br&gt;
&amp;gt; &amp;gt; surf(X,Y,Z);&lt;br&gt;
&amp;gt; &amp;gt; Who knows why they don't provide a function to do this...&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; simply to give CSSMers something to do for the rest of their lives...&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; :-)&lt;br&gt;
&amp;gt; us&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
Hey there!!&lt;br&gt;
&lt;br&gt;
I'm trying to build a 3d surface from several samples of x,y,z that i took from the original picture. the x,y are presnting the position by pixels, and the 'z' is the distance from the camera to that spot.&lt;br&gt;
&lt;br&gt;
I'm reading the data from a file into 3 vectors (x,y,z) and trying to build 3 matrices (XI,YI,ZI) with the code I use bellow:&lt;br&gt;
&lt;br&gt;
tx = 1:1:PicSize(1);&lt;br&gt;
ty = 1:1:PicSize(2);&lt;br&gt;
&lt;br&gt;
[XI,YI] = meshgrid(tx,ty);&lt;br&gt;
ZI = griddata(x,y,z,XI,YI,'cubic');&lt;br&gt;
&lt;br&gt;
surf(XI,YI,ZI);&lt;br&gt;
mesh(XI,YI,ZI), hold on;&lt;br&gt;
plot3(x,y,z,'o'), hold off&lt;br&gt;
&lt;br&gt;
As output I get a graph, but that graph is not similar at all to the picture that I took the samples from. The data that I use is fully correct.&lt;br&gt;
&lt;br&gt;
The pixels' position (x,y) that I get from the picture is after using the method in matlab:&lt;br&gt;
datacursormode on&lt;br&gt;
I think this function might gives me wrong data, because the 0,0 position starts from the upper left corner and not from the bottom as I thought it should be.&lt;br&gt;
When I show the graph using surf(XI,YI,ZI); the 0,0 position is at the bottom.&lt;br&gt;
&lt;br&gt;
Dose anyone know how can I solve this problem?&lt;br&gt;
&lt;br&gt;
Thanks in advance.&lt;br&gt;
Daniel Drori. </description>
    </item>
    <item>
      <pubDate>Mon, 29 Aug 2011 10:50:26 -0400</pubDate>
      <title>Re: Building a 3D surface by giving coordinates (in a struct)</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/242958#850713</link>
      <author>Luis FIlipe Ferreira Marques Santos</author>
      <description>&quot;David Doria&quot; &amp;lt;daviddoria@gmail.com&amp;gt; wrote in message &amp;lt;glvc00$f47$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; [X,Y] = meshgrid(x,y);&lt;br&gt;
&amp;gt; Z = griddata(x,y,z, X, Y);&lt;br&gt;
&amp;gt; figure;&lt;br&gt;
&amp;gt; surf(X,Y,Z);&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Who knows why they don't provide a function to do this...?&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Hope that helps!&lt;br&gt;
&amp;gt; Dave&lt;br&gt;
&lt;br&gt;
Hi Dave, I'm trying to build something like Daniel.&lt;br&gt;
I'm loading my data from a txt and up ti this point is working just fine.&lt;br&gt;
&lt;br&gt;
The problem is because its a lot of triplets (3 coordinates), around 4 millions points, and I get this ERROR from MATLAB.&lt;br&gt;
&quot;??? Maximum variable size allowed by the program is exceeded.&quot;&lt;br&gt;
&lt;br&gt;
I think its because of the size, but there is another way to surface all the 4 millions points?&lt;br&gt;
I need all the data at same time, and cannot cut it to see it by smaller regions.&lt;br&gt;
&lt;br&gt;
If you can give some orientation, I would be very thankful.&lt;br&gt;
&lt;br&gt;
Best Regards&lt;br&gt;
&lt;br&gt;
Luis  </description>
    </item>
  </channel>
</rss>

