Copy a Line Segment

Let's start with the simplest construction. Given a line segment AB, copy it to the dotted line as shown in the applet. NoteToolbar Image is the modern compass and Toolbar Image is the Euclidean compass.  It is pretty easy to do it using modern compass, isn't it?