I was able to draw to the outer airtight boundary of hole. Now I would like to implement interior flood/fill algorithm. To get an internal seed, only one method comes to my mind which is testing neighbors of red cells for ray casting. However, I would like to know is there a faster method.

enter image description here

  • $\begingroup$ Are you working on spider webs? And is your whole always convex? $\endgroup$ – Tolga Birdal Sep 14 '17 at 13:53
  • $\begingroup$ No I don't always work on spider webs nor the outer boundary always convex. $\endgroup$ – Shibli Sep 14 '17 at 13:56
  • $\begingroup$ When your boundary is non-convex raycasting is no solution to finding the interiour. How do you get the boundary? Maybe you can generate normals as well? Depending on the size of your areas a last resort would be to fill inside and outside and see which one terminates. $\endgroup$ – allo Sep 14 '17 at 14:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.