Skip to main content
Question

Geometry Challenge - Split polygon based on percentage 70/30


galigis
Enthusiast
Forum|alt.badge.img+20

Hi all,

I’m exploring a workaround to split a polygon based on a 70/30 area ratio:

  • 70% area → Type A
  • 30% area → Type B

Some visual explanation is included below.

The geometry of the split doesn’t need to follow a specific direction — any orientation is fine as long as the 70/30 ratio is maintained.

Has anyone come across a method or workaround to achieve this?

Thanks! 😊

6 replies

virtualcitymatt
Celebrity
Forum|alt.badge.img+45

The only thing that I can think of is an iterative approach.

E.g., Randomly pick a point inside the polygon, pick a random direction and then cut the polygon in two. compare areas and then progressively sweep the line through the polygon. At some point you should get pretty close. 

I played around with creating just 100 random lines though just a box and even this approach got me within half a percent every time. upping to 1000 random lines I was getting withing 0.05% consistently. The approach is pretty brute force but relatively simple.  Depending on how accurate you need the areas this might be an ok approach

 


max_h
Supporter
Forum|alt.badge.img+18
  • Supporter
  • June 24, 2025

Would a ‘donut’ split be acceptable?
As in you use a scaler and scale the area by 70% and then clip it with the original one, so you got 70% inner area and 30% outer ring.


virtualcitymatt
Celebrity
Forum|alt.badge.img+45
max_h wrote:

Would a ‘donut’ split be acceptable?
As in you use a scaler and scale the area by 70% and then clip it with the original one, so you got 70% inner area and 30% outer ring.

Oh this is a nice approach!  


matthias_ct
Participant
Forum|alt.badge.img+4
  • Participant
  • June 24, 2025

For convex polygons, the following approach works:

For a given x-value, you draw a vertical cutting line. Since the polygon is convex, this line divides the polygon into exactly two parts. This creates a continuous and monotonically increasing function p_x, which represents the percentage of the total polygon area on the left side of the line.

You choose two values, x_min and x_max, for which the corresponding percentages p_min and p_max (automatically: p_min < p_max). Then you can perform a binary search to find the value of x where p_x equals 70%.


ebygomm
Influencer
Forum|alt.badge.img+43
  • Influencer
  • June 24, 2025

Does the split have to be a straight line?


hkingsbury
Celebrity
Forum|alt.badge.img+62
  • Celebrity
  • June 24, 2025

You could tile it, and then count the number of tiles and split based on that. SpatialSorter might be a useful transformer. 

The more tiles, the more accurate the split/nicer the line. You could also smooth/generalise the line to make it a bit nicer


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings