City rules: How regulations affect urban form