hw1: Actually compute the required canvas size (instead of just
using [1000,1000]).