Rotates a sequence of points in 3d-space.
to_rotate is a sequence of "rotate-flags" for the x, y and z (1=rotate, 0=don't rotate) axes.
angles is the angles for the x, y, and z axes.