Program cmm by using a stylus to detect points on a real workpiece