CSE 241/505Object Oriented ProgrammingFall 2018Homework # 1Your First C++ ProgramDue date Oct 19th 2018You will write a C++ program that will optimize some 2D shapes and produce SVG (Scalable Vector Graphics) files to display calculated 2D graphics. SVG is a very easy XML language to learn and many web browsers directly support it. Below is a simple SVG file<svg version=1.1baseProfile=fullwidth=300 height=200xmlns=http://www.w3.org/2000/svg><rect width=100% height=100% fill=red /><circle cx=150 cy=100 r=80 fill=green /><text x=150 y=125 font-size=45 text-anchor=middlefill=white>CSE 241</text></svg>and the resulting graphics is below.You may learn basic SVG syntax and objects from many available sources on the web. One good source is https://developer.mozilla.org/en-US/docs/Web/SVG.Your program will have a main container shape (rectangle, circle or triangle). It will try to fit many small shapes (rectangle, circle or triangle) in the main container shape by carefully placing these shapes into the container shape.Below is a sample output of your program.Please enter the main container shape (R, C, T)RPlease enter the width200Please enter the height100Please enter the small shape (R, C, T)CPlease enter the radius50I can fit at most 2 small shapes into the main container. The empty area (red) in container is 12146.01836.The result file should be stored in result.svg. For the above input, it should look likeNote that, your program should try to fit as many small shapes as possible into the main container. Small shapes should not overlap. Your triangles can be only equilateral triangles. Your rectangles and triangles can rotate to fit the main shape better.
CSE 241/505
[Solved] CSE 241/505 -HW1- Aprogram that optimizes 2D shapes and produce SVG
$25
File Name: CSE_241/505_-HW1-_Aprogram_that_optimizes_2D_shapes_and_produce_SVG.zip
File Size: 631.14 KB
Only logged in customers who have purchased this product may leave a review.
Reviews
There are no reviews yet.