OK, this won't impress any old hands, but I loved the way this turned out
so easy!
A matrix of rotation for a point on a 2-d plane:

rotation =: [: > (cos;-&sin),:sin;cos

rotate =: (mx~ rotation)~ NB. φ rotate x y


Hm, looking at it now, I could have the unbox in the rotate function rather
than the rotation matrix, I'l go try that now.
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to