Please any idea of how I can flip an arc?

I have an arc of a circle which is facing the centre of the circle but I want to flip this arc by 180 degrees to make it face the opposite direction as illustrated in the attachment.

 Accepted Answer

Try this:
a = linspace(0, pi/2);
r = 1;
x = r*cos(a);
y = r*sin(a);
figure
subplot(2,1,1)
plot(x, y)
axis equal
title('Before')
subplot(2,1,2)
plot(r-x, r-y)
axis equal
title('After')
Subtract the x and y vectors from the radius to flip the circle.

2 Comments

Thanks a lot @Star Strider for your swift answer.
As always, my pleasure.

Sign in to comment.

More Answers (0)

Categories

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!