how to calculate painting square video