drawing elastic polygon