Postscript site
Here’s a site with a good Postscript library for drawing variable width lines.
To add a rounded end I added an arc command after the bolt function:
20 setlinewidth
newpath 0 0 moveto
0 -50 200 -150 200 0 rcurveto
currentpoint
reversepath bolt
5 0 179 arc
fill
I used two of these curves to draw a stylized pear.