connecting objects

Objects like point, line, or arc return certain values, for example their current position. You can then use these values as options in other objects. This makes it easy to connect two objects, for example:
    $p1 = point({"type" => "empty",
		 "coordinates" => [[20,20]],
		 "polar" => [[50,0],[50,360]]});

    line({"type" => "line",
	  "color" => "Red",
	  "foot" => [[-20,30],[50,-50]],
	  "head" => [${$p1}{"coordinates"}]
	});

    line({"type" => "line",
	  "color" => "Green",
	  "foot" => [[20,-30],[-50,50]],
	  "head" => [${$p1}{"coordinates"}]
	});
main