I have a project where I need to implement physics with drawn structures. I need to come up with or find an existing algorithm that can find the normal vector at a point on the surface of an image (BufferedImage)
I have an idea that it is possible to somehow find the air pixels around from 1 point on the surface (if it lies on the surface), and use them to find the surrounding physical pixels. But this approach has 2 problems: 1) This approach will not always return the correct coordinates 2) This approach will not always return 2 coordinate points