An answer that comes close to what you're looking for is found in Heike's post. It allows you to interactively draw various types of graphics objects. It's also easily extensible to accommodate more shapes, but smooth curves are already implemented in the form of Bezier curves.
To allow you to reuse the graphic created with this code, I added one more button to Heike's answer. It copies the current Graphics
to the clipboard, so that you can paste it anywhere in the notebook, or even into other applications.
DynamicModule[{types, fun},
types = {"Circle", "Disk", "Polygon", "Line", "Bezier", "Spline"};
fun[{}, ___] := {};
fun[{a_}, ___] := {};
fun[pts_, type_] :=
Switch[type, "Circle", Circle[pts[[1]], Norm[pts[[2]] - pts[[1]]]],
"Disk", Disk[pts[[1]], Norm[pts[[2]] - pts[[1]]]],
"Polygon", {EdgeForm[Black], FaceForm[Opacity[.5]], Polygon[pts]},
"Line", Line[pts], "Bezier", BezierCurve[pts], "Spline",
BSplineCurve[pts]];
Manipulate[ptlst[[object]] = pts;
typelst[[object]] = type;
grlst = MapThread[fun, {ptlst, typelst}];
Graphics[grlst, PlotRange -> {{-3, 3}, {-3, 3}}], {{pts, {}},
Locator, LocatorAutoCreate -> All}, {{ptlst, {{}}},
None}, {{typelst, {"Line"}}, None}, {{object, 1}, None}, {grlst,
None}, {{type, "Line", "Object type"}, types},
Row[{Button["New object",
If[Length[ptlst[[-1]]] > 0, AppendTo[ptlst, {}];
AppendTo[typelst, type];
object = Length[typelst];
pts = {}]],
Dynamic@
PopupView[Graphics[#, ImageSize -> 50] & /@ grlst,
Dynamic[object, (object = #; pts = ptlst[[#]];
type = typelst[[#]]) &], Button["Edit object"]],
Button["Print shapes", Print[Transpose[{ptlst, typelst}]]],
Button["Copy graphic",
CopyToClipboard[
Graphics[grlst, PlotRange -> {{-3, 3}, {-3, 3}}]]]}]]]
Following Heike's instructions, create the desired sketch. Then press Copy graphic
. Now you could add a new line saying g =
, then paste the sketch into that line, and you have a Graphics
object.