|
"Roger Stafford" <ellieandrogerxyzzy@mindspring.com.invalid> wrote in message <ibnur3$bv5$1@fred.mathworks.com>...
> "Samit Biswas" <samitbiet@gmail.com> wrote in message <ibntac$22m$1@fred.mathworks.com>...
> > Thanks for the posted replies....
> > How can I Generate set of arcs for a fixed arc length. The arcs may be circular and may not be circular.
> - - - - - - - - -
> Once you have generated a curve of a given total arc length with either a fixed curvature or a curvature that varies as a given function of arc distance along the curve, you can create other curves from this one by translating and rotating this curve as desired. They will all have the same curvature profile and total arc length. It is not necessary to generate them each time. There is a vast number of threads in this newsgroup that have shown how to rotate and translate a set of x,y points.
>
> Roger Stafford
Consider the following code
%% ------
figure
t=linspace(0,(pi/2),20);
x= cos(t);y= sin(t);
plot(x,y);
x= 1.2*cos(t);y= sin(t);
hold on
plot(x,y);
x= 1.4*cos(t);y= sin(t);
hold on
plot(x,y);
x= 1.6*cos(t);y= sin(t);
hold on
plot(x,y);
x= 1.8*cos(t);y= sin(t);
hold on
plot(x,y);
x= 2*cos(t);y= sin(t);
hold on
plot(x,y);
x= 2*cos(t);y= 0* sin(t) + 1; %%curve like line for y==1
plot(x,y);
x= cos(t);y= -sin(t)+2;
plot(x,y);
x= 1.2*cos(t);y= -sin(t)+2;
hold on
plot(x,y);
x= 1.4*cos(t);y= -sin(t)+2;
hold on
plot(x,y);
x= 1.6*cos(t);y= -sin(t)+2;
hold on
plot(x,y);
x= 1.8*cos(t);y= -sin(t)+2;
hold on
plot(x,y);
x= 2*cos(t);y= -sin(t)+2;
hold on
plot(x,y);
%% ----
The above code generates a set of arcs. Here data points for x and y considered 20. In this case chord length(distance between starting point and ending point of an arc) is not same for all the arcs.
Now I have to generate that types of arcs where the chord length for the set of all arcs should be same. is there any best way to generate this types of curve ?
------
Samit Biswas
|