Simple Region Adjacency C Code-repost

I need someone to write a program to read a set of regions, and then report for each region, which other regions are adjacent to [url removed, login to view] regions are adjacent if any edge of one intersects with any edge of the other in more than one point.

Input is a file of text defining a set of regions. Each region is a set of polygons. Each polygon is a sequence of points, defining a closed area.

A region starts with a left brace "{", followed by the name of the region, a comma, and then a comma-separated list of polygons, followed by a right brace. For example: { R1, polygon } or { R 2, polygon1, polygon2 }

A polygon is a left square bracket "[" followed by a list of comma-separated points, followed by a right square bracket "]". For example, [ point, point, point ]

A point is an x,y pair, expressed as a left parenthesis "(" followed by two comma separated numbers, followed by a right parenthesis ")". For example, ( 23.23, -2.0 )

Ignore spaces and line breaks.

A simple set of 3 regions, each region being one polygon is:

An example:

{ Region1, [ (0,1), (0,2), (2,2), (2,1), (0,1) ]}

{ Region2, [ (1,0), (3,0), (3,1), (1,1), (1,0) ]}

{ Region3, [ (3,0), (3,1), (4.1,1), (4.1,0), (3,0) ]}

The output would be:

Region1: Region2

Region2: Region1, Region3

Region3: Region2

If the input is badly formed, simply report: "Bad input at line %d", giving the line number where the input does not match the expected input format.

I have attached test files. Please be efficient and on time.

Thank you

Beceriler: C Programlama

Daha fazlasını görün: pair programming, pair of points, pair line, line intersects, intersects line, c read example, c programming input output, c programming d, c# point in polygon, code on time, code 6 d, bad programming, test on r programming, d c++, c r, region code, program region, code format numbers, polygon area, point polygon test, write simple report, point polygon, code repost button php html, simple polygon, format simple report

İşveren Hakkında:
( 1 değerlendirme ) waco, United States

Proje NO: #4450323



I have graceful idea how to complete it.

2 gün içinde 35$ USD
(219 Değerlendirme)

2 freelancers are bidding on average $48 for this job


Let me help you.

in 2 gün içinde60$ USD
(15 Değerlendirme)