There's a lot you can do with Moodle and the SWF Activity Module ( https://moodle.org/plugins/view.php?plugin=mod_swf ).
Here's a 3D world globe example: http://blog.matbury.com/2008/11/13/papervision3d/ and a 3D cubes example: http://blog.matbury.com/2009/04/07/interactive-3d-fun/ Both are interactive.
Perhaps, rather than a ruler, something more like a tape measure would be more flexible and easier to implement and use. Learners can click on the starting point of where they want to measure, then drag the mouse to the end point and see the length in cm and/or mm. This would mean that learners could measure any shape at any angle.
You could also make answers acceptable within a certain range, e.g. > 4.8cm & < 5.2cm, so that it's less frustrating for learners. Or you can make the tape measure "snap" to predetermined units, e.g. 0.5cm.
I hope this helps!