Domain formation in lead titanate ferroelectric thin films