Computers and Technology
Computers and Technology, 01.12.2021 23:30, jadea520

Given a irregular, closed, convex polygon with n-1 sides and m circle-centers contained within that polygon, compute the radii of m circles centered at those m points such that the sum of the areas of the circle is minimized and that any vertex in this polygon is also contained in at least one of the m circles. Here is the function signature: find_convex_cover(pvertices, clist) where pvertices is a (n 1)-long iterable of polygon vertices and clist is a list of (Li, Yi) tuples of circle-centers. The output of find_convex_cover is a m long list of radii, ri, corresponding to the m circle-centers.
Example:
>>> pvertices = array([[ 0.573, 0.797],
[ 0.688, 0.402],
[ 0.747, 0.238],
[ 0.802, 0.426],
[ 0.757, 0.796),
[ 0.589, 0.811]])
>>> clist = [(0.7490863467660889, 0.4917635308023209),
(0.6814339441396109, 0.6199470305156477),
(0.7241617773773865, 0.6982813914515696),
(0.6600700275207232, 0.7516911829987891),
(0.6315848053622062, 0.7730550996176769),
(0.7348437356868305, 0.41342916986639894),
(0.7597683050755328, 0.31729154508140384)]
>>> find_convex_cover(pvertices, clist) # note some radii == 0
[0, 0, 0.10297280518543134, 0, 0.06374182913818943, 0.0684588720095565, 0.07987784828713643]
Hints:
• m can be very large so use Numpy broadcasting effectively.
• For your own understanding, use Matplotlib to visualize the polygons and circles.
• Numpy is the only third-party module you can use with this assignment.
• Since the n-polygon is closed, the first and last vertices are the same so that only n
• Your solution can be an approximation to the minimum. 1 vertices need be specified.

answer
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 11:00, babbybronx
Lisa’s company, abc ltd., lost its biggest client and is now facing a financial crunch. most of her colleagues have resigned, but lisa decides to stay with the company and assist the management in overcoming the financial situation. which quality is lisa demonstrating? a. self-management b. cooperativeness c. responsibility d. loyalty
Answers: 2
image
Computers and Technology, 23.06.2019 02:00, kelseybell5522
For a typical middle-income family, what is the estimated cost of raising a child to the age of 18? $145,500 $245,340 $304,340 $455,500
Answers: 1
image
Computers and Technology, 23.06.2019 10:00, serenityharmon1
Hey i just logged on and one of the moderators deleted a bunch of my answers to questions, even though the answers were right and the people it doesn't make sense but if anyone wants to talk about anything just message me lol (this is super random lol)
Answers: 1
image
Computers and Technology, 23.06.2019 16:00, AM28
Does read theory have answers keys ?
Answers: 1
Do you know the correct answer?
Given a irregular, closed, convex polygon with n-1 sides and m circle-centers contained within that...

Questions in other subjects:

Konu
Mathematics, 08.12.2020 06:10