Azure Product
浏览模式: 普通 | 列表
分类: OpenGL | < | 1 | 2 | 3 | 4 | 5 | >

绘制线框正交十二面体

[ 2007-01-17 12:39:30 | 作者: Admin ]
uploads/200701/17_154145_wirerhombicdodecahedron.jpg

/*
 *
 */
double rdod_r[14][3] = { { 0.0, 0.0, 1.0 },
 { 0.707106781187, 0.000000000000, 0.5 }, { 0.000000000000, 0.707106781187, 0.5 }, { -0.707106781187, 0.000000000000, 0.5 }, { 0.000000000000, -0.707106781187, 0.5 },
 { 0.707106781187, 0.707106781187, 0.0 }, { -0.707106781187, 0.707106781187, 0.0
...

阅读全文...

绘制实心二十面体

[ 2007-01-17 12:37:27 | 作者: Admin ]
uploads/200701/17_154005_solidicosahedron.jpg

/*
 *
 */
double icos_r[12][3] = { { 1.0, 0.0, 0.0 },
 { 0.447213595500, 0.894427191000, 0.0 }, { 0.447213595500, 0.276393202252, 0.850650808354 }, { 0.447213595500, -0.723606797748, 0.525731112119 }, { 0.447213595500, -0.723606797748, -0.525731112119 }, { 0.447213595500, 0.276393202252, -0.850650808354 },
 { -0.447213595500,
...

阅读全文...

绘制线框二十面体

[ 2007-01-17 12:35:52 | 作者: Admin ]
uploads/200701/17_153914_wireicosahedron.jpg

/*
 *
 */
double icos_r[12][3] = { { 1.0, 0.0, 0.0 },
 { 0.447213595500, 0.894427191000, 0.0 }, { 0.447213595500, 0.276393202252, 0.850650808354 }, { 0.447213595500, -0.723606797748, 0.525731112119 }, { 0.447213595500, -0.723606797748, -0.525731112119 }, { 0.447213595500, 0.276393202252, -0.850650808354 },
 { -0.447213595500,
...

阅读全文...

绘制实心四面体

[ 2007-01-17 12:34:58 | 作者: Admin ]
uploads/200701/17_153427_solidtetrahedron.jpg

/*
 *
 */
void renderSolidTetrahedron( void )
{
 /* Magic Numbers: r0 = ( 1, 0, 0 )
 * r1 = ( -1/3, 2 sqrt(2) / 3, 0 )
 * r2 = ( -1/3, -sqrt(2) / 3, sqrt(6) / 3 )
 * r3 = ( -1/3, -sqrt(2) / 3, -sqrt(6) / 3 )
 * |r0| = |r1| = |r2| = |r3| = 1
 * Distance between any two points is 2 sqrt(6) / 3
...

阅读全文...

绘制线框四面体

[ 2007-01-17 12:33:42 | 作者: Admin ]
uploads/200701/17_153351_wiretetrahedron.jpg

/*
 *
 */
void renderWireTetrahedron( void )
{
 /* Magic Numbers: r0 = ( 1, 0, 0 )
 * r1 = ( -1/3, 2 sqrt(2) / 3, 0 )
 * r2 = ( -1/3, -sqrt(2) / 3, sqrt(6) / 3 )
 * r3 = ( -1/3, -sqrt(2) / 3, -sqrt(6) / 3 )
 * |r0| = |r1| = |r2| = |r3| = 1
 * Distance between any two points is 2 sqrt(6) / 3
...

阅读全文...

绘制实心八面体

[ 2007-01-17 12:32:20 | 作者: Admin ]
uploads/200701/17_153046_solidoctahedron.jpg

/*
 *
 */
void renderSolidOctahedron( void )
{
#define RADIUS 1.0f
 glBegin( GL_TRIANGLES );
 glNormal3d( 0.577350269189, 0.577350269189, 0.577350269189); glVertex3d( RADIUS, 0.0, 0.0 ); glVertex3d( 0.0, RADIUS, 0.0 ); glVertex3d( 0.0, 0.0, RADIUS );
 glNormal3d( 0.577350269189, 0.577350269189,-0.577350269189); glVertex3d(
...

阅读全文...

绘制线框八面体

[ 2007-01-17 12:30:19 | 作者: Admin ]
uploads/200701/17_152913_wireoctahedron.jpg

/*
 *
 */
void renderWireOctahedron( void )
{
#define RADIUS 1.0f
 glBegin( GL_LINE_LOOP );
 glNormal3d( 0.577350269189, 0.577350269189, 0.577350269189); glVertex3d( RADIUS, 0.0, 0.0 ); glVertex3d( 0.0, RADIUS, 0.0 ); glVertex3d( 0.0, 0.0, RADIUS );
 glNormal3d( 0.577350269189, 0.577350269189,-0.577350269189); glVertex3d(
...

阅读全文...

绘制实心十二面体

[ 2007-01-17 12:28:55 | 作者: Admin ]
uploads/200701/17_152728_solidicosahedron.jpg

/*
 *
 */
void renderSolidDodecahedron( void )
{
 /* Magic Numbers: It is possible to create a dodecahedron by attaching two pentagons to each face of
 * of a cube. The coordinates of the points are:
 * (+-x,0, z); (+-1, 1, 1); (0, z, x )
 * where x = 0.61803398875 and z = 1.61803398875.
 */
 glBegin ( GL_POLYGON ) ;
...

阅读全文...

绘制线框十二面体

[ 2007-01-17 12:27:12 | 作者: Admin ]
uploads/200701/17_152559_wiredodecahedron.jpg

/*
 *
 */
void renderWireDodecahedron( void )
{
 /* Magic Numbers: It is possible to create a dodecahedron by attaching two pentagons to each face of
 * of a cube. The coordinates of the points are:
 * (+-x,0, z); (+-1, 1, 1); (0, z, x )
 * where x = 0.61803398875 and z = 1.61803398875.
 */
 glBegin ( GL_LINE_LOOP ) ;
...

阅读全文...

绘制实心圆环

[ 2007-01-17 12:25:34 | 作者: Admin ]
uploads/200701/17_152501_solidtorus.jpg

/*
 *
 */
void renderSolidTorus( GLdouble dInnerRadius, GLdouble dOuterRadius, GLint nSides, GLint nRings )
{
 double iradius = dInnerRadius, oradius = dOuterRadius, phi, psi, dpsi, dphi;
 double *vertex, *normal;
 int i, j;
 double spsi, cpsi, sphi, cphi ;

 /*
 * Increment the number of sides and rings to allow for one more point than surface
...

阅读全文...
ħ˽ ħ˽ : ϲ ϲվ ϲʿ ϲʿ ϲʿ ϲվ ϲ ϲվ ϲ ϲ ͸۾ ˽ ѾѾַ document.write("");