```python
x[-1] = width / 2
```

etc.