How can I rotate a curved rectangle?
1 view (last 30 days)
Show older comments
I have created a curved rectangle and now I want to rotate it. I know I can not rotate using rectangle commande. I also tried to plot the rotated rectangle using "fill" but then I can not add curvature.
So, the question is, How can I plot a rotated curved rectangle?
2 Comments
Answers (2)
Friedrich
on 10 Apr 2013
HI,
so you have a set of points (x,y) describing a curved rectangle. I guess the keyword here is rotation matrix:
Create the Matrix accoringly and multiple it with your (x,y) values to get the rotated rectangle.
6 Comments
Friedrich
on 11 Apr 2013
You need to create your own version of the rectangle function which calculates the curved rectangle from scratch. Afterwards you can plot it an rotate it.
Rafal Samborski
on 10 Apr 2013
Edited: Rafal Samborski
on 10 Apr 2013
If it's ony about plotting try to call this after your plot function:
alpha = 30; set(gca, 'View', [alpha 90]);
See Also
Categories
Find more on Line Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!