void quats2matrices( int n ){
    float  d = 1.0f/n;
    glBegin   ( GL_POINTS   );
    glColor3f ( 0.0f, 0.0f, 0.0f );
    for( int ix=-n; ix<n; ix++ ){
        float x = (ix+0.5f) * d;
        for( int iy=-n; iy<n; iy++ ){
            float y = (iy+0.5f) * d;
            for( int iz=-n; iz<n; iz++ ){
                float z = (iz+0.5f) * d;
                float r2 = x*x + y*y + z*z;
                if( r2 < 1.0f ){
                    Quat4f q;
                    Mat3f  M;
                    q.set( x, y, z, sqrt(1.0f - r2) );
                    q.toMatrix( M );
                    glColor3f ( M.a.x, M.a.y, M.a.z );
                    glVertex3f( (float)M.a.x, (float)M.a.y, (float)M.a.z );
                    //glVertex3f( (float)M.b.x, (float)M.b.y, (float)M.b.z );
                    //glVertex3f( (float)M.c.x, (float)M.c.y, (float)M.c.z );
                }
            }
        }
    }
    glEnd();
}