asp教程.net生成图形验证代码程序
void palm::display()
{
glloadidentity(); // 重置当前的模型观察矩阵
glcolor3f(.0f,1.0f,1.0f);
//绘制手掌四周
glbegin(gl_quad_strip);
glvertex3f( -39.5000 , 37.7987 , 10.0000 ) ;
glvertex3f( -39.5000 , 37.7987 , 10.0000 ) ;
glvertex3f( -47.1311 , 16.1908 , 10.0000 ) ;
glvertex3f( -47.1311 , 16.1908 , 10.0000 ) ;
glvertex3f( -48.8821 , -21.7083 , 10.0000 ) ;
glvertex3f( -48.8821 , -21.7083 , 10.0000 ) ;
glvertex3f( -34.5000 , -42.2013 , 10.0000 ) ;
glvertex3f( -34.5000 , -42.2013 , 10.0000 ) ;
glvertex3f( -34.5000 , -62.2013 , 10.0000 ) ;
glvertex3f( -34.5000 , -62.2013 , 10.0000 ) ;
glvertex3f( 34.5000 , -62.2013 , 10.0000 ) ;
glvertex3f( 34.5000 , -62.2013 , 10.0000 ) ;
glvertex3f( 34.5000 , -42.2013 , 10.0000 ) ;
glvertex3f( 34.5000 , -42.2013 , 10.0000 ) ;
glvertex3f( 51.5617 , -32.7875 , 10.0000 ) ;
glvertex3f( 51.5617 , -32.7875 , 10.0000 ) ;
glvertex3f( 71.9188 , -7.6604 , 10.0000 ) ;
glvertex3f( 71.9188 , -7.6604 , 10.0000 ) ;
glvertex3f( 59.0631 , 7.6604 , 10.0000 ) ;
glvertex3f( 59.0631 , 7.6604 , 10.0000 ) ;
glvertex3f( 48.9573 , 18.3372 , 10.0000 ) ;
glvertex3f( 48.9573 , 18.3372 , 10.0000 ) ;
glvertex3f( 39.5000 , 37.7987 , 10.0000 ) ;
glvertex3f( 39.5000 , 37.7987 , 10.0000 ) ;
glvertex3f( -39.5000 , 37.7987 , 10.0000 ) ;
glvertex3f( -39.5000 , 37.7987 , 10.0000 ) ;
glend();//绘制上表面
glbegin(gl_polygon);
glvertex3f( -39.5000 , 37.7987 , 10.0000 ) ;
glvertex3f( -47.1311 , 16.1908 , 10.0000 ) ;
glvertex3f( -48.8821 , -21.7083 , 10.0000 ) ;
glvertex3f( -34.5000 , -42.2013 , 10.0000 ) ;
glvertex3f( -34.5000 , -62.2013 , 10.0000 ) ;
glvertex3f( 34.5000 , -62.2013 , 10.0000 ) ;
glvertex3f( 34.5000 , -42.2013 , 10.0000 ) ;
glvertex3f( 51.5617 , -32.7875 , 10.0000 ) ;
glvertex3f( 71.9188 , -7.6604 , 10.0000 ) ;
glvertex3f( 59.0631 , 7.6604 , 10.0000 ) ;
glvertex3f( 48.9573 , 18.3372 , 10.0000 ) ;
glvertex3f( 39.5000 , 37.7987 , 10.0000 ) ;
glvertex3f( -39.5000 , 37.7987 , 10.0000 ) ;
glend();
//绘制下表面
glbegin(gl_polygon);
glvertex3f( -39.5000 , 37.7987 , -10.0000 ) ;
glvertex3f( -47.1311 , 16.1908 , -10.0000 ) ;
glvertex3f( -48.8821 , -21.7083 , -10.0000 ) ;
glvertex3f( -34.5000 , -42.2013 , -10.0000 ) ;
glvertex3f( -34.5000 , -62.2013 , -10.0000 ) ;
glvertex3f( 34.5000 , -62.2013 , -10.0000 ) ;
glvertex3f( 34.5000 , -42.2013 , -10.0000 ) ;
glvertex3f( 51.5617 , -32.7875 , -10.0000 ) ;
glvertex3f( 71.9188 , -7.6604 , -10.0000 ) ;
glvertex3f( 59.0631 , 7.6604 , -10.0000 ) ;
glvertex3f( 48.9573 , 18.3372 , -10.0000 ) ;
glvertex3f( 39.5000 , 37.7987 , -10.0000 ) ;
glvertex3f( -39.5000 , 37.7987 , -10.0000 ) ;
glend();
}void hand::display()
{
finger * pfinger[5]={&m_thumb,&m_index,&m_medius,&m_ring,&m_little};
m_palm.display(); //显示手掌
for(int i=0;i<5;i++) pfinger[i]->display(); //显示5个手指
}