draw smooth curve in two different ways.