Problem with rotating [pymel]

hello,
i’m new here and i’m very glad that i found this site and i have hope that you can help me. probably my problem is simple to expirienced coders but i have no idea how deal with this.

i’m developing l-system tree generator in pymel and i can’t deal with rotating “turtle”(in my case is spaceLocator) around its own axis so that vector L pointing to the left of the turtle is brought to a horizontal position (in my opinion spacelocator local axis x should be horizontal but i don’t know for sure).
the problem is on 57 page of algorythmic beauty of plants which you can find here Algorithmic Botany: Publications .

everything else is working but i don’t know how to rotate my spaceLocator to desired orientation.

please help me;)

Can you show us the code thatyou are working with? What software versions and OS are you using?

I looked at the link you gave and the book “Alogorithmic Beauty of Plants.” This idea of modeling the growth of plants using programming in Maya interests me. I know nothing about it, but I’ll study that chapter and the principles of vector math right now.

maya 2012 pymel 1.0.3,
source code hmm, probably tomorrow but general idea is to rotate my turtle space locator so local axis x is horizontal or at least i think that’s the idea.

create space locator, move it along local y axis, rotate it and try to rotate it with pymel code so local x axis is horizontal