Lozenge Shape.

A Lozenge Shape is a rectangle terminated on the left and right with semicircles. The Lozenge shares the width and height parameters found in rectangle and adds a segs parameter to specify how many segments the semicircular ends should have.

The radius of the semicircle are equal to half the height and the width includes to the two radii.

Handles

The Lozenge has two point handles. On controls the width parameter and the other the height parameter.

Turtle Description

The turtle script description of the Lozenge uses all three parameters. It moves the drawing pen to the start of the righthand semicircle, arcs to the left 180 degrees, draws forward and then arcs again.

mov (width-height)/2 -height/2 0
arcl 180 height/2 segs
fwd width-height
arcl 180 height/2 segs