Generate eight distinct shapes from a set of specified variables
Show older comments
To be able to generate eight distinct shapes from a set of specified variables using MATLAB image processing. Your shape generator algorithm should be able to generate the following shapes:
-  Circle(Input radius in pixels)
-  Square(Input length of 1 side in pixels. Adjacent sides must be parallel to both borders of the image respectively)
-  Triangle(Input length of base in pixels and both base angles in degrees. The base is associated with column span, which is parallel to the top border, and the apex of triangle must be located at a point above the base line)
-  Rectangle(Input length of 2 adjacent sides in pixels. For display purposes the smaller value is associated with the row span and the larger values is associated with the column span. Adjacent sides must be parallel to both borders of the image respectively)
-  Pentagon(Input length of 1 side in pixels. The base is associated with column span, which is parallel to the top border, and the apex of pentagon must be located at a point above the base line)
-  Hexagon(Input length of 1 side in pixels. At least 2 sides must be parallel to the top and bottom borders of the image)
-  Ellipse(Input length of semi-minor (rows) and semi-major (columns) axes in pixels. For display purposes the semi-minor axis is associated with the row span, and must be parallel to the left and right borders of the image, and the semi-major axis is associated with column span, and must be parallel to the top and bottom borders of the image)
-  Octagon(Input length of 1 side in pixels. At least two sides must be parallel to the top and bottom borders of the image)
1 Comment
Joseph Cheng
on 28 Apr 2015
Edited: per isakson
on 29 Apr 2015
Is there a question here? if not please read http://www.mathworks.com/matlabcentral/answers/8626-how-do-i-get-help-on-homework-questions-on-matlab-answers and http://www.mathworks.com/matlabcentral/answers/214028-how-do-i-generate-eight-distinct-shapes-from-a-set-of-specified-variables-using-matlab-image-process#answer_177030
Accepted Answer
More Answers (0)
Categories
Find more on Image Arithmetic in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!