Hi Taco,
Well, you could create a temporary file from withing the metapost graphic, then read that file back on the TeX side, and then shift the image vertically based on the info from that.
Could you give me a hint on how to parse such an auxiliary file in TeX? I've never done any sort of that programming before... I'm asking...
Complicated and a bit ugly, but doable. A nicer solution is to adjust the bounging box of the image itself so that it does the right thing. This seems to do the trick (but I recall there is a way to pass a TeX variable to the figure; and that would be much cleaner; but I don't remember how offhand).
\startuseMPgraphic{diagram2} u := StrutHeight; draw origin--(2u,0)--(u,sqrt(3)*u)--cycle; currentpicture := currentpicture shifted (0,-(sqrt(3)*u/3)); setbounds currentpicture to (origin--(2u,0)--(u,sqrt(3)*u)--cycle); \stopuseMPgraphic
\starttext
\startformula A\raise\Umathaxis\displaystyle\hbox{\useMPgraphic{diagram2}} =B \stopformula
\stoptext
... because adjusting the bounding box fails once the figure grows a bit larger. Just use u := 3StrutHeight; in the code above and you'll see the effect. Thanks for your help, Oliver