Works. Algorithm needs improving, looks very jagged and artificial