title: 3d Ring in Matlab using Patch
body: <p>I am trying to make a 3d ring in a matlab. Following is something similar to what I am upto:</p>
  
  <pre><code>t = linspace(0,2*pi);
  rin = 0.1;
  rout = 0.25;
  xin = 0.5 + rin*cos(t);% 0.5 is the center of the ring
  xout = 0.5 + rout*cos(t);
  yin = 0.5 + rin*sin(t);
  yout = 0.5 + rout*sin(t);
  
  % Make patch
  hp = patch([xout,xin],[yout,yin],'g','linestyle','none','facealpha',0.25);
  </code></pre>
  
  <p>Now, I want to extend this to the 3d case. I wanted to give height to this ring. But when I try to add a vector <code>[z1,z2]</code> where</p>
  
  <pre><code>z1=0.5*ones(size(xin));
  z2=z1;
  </code></pre>
  
  <p>I have tried different combination of Z1 and Z2 still I am unable to find the solution.</p>