shapeII: rewrite

- handle the case when 4th arg is missing
- pass all information to subroutines as parameters (except slur-dir)
- add relative-polar mode
- don't use let* when not necessary
- renaming
- remove some set! usages
shapeII: support accumulation