Rough code to do this below. Need to make sure that smoothing accounts for edges properly.
Rough code to do this below. Need to make sure that smoothing accounts for edges properly.