 	   nil)))))
 
 
+;;; draw nodes with coordinates and connections on a scene
+
+(defn draw-nodes-with-connections [scn node-coordinate-map node-connections]
+  (let [node-map (apply hash-map
+			(flatten (map (fn [[node [x y]]]
+					[node
+					 (add-node scn x y (str node))])
+				      node-coordinate-map)))]
+    (doseq [[node-1 node-2] node-connections]
+      (connect-nodes scn (node-map node-1) (node-map node-2)))
+    node-map))
+
+
 ;;; some testing
 
 (defn- show-some-picture []


	[new-x new-y] [(+ x dx) (+ y dy)]]

    ; move nodes on the device
    (let [[dx-1 dy-1] (world-to-device scn dx dy)
	  [zx zy]     (world-to-device scn 0 0)
	  device-dx   (- dx-1 zx)

    (doto scn
      (.setWorldExtent 0.0 0.0 100.0 100.0)
      (.shouldZoomOnResize false)
      (.shouldWorldExtentFitViewport false)
      (draw-nodes-with-connections {:x [100 100], :y [50 50], :z [0 0]}
				   [[:z :y], [:y :x]]))
    (doto frm
      (.setLayout (BorderLayout.))
      (.. getContentPane (add (.getCanvas wnd) BorderLayout/CENTER))
