title: Plot a curve with each points specifc distance away (Matlab)
body: <p>I am trying to draw a curve where each points are specific distance away from each other. 
  Now, blow shows pretty much what I wanted to do but I want sin like curve and not constant radius.</p>
  
  <pre><code> R = 50; %radius
  Gap = 0.1;          % gap between points   
  Curve = 180;        
      rad = 0;
  
  n= pi*2*R*Curve/360/Gap;           % n is length of arc
  th = linspace( pi, rad ,n);     
  x = R*cos(th)+R;    
  y = R*sin(th)+100; 
  
  PathDB.Route1.x(1:1001,1)=0;
  PathDB.Route1.y = (0:Gap:100)';
  LengthY = length(PathDB.Route1.y);
  
  PathDB.Route1.x(1001:1001+length(x)-1,1)=x ;
  PathDB.Route1.y(LengthY:LengthY+length(y)-1) = y;
  
  LengthX = length(PathDB.Route1.x);
  LengthY = length(PathDB.Route1.y);
  PathDB.Route1.x(LengthX:LengthX+1000,1)=PathDB.Route1.x(LengthX,1);
  PathDB.Route1.y(LengthY:LengthY+1000,1)= (PathDB.Route1.y(LengthY,1):-Gap:0);
  
  
  plot(PathDB.Route1.x, PathDB.Route1.y);
  grid ;         
  axis equal 
  </code></pre>
  
  <p>All I want to do is instead of perfect curve, I want to add sin like curve which are plotted by 0.1.
  I'm sorry about my poor coding skills I hope you can understand and help me.</p>
  
  <p>Any advice is appreciated!</p>
  
  <p>Rui </p>