This repository was archived by the owner on Jul 24, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Paint fill function for an image #3
Comments
I made a better version for the fill-up painting function. @balacij |
Looks much better! 😄 Are you able to do it row-wise instead of point-wise out of curiosity? |
@balacij I actually not sure how to this question row-wise. The current way is to find all the coordinates of possible points that need to be painted. Once find all of them, then paint them accordingly. |
The ideology of row-wise seems very interesting. Thanks for pointing it out. It's doable, and I will keep you in the post. |
It was just a thought on how an algorithm could be done if you know the ranges of the "insides" of the shape by length along the horizontal axis. I hope it works 😄 |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
This is the paint-fill function. @balacij
algorithm-design-with-haskell/src/Recursion.hs
Lines 372 to 499 in b3f39e5
Let me know what you think. I think there should be a way to simplify the
findAreaOnDir
method. It looks very cumbersome.The text was updated successfully, but these errors were encountered: