A SmartPen for 3D interaction and sketch-based surface modeling