Changeset 2723


Ignore:
Timestamp:
Aug 15, 2008, 9:05:58 PM (12 years ago)
Author:
Sam Hocevar
Message:
  • Fix OpenGL orientation (it's supposed to be right-handed).
  • Add a grayscale plane to illustrate non-orthogonality.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • research/2008-rubik/colorcube/visu.c

    r2677 r2723  
    7171
    7272#define F(x) ((x)*1.01 - 0.005)
    73 #define CP       glColor4f(x0,y0,z0,0.5); glVertex3f(y0,x0,z0)
    74 #define BP       glColor3f(0.0,0.0,0.0); glVertex3f(F(y0),F(x0),F(z0))
     73#define CP       glColor4f(x0,y0,z0,0.5); glVertex3f(x0,y0,z0)
     74#define BP       glColor3f(0.0,0.0,0.0); glVertex3f(F(x0),F(y0),F(z0))
    7575#define BLACK    x0 = y0 = z0 = 0.0
    7676#define RED      x0 = 1.0; y0 = z0 = 0.0
     
    127127            WHITE; BP; XRED; BP;
    128128        glEnd();
     129        glTranslatef(.5, .5, .4);
     130        glColor4f(.5, .5, .5, .5);
     131        glBegin(GL_QUADS);
     132            glVertex3f(0.891063,-0.45388,0);
     133            glVertex3f(0.0773943,0.151941,-0.985355);
     134            glVertex3f(-0.891063,0.45388,0);
     135            glVertex3f(-0.0773943,-0.151941,0.985355);
     136        glEnd();
    129137    glPopMatrix();
    130138
Note: See TracChangeset for help on using the changeset viewer.