Question
C++ or C Generate by random a set of n points in 2D Cartesian Coordinates System. Find two different pentagons enveloping all of the points
C++ or C Generate by random a set of n points in 2D Cartesian Coordinates System. Find two different pentagons enveloping all of the points and connected to the set (there is at least one point on each side). Check which pentagons has a smaller area. Use functions for reading, printing appropriate data. Use local variables. Prepare an appropriate graph in Excel.
At first, you create some space (lets say, 300x300 square). Then inside of this space you generate some random points (that belong to the space). Later, you place a pentagon on the space in such a way, that all the points are inside and some of them touch the borders of the pentagon. You place 2 pentagons here and check which is smaller When you place a pentagon inside of the space you can read the coordinates of its edges. But knowing this, you can check the area
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started