Copy Link
Add to Bookmark
Report

3d Chapitre 5 - Les ombrages de Gouraud

eZine's profile picture
Published in 
2d3dfx
 · 17 Feb 2021

Chapitre 5 - Les ombrages de Gouraud


Lors du dernier chapitre, nous avions implanté un modèle d’illumination très simple, qui utilisait l’angle entre la normale de surface et le vecteur de lumière. Le résultat produisait un éclairage uniforme sur toute la face. Le modèle de Gouraud permet d’obtenir une surface avec différents tons de couleurs. Cette technique se base sur l’interpolation des couleurs entre les sommets.

Interpolation

L’interpolation est un mot mathématique qui peut faire peur. Cependant, l’interpolation linéaire est très simple à comprendre. De façon simpliste, on pourrait dire que l’interpolation est l’opération qui permet de trouver combien de « pas » nous devons incrémenter entre deux points pour atteindre notre but en utilisant tout l’intervalle possible (j’entend les mathématiciens dégainer leurs armes) De façon concrète, supposons le cas suivant : nous avons deux points, formant une droite, x1 à 50, et x2 à 100. Nous voulons interpoler une palette de 100 couleurs pour peindre cette droite. Comment procéder ?

#1- Trouver l’intervalle.

Simple, il s’agit de soustraite la couleur maximale de la couleur minimale et pour la droite, soustraire le X max du X min.

cmax-cmin=100-0 = 100
x2 - x1 = 100 - 50 = 50

#2- Trouver l’incrément.

L’incrément nous permet de savoir combien ajouter à la couleur pour chaque x parcouru. Nous divisons l’intervalle à interpoler par l’intervalle qui interpole :

100 / 50 = 2 !

#3- Interpoler linéairement sur la droite.

A cette étape, on parcoure la droite. Pour chaque x, on incrémente couleur de 2. À la fin, nous aurons parcouru les 100 couleurs, par bond de 2 :

 for(x=50 ;x<100 ;x++) 
{
ecran[x] = couleur ;
couleur += 2 ;
}


Cet exemple très simple démontre ce qu’est l’interpolation linéaire. Ce principe est utilisé dans beaucoup de domaine, notamment le texture mapping et le Gouraud shading.

Interpolation des normales de sommets

Le coeur du Gouraud shading est l’interpolation des couleurs entre les sommets. Cela permet de lisser les arrêtes des objets et de leurs donner une apparence beaucoup plus réaliste. Regardez l’image ci-dessus :

3d Chapitre 5 - Les ombrages de Gouraud
Pin it

Bien que la piètre qualité de la capture d’écran ne permet pas de distinguer tout, vous remarquerez peut être que la surface semble plus lisse, plus sphérique. C’est tout simplement parce que les faces n’ont pas une couleur uniforme.

J’entend encore une fois les mathématiciens pur et dur sortir leurs lance-flammes. C’est que voyez-vous, une normale de sommet, ça n’existe théoriquement pas (comme dans le bump mapping, où l’on calcul les normales de pixels). Nous allons faire ici une approximation, en faisant la moyenne de toutes les normales des faces qui contiennent ce sommet. Pour l’illumination, nous allons utiliser ces pseudo-normales plutôt que les normales de faces.

Modifications sur notre engin 3D

Comme l’engin est construit de façon presque modulaire, les modifications requises ne sont pas trop complexes. Tout d’abord, il faudra mettre à jour la structure de donnée contenant les sommets, pour prendre compte les normales de sommets :

 typedef struct _sommet 
{
_2D ecran; // coordonnees d'ecran
_3D local; // coordonnees locales
_3D monde; // coordonnees dans le monde
_3D normale; // normale au sommet
} ;

Ensuite, comme chaque point 2D aura maintenant une couleur bien à lui, nous ajouterons une variables pour en contenir la valeur dans la structure _2D :

 typedef struct _2D 
{
int x,y;
unsigned char couleur;
};


Finalement, une troisième structure de donnée devra être modifié. En effet, nous allons avoir besoin de tenir compte de la couleur maximale et minimale entre 2 sommets. Quand nous allons dessiner nos polygones, nous allons encore procéder avec la structure Scanline, mais elle interpolera également entre cmin, la couleur minimale, et cmax, la couleur maximale :

 typedef struct TScan // Structure pour le remplissage de polygones 
{
long gauche,droite;
long cmin, cmax;
};


À présent, jetons un coup d’oeil aux modifications nécessaires aux fonctions du rendeur. Premièrement, la fonction qui calcule les normales devra maintenant calculer les normales de sommets. Pour ce faire, nous allons parcourir chaque sommet, et pour chaque face, vérifier si ce sommet en fait partie. Si un des sommets du triangle appartient au sommet courant, nous ajoutons à ce sommet la normale de face de cette face. Ensuite, nous faisons la moyenne de ces normales (diviser par 3, pour triangle). N’oublions pas de normaliser les normales, pour les équations d’ombrages! Voici la nouvelle fonction calc_normal :

 void calcnormal() 
{
(…) calcule des normales de faces ici!

"font_color_blue"> for(int sommet=0;sommet<unObjet.nbsommet;sommet++)
{
for(face=0;face<unObjet.nbpolygone;face++)
{
if (unObjet.poly[face].a==sommet ||
unObjet.poly[face].b==sommet ||
unObjet.poly[face].c==sommet)
{
unObjet.sommet[sommet].normale.x += unObjet.poly[face].normale.x;
unObjet.sommet[sommet].normale.y += unObjet.poly[face].normale.y;
unObjet.sommet[sommet].normale.z += unObjet.poly[face].normale.z;
}
}
unObjet.sommet[sommet].normale.x /= 3;
unObjet.sommet[sommet].normale.y /= 3;
unObjet.sommet[sommet].normale.z /= 3;
normalise(&unObjet.sommet[sommet].normale);
}
}


Le calcul d’ombrage s’effectue de la même façon que pour le Lambert shading, mais a place de faire le produit vectoriel de normale de face et du vecteur de lumière, on fait le produit vectoriel de la normale de sommet pour chaque sommet, et on sauvegarde la couleur dans la structure correspondant à ce sommet (ecran.couleur).

Tout ce qu’il nous manque à présent, ce sont les fonctions qui vont dessiner les polygones en interpolant les couleurs. Allons-y dans l’ordre. Tout d’abord, la fonction qui va dessiner les lignes horizontales (scanlines) :

 void hlineG(int x1, int x2, int coul1, int coul2, int y) 
{
long x;
float difx = x2-x1+1;
float nbcoul = coul2-coul1+1;
float couleur = coul1;
float pas = nbcoul/difx;
unsigned int offset = (y<<8)+(y<<6)+x1;
for (x=x1;x<=x2;x++)
{
virtuel[offset++] = couleur;
couleur += pas;
}
}


Comme vous voyez, cette fonction ressemble beaucoup à l’exemple que j’avais donné plus haut. Nous trouvons tout d’abord l’intervalle (x2-x1) et (coul2-coul1). Remarquez le « +1 », je n’aime pas les divisions par 0. L’incrément, le « pas » est déterminé par le nombre totale de couleur par rapport au delta X. Voyons maintenant la fonction qui va remplir la structure scanline, dont ce sert hline :

 void scanG(_2D *p1, _2D *p2) 
{
float x1 = p1->x;
float x2 = p2->x;
float y1 = p1->y;
float y2 = p2->y;
float coul1 = p1->couleur;
float coul2 = p2->couleur;

if (y1==y2) return;
if (y2<y1) {swap (y1,y2); swap (x1,x2); swap(coul1,coul2); }
if (y1<miny) miny=y1;
if (y2>maxy) maxy=y2;

float Xinc = (x2-x1) / (y2-y1);
float x = x1 += Xinc;

float coulInc = (coul2-coul1) / (y2-y1);
float coul = coul1 += coulInc;


for (int y=y1;y<y2;y++)
{
if (x < scanline[y].gauche)
{
scanline[y].gauche = x;
scanline[y].cmin = coul;
}
if (x > scanline[y].droite)
{
scanline[y].droite = x;
scanline[y].cmax = coul;
}
x += Xinc;
coul += coulInc;
}
}


L’unique différence se trouve dans l’interpolation de la couleur, à partir de coul2-coul1 / y2-y1. Le principe reste le même que l’ancienne version, on mets à jour la structure scanline selon les valeurs limites de X et de coul. La fonction dessinepoly, tant qu’a elle, restera exactement la même, sauf qu’il est maintenant inutile de lui passer une couleur en paramètre.

Remarques

Comme vous voyez, cet engin semble extrêmement lent. Mais autre le fait que je n’ai inclus aucune optimisation (c’est déjà assez complexe comme ça, non ?), l’engin est compilé sous Turbo C++, en mode réel 16-bit. On pourrait cependant faire subir aux normales les mêmes transformations affines que les objets, sauvant ainsi de nombreux calculs de normales inutiles.

En résumé :

Le modèle d’illumination de Gouraud
L’interpolation linéaire
Téléchargez DJGPP!


3DCHAP5.CPP

  
//////////////////////////////////////////////////////////////////////////
// Code source : Shaun Dore //
// Fichier : 3DCHAP4.CPP //
// Date : 29-09-1998 //
// Compilateur : Borland C++ 3.1 //
// Description : Engin de poylgones 3D //
//////////////////////////////////////////////////////////////////////////

// --------------------------- INCLUDE --------------------------------//

#include <mem.h>
#include <math.h>
#include <conio.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>

// ---------------------- CONSTANTES & MACROS --------------------------//

#define MX 160 // Millieu de l'abscisse
#define MY 100 // Millieu de l'ordonnee
#define DISTANCE 250 // Distances de l'obervateur
#define AMBIANT 20 // Lumiere ambiante
#define DIFFUSE 220 // Lumiere diffuse
#define MAX_POLY 150 // Nb max de polygones
#define MAX_SOMM 75 // Nb max de sommets
#define SIN(x) SinTable[x] // Macro SIN()
#define COS(x) CosTable[x] // Macro COS()
#define SWAP(a,b) {a ^= b; b ^=a; a ^= b;} // Macro SWAP()

// ------------------- STRUCTURES DE DONNEES --------------------------//

// type matrice reelle de 4x4
typedef float _mat4x4[4][4];

// Structure pour representer un point dans un espace 2D
typedef struct _2D
{
int x,y;
unsigned char couleur;
};

// Structure pour representer un point dans un espace 3D
typedef struct _3D
{
float x,y,z;
};

// Structure qui definie un sommet avec ses differentes coordonnees
typedef struct _sommet
{
_2D ecran; // coordonnees d'ecran
_3D local; // coordonnees locales
_3D monde; // coordonnees dans le monde
_3D normale; // normale au sommet
};

// Structure pour representer une face d'un polygone
typedef struct _tri
{
short a,b,c; // trois points d'un triangle
unsigned char col; // couleur de la face
float z; // profondeur z moyenne (pour tri)
_3D normale; // normale de la face
};

// Structure pour contenir un objet
typedef struct _objet
{
int nbsommet, nbpolygone; // nombre de sommets et de polygones
_sommet sommet[MAX_SOMM]; // coordonnees des sommets
_tri poly[MAX_POLY]; // polygones (triangles)
};

typedef struct TScan // Structure pour le remplissage de polygones
{
long gauche,droite;
long cmin, cmax;
};


//------------------------- VARIABLES GLOBALES ------------------------//

char *ecran = (char *) (0xA0000000L); // Memoire video
char *virtuel = new char[64000L]; // Ecran virtuel
float SinTable[360], CosTable[360]; // Table des sinus et cosinus

int ordre[MAX_POLY]; // Tableau pour trier les polys
TScan scanline[200]; // Largeur des lignes des polys
int miny,maxy; // hauteur min et max des polys

_mat4x4 matrice; // mat de transformation homogene
_mat4x4 mat1, mat2; // matrices temporaires
_3D lumiere = {0,0,1}; // vecteur de lumiere
_objet unObjet; // un objet 3D

// ------------------------- FONCTIONS --------------------------------//

/////////////////////////////////////////////////////////////////////////
// hline - Dessine une ligne horizontale //
/////////////////////////////////////////////////////////////////////////
void hlineG(int x1, int x2, int coul1, int coul2, int y)
{

long x;
float difx = x2-x1+1;
float nbcoul = coul2-coul1+1;
float couleur = coul1;
float pas = nbcoul/difx;
unsigned int offset = (y<<8)+(y<<6)+x1;

if(x2<x1)
{
SWAP(x1,x2);
SWAP(coul1,coul2);
}

for (x=x1;x<=x2;x++)
{
virtuel[offset++] = couleur;
couleur += pas;
}

}


/////////////////////////////////////////////////////////////////////////
// setpal - modifie la palette //
/////////////////////////////////////////////////////////////////////////
void setpal(unsigned char col, unsigned char r, unsigned char g, unsigned char b)
{
outp (0x03C8,col);
outp (0x03C9,r);
outp (0x03C9,g);
outp (0x03C9,b);
}

/////////////////////////////////////////////////////////////////////////
// SetupPal() - Palette graduelle de bleu, et blanc vers la fin //
/////////////////////////////////////////////////////////////////////////
void preparepal()
{
for (int i=0; i<192;i++) setpal(i,0,0,(i*63/192));
for (i=192;i<256;i++) setpal(i,i-192,i-192,63);
}

/////////////////////////////////////////////////////////////////////////
// precalc - Calcule le tableau de sinus/cosinus //
/////////////////////////////////////////////////////////////////////////
void precalc()
{
for(int angle=0; angle<360; angle++)
{
SinTable[angle]=sin(angle*M_PI/180.0);
CosTable[angle]=cos(angle*M_PI/180.0);
}
}

/////////////////////////////////////////////////////////////////////////
// scalaire - Produit scalaire (retourne l'angle entre v1 et v2) //
/////////////////////////////////////////////////////////////////////////
double scalaire(_3D v1, _3D v2)
{
return (v1.x * v2.x) + (v1.y * v2.y) + (v1.z * v2.z);
}

/////////////////////////////////////////////////////////////////////////
// vectoriel - Produit vectoriel (retourne l'orthogonal de v1 et v2) //
/////////////////////////////////////////////////////////////////////////
void vectoriel(_3D *v, _3D v1, _3D v2)
{
v -> x = (v1.y * v2.z) - (v2.y * v1.z);
v -> y = (v1.z * v2.x) - (v2.z * v1.x);
v -> z = (v1.x * v2.y) - (v2.x * v1.y);
}

/////////////////////////////////////////////////////////////////////////
// normalise - retourne un vecteur unitaire (longueur de 1) //
/////////////////////////////////////////////////////////////////////////
void normalise(_3D *n)
{
double longueur = sqrt(n->x*n->x + n->y*n->y + n->z*n->z);
if(longueur==0) return;
n -> x /= longueur;
n -> y /= longueur;
n -> z /= longueur;
}

/////////////////////////////////////////////////////////////////////////
// swap - Effectue l'echange entre 2 variables float //
/////////////////////////////////////////////////////////////////////////
void swap(float &x,float &y)
{
float temp = x;
x = y;
y = temp;
}

/////////////////////////////////////////////////////////////////////////
// Scan - Trouve le minX et maxX d'un cote d'un polygone //
/////////////////////////////////////////////////////////////////////////
void scanG(_2D *p1, _2D *p2)
{
float x1 = p1->x;
float x2 = p2->x;
float y1 = p1->y;
float y2 = p2->y;
float coul1 = p1->couleur;
float coul2 = p2->couleur;

if (y1==y2) return;
if (y2<y1) {swap (y1,y2); swap (x1,x2); swap(coul1,coul2); }
if (y1<miny) miny=y1;
if (y2>maxy) maxy=y2;

float Xinc = (x2-x1) / (y2-y1);
float x = x1 += Xinc;

float coulInc = (coul2-coul1) / (y2-y1);
float coul = coul1 += coulInc;


for (int y=y1;y<y2;y++)
{
if (x < scanline[y].gauche)
{
scanline[y].gauche = x;
scanline[y].cmin = coul;
}
if (x > scanline[y].droite)
{
scanline[y].droite = x;
scanline[y].cmax = coul;
}
x += Xinc;
coul += coulInc;
}
}


/////////////////////////////////////////////////////////////////////////
// dessinepoly - Dessine un polygone avec liste de points(listesommet) //
/////////////////////////////////////////////////////////////////////////
void dessine_poly(_2D *listesommet)
{
_2D *ptrcour = listesommet;
_2D *ptrsuiv = listesommet+1;

miny=200; maxy=0;
for (int i=0;i<200;i++)
{
scanline[i].gauche = 32000;
scanline[i].droite = -32000;
}

for (i=1; i<3; i++)
{
scanG(ptrcour, ptrsuiv);
ptrcour++;
ptrsuiv++;
}
ptrsuiv = listesommet;
scanG(ptrcour, ptrsuiv);
for (int y=miny;y<maxy;y++)
hlineG(scanline[y].gauche,scanline[y].droite,scanline[y].cmin,scanline[y].cmax,y);
}

/////////////////////////////////////////////////////////////////////////
// copie_matrice - copie une matrice source vers matrice destination //
/////////////////////////////////////////////////////////////////////////
void copie_matrice(_mat4x4 source, _mat4x4 dest)
{
memcpy(dest,source,sizeof(_mat4x4));
}


/////////////////////////////////////////////////////////////////////////
// mult_matrice - multiplie 2 matrices et mets le resultat dans dest //
/////////////////////////////////////////////////////////////////////////
void mult_matrice(_mat4x4 m1, _mat4x4 m2, _mat4x4 dest)
{
for(short i=0;i<4;i++)
for(short j=0;j<4;j++)
dest[i][j] = m1[i][0]*m2[0][j]+
m1[i][1]*m2[1][j]+
m1[i][2]*m2[2][j]+
m1[i][3]*m2[3][j];
}

/////////////////////////////////////////////////////////////////////////
// ident_matrice - construit une matrice identite //
/////////////////////////////////////////////////////////////////////////
void ident_matrice(_mat4x4 m)
{
memset(m,NULL,sizeof(_mat4x4)); // 1 0 0 0
m[0][0] = 1.0; // 0 1 0 0
m[1][1] = 1.0; // 0 0 1 0
m[2][2] = 1.0; // 0 0 0 1
m[3][3] = 1.0; // matrice identite
}

/////////////////////////////////////////////////////////////////////////
// echelle - matrice de changement d'echelle //
/////////////////////////////////////////////////////////////////////////
void echelle(_mat4x4 m,float ex,float ey, float ez)
{
_mat4x4 emat; // matrice echelle

ident_matrice(emat); // initialise matrice identite
emat[0][0]=ex; // ex 0 0 0
emat[1][1]=ey; // 0 ey 0 0
emat[2][2]=ez; // 0 0 ez 0
// 0 0 0 1
mult_matrice(m,emat,mat1); // (emat X m) -> mat1
copie_matrice(mat1,m); // copie le resultat dans matrice
} // globale de transformation homogene

/////////////////////////////////////////////////////////////////////////
// translation - matrice de translation //
/////////////////////////////////////////////////////////////////////////
void translation(_mat4x4 m,float tx,float ty,float tz)
{
_mat4x4 tmat; // matrice translation

ident_matrice(tmat); // initialise matrice identite
tmat[3][0]=tx; // 1 0 0 0
tmat[3][1]=ty; // 0 1 0 0
tmat[3][2]=tz; // 0 0 1 0
// tx ty tz 1
mult_matrice(m,tmat,mat1); // (tmat X m) -> mat1
copie_matrice(mat1,m); // copie le resultat dans matrice
} // globale de transformation homogene


/////////////////////////////////////////////////////////////////////////
// rotation - matrices de rotations //
/////////////////////////////////////////////////////////////////////////
void rotation(_mat4x4 m,int ax,int ay,int az)
{
_mat4x4 xmat, ymat, zmat;

ident_matrice(xmat);
ident_matrice(ymat);
ident_matrice(zmat);

xmat[1][1] = COS(ax); xmat[1][2] = SIN(ax);
xmat[2][1] = -SIN(ax); xmat[2][2] = COS(ax);

ymat[0][0] = COS(ay); ymat[0][2] = -SIN(ay);
ymat[2][0] = SIN(ay); ymat[2][2] = COS(ay);

zmat[0][0] = COS(az); zmat[0][1] = SIN(az);
zmat[1][0] = -SIN(az); zmat[1][1] = COS(az);

mult_matrice(m,ymat,mat1);
mult_matrice(mat1,xmat,mat2);
mult_matrice(mat2,zmat,m);
}

/////////////////////////////////////////////////////////////////////////
// projection - transformation 3D -> 2D //
/////////////////////////////////////////////////////////////////////////
void projection(_sommet *sommet)
{
sommet->ecran.x = sommet->monde.x * DISTANCE / sommet->monde.z + MX;
sommet->ecran.y = sommet->monde.y * DISTANCE / sommet->monde.z + MY;
}

/////////////////////////////////////////////////////////////////////////
// transformation - multiplication de chaque sommet par la matrice //
/////////////////////////////////////////////////////////////////////////
void transformation(_mat4x4 m)
{
_sommet *sommet;

for(int v=0; v<unObjet.nbsommet; v++)
{
sommet = &unObjet.sommet[v];

sommet->monde.x = sommet->local.x*m[0][0]+
sommet->local.y*m[1][0]+
sommet->local.z*m[2][0]+
m[3][0];

sommet->monde.y = sommet->local.x*m[0][1]+
sommet->local.y*m[1][1]+
sommet->local.z*m[2][1]+
m[3][1];

sommet->monde.z = sommet->local.x*m[0][2]+
sommet->local.y*m[1][2]+
sommet->local.z*m[2][2]+
m[3][2];
projection(sommet);
}
}

/////////////////////////////////////////////////////////////////////////
// calcnormal - calcule les normales de face pour chaque polygones //
/////////////////////////////////////////////////////////////////////////
void calcnormal()
{
_3D v1,v2;

for(int face=0; face<unObjet.nbpolygone; face++)
{
// Normales de faces
v1.x = unObjet.sommet[unObjet.poly[face].a].monde.x - unObjet.sommet[unObjet.poly[face].b].monde.x;
v1.y = unObjet.sommet[unObjet.poly[face].a].monde.y - unObjet.sommet[unObjet.poly[face].b].monde.y;
v1.z = unObjet.sommet[unObjet.poly[face].a].monde.z - unObjet.sommet[unObjet.poly[face].b].monde.z;

v2.x = unObjet.sommet[unObjet.poly[face].c].monde.x - unObjet.sommet[unObjet.poly[face].b].monde.x;
v2.y = unObjet.sommet[unObjet.poly[face].c].monde.y - unObjet.sommet[unObjet.poly[face].b].monde.y;
v2.z = unObjet.sommet[unObjet.poly[face].c].monde.z - unObjet.sommet[unObjet.poly[face].b].monde.z;

vectoriel(&unObjet.poly[face].normale,v2,v1);
normalise(&unObjet.poly[face].normale);

}

for(int sommet=0;sommet<unObjet.nbsommet;sommet++)
{
for(face=0;face<unObjet.nbpolygone;face++)
{
if (unObjet.poly[face].a==sommet || unObjet.poly[face].b==sommet || unObjet.poly[face].c==sommet)
{
unObjet.sommet[sommet].normale.x += unObjet.poly[face].normale.x;
unObjet.sommet[sommet].normale.y += unObjet.poly[face].normale.y;
unObjet.sommet[sommet].normale.z += unObjet.poly[face].normale.z;
}
}
unObjet.sommet[sommet].normale.x /= 3;
unObjet.sommet[sommet].normale.y /= 3;
unObjet.sommet[sommet].normale.z /= 3;
normalise(&unObjet.sommet[sommet].normale);
}

}

/////////////////////////////////////////////////////////////////////////
// trier_faces - trie les faces selon leurs Z moyen (Bubble Sort) //
/////////////////////////////////////////////////////////////////////////
void trier_faces(int nb)
{
int position = 0;
int tempval;

while (position < nb-1)
{
if (unObjet.poly[ordre[position]].z > unObjet.poly[ordre[position+1]].z)
{
tempval = ordre[position+1];
ordre[position+1] = ordre[position];
ordre[position] = tempval;
position = -1;
}
position++;
}
}

/////////////////////////////////////////////////////////////////////////
// dessine_objet - dessine les sommets de l'objet //
/////////////////////////////////////////////////////////////////////////
void dessine_objet()
{
int nb=0;
double angle;
float Znormale;
unsigned char col;
_2D poly2D[3];

// Boucle principale du rendeur
for(int face=0; face<unObjet.nbpolygone; face++)
{
poly2D[0] = unObjet.sommet[unObjet.poly[face].a].ecran;
poly2D[1] = unObjet.sommet[unObjet.poly[face].b].ecran;
poly2D[2] = unObjet.sommet[unObjet.poly[face].c].ecran;

Znormale = (poly2D[0].y - poly2D[2].y) *
(poly2D[1].x - poly2D[0].x) -
(poly2D[0].x - poly2D[2].x) *
(poly2D[1].y - poly2D[0].y);

if (Znormale < 0)
{

unObjet.poly[face].z = unObjet.sommet[unObjet.poly[face].a].monde.z+
unObjet.sommet[unObjet.poly[face].b].monde.z+
unObjet.sommet[unObjet.poly[face].c].monde.z;
ordre[nb++] = face;

angle = scalaire(unObjet.sommet[unObjet.poly[face].a].normale,lumiere);
if (angle<0) col = AMBIANT; else col = AMBIANT + DIFFUSE * angle;
unObjet.sommet[unObjet.poly[face].a].ecran.couleur = col;

angle = scalaire(unObjet.sommet[unObjet.poly[face].b].normale,lumiere);
if (angle<0) col = AMBIANT; else col = AMBIANT + DIFFUSE * angle;
unObjet.sommet[unObjet.poly[face].b].ecran.couleur = col;

angle = scalaire(unObjet.sommet[unObjet.poly[face].c].normale,lumiere);
if (angle<0) col = AMBIANT; else col = AMBIANT + DIFFUSE * angle;
unObjet.sommet[unObjet.poly[face].c].ecran.couleur = col;
}
}

trier_faces(nb);

for (face=0;face<nb;face++)
{
poly2D[0] = unObjet.sommet[unObjet.poly[ordre[face]].a].ecran;
poly2D[1] = unObjet.sommet[unObjet.poly[ordre[face]].b].ecran;
poly2D[2] = unObjet.sommet[unObjet.poly[ordre[face]].c].ecran;
dessine_poly(poly2D);
}
}

/////////////////////////////////////////////////////////////////////////
// loadASC - charge les vertices et les polygones d'un objet 3D Studio //
/////////////////////////////////////////////////////////////////////////
void loadASC(char *nom)
{
FILE *fichier;
char chaine[200];
char *fin;
int i,j;
char temp[50];
float x,y,z;
int a,b,c;
int Nb_points=0;
int Nb_faces=0;
int decalage=0;

if ((fichier = fopen(nom,"rt"))==NULL)
{
perror("Impossible d'ouvrir le fichier en lecture");
exit(-2);
}

do
{
// On lit le fichier contenant les informations sur l'objet
fin=fgets(chaine,100,fichier);
if (!strncmp(chaine,"Vertex",6))
{
if (strncmp(chaine,"Vertex list",11))
{
// Lecture des coordonnÇes d'un point
i=0;

while(chaine[i]!='X') i++;
i+=2;
sscanf(chaine+i,"%f",&x);

while(chaine[i]!='Y') i++;
i+=2;
sscanf(chaine+i,"%f",&y);

while(chaine[i]!='Z') i++;
i+=2;
sscanf(chaine+i,"%f",&z);

unObjet.sommet[Nb_points].local.x=x;
unObjet.sommet[Nb_points].local.y=y;
unObjet.sommet[Nb_points].local.z=z;

Nb_points++;
}
}
else
{
if (!strncmp(chaine,"Face",4))
{
if (strncmp(chaine,"Face list",9))
{
// Lecture d'une facette
i=j=0;
while(chaine[i]!='A') i++;
i+=2;
j=i;
while(chaine[j]!=' ') j++;
strncpy(temp,chaine+i,j-i);
temp[j-i]=0;

unObjet.poly[Nb_faces].a=atoi(temp)+decalage;

while(chaine[i]!='B') i++;
i+=2;
j=i;
while(chaine[j]!=' ') j++;
strncpy(temp,chaine+i,j-i);
temp[j-i]=0;
unObjet.poly[Nb_faces].b=atoi(temp)+decalage;

while(chaine[i]!='C') i++;
i+=2;
j=i;
while(chaine[j]!=' ') j++;
strncpy(temp,chaine+i,j-i);
temp[j-i]=0;
unObjet.poly[Nb_faces].c=atoi(temp)+decalage;

Nb_faces++;
}
}
else
if (!strncmp(chaine,"Named object",12))
decalage=Nb_points;
}
} while(fin!=NULL);

fclose(fichier);
unObjet.nbpolygone=Nb_faces;
unObjet.nbsommet=Nb_points;
}

//------------------------ FONCTION PRINCIPALE --------------------------//

void main(void)
{
char *nom;
int angle=0;
int choix=0;

// choix d'un objet
do
{
asm {MOV AX,0x03; INT 0x10}
fflush(stdin);
printf("Veuillez choisir un objet:\n\n");
printf("1- Cube\n2- Tore\n3- Cylindre\n4- Teapot\n5- Sphere\n6- Spindle\n\n");
printf("Choix ->");
scanf(" %i", &choix);
} while(choix <=0 || choix >6);

switch(choix)
{
case 1: nom = "cube.asc"; break;
case 2: nom = "torus.asc"; break;
case 3: nom = "cylindre.asc"; break;
case 4: nom = "teapot.asc"; break;
case 5: nom = "sphere.asc"; break;
case 6: nom = "spindle.asc"; break;
}

// charge et affiche les informations de l'objet (sommet et polygones)
loadASC(nom);
printf("\nNom de l'objet : %s\n",nom);
printf("Nombre de sommet : %i\n",unObjet.nbsommet);
printf("Nombre de polygone : %i\n",unObjet.nbpolygone);
printf("\n\nAppuyez sur <retour>\n");
getch();

asm {MOV AX,0x13; INT 0x10}
preparepal();
precalc();
normalise(&lumiere);

while(!kbhit())
{
memset(virtuel,0,64000L);

ident_matrice(matrice);

echelle(matrice,1.0,1.0,1.0);
rotation(matrice,angle,angle,angle);
translation(matrice,0,0,-100);

transformation(matrice);
calcnormal();
dessine_objet();

memcpy(ecran,virtuel,64000L);
if (angle++ == 359) angle = 0;
};

delete []virtuel;
asm {MOV AX,0x03; INT 0x10}
printf("Shaun Dore\ndores@videotron.ca\n http://pages.infinit.net/shaun/ ");
}

spindle.asc

  
Named Object: "Spindle01"
Tri-mesh, Vertices: 62 Faces: 120
Vertex list:
Vertex 0: X: 0,000000 Y: 0,000000 Z: 35,000000
Vertex 1: X: 0,010000 Y: 0,000000 Z: 35,000000
Vertex 2: X: 0,005000 Y: 0,008660 Z: 35,000000
Vertex 3: X: -0,005000 Y: 0,008660 Z: 35,000000
Vertex 4: X: -0,010000 Y: -0,000000 Z: 35,000000
Vertex 5: X: -0,005000 Y: -0,008660 Z: 35,000000
Vertex 6: X: 0,005000 Y: -0,008660 Z: 35,000000
Vertex 7: X: 5,007500 Y: 0,000000 Z: 30,000000
Vertex 8: X: 2,503750 Y: 4,336622 Z: 30,000000
Vertex 9: X: -2,503750 Y: 4,336622 Z: 30,000000
Vertex 10: X: -5,007500 Y: -0,000000 Z: 30,000000
Vertex 11: X: -2,503750 Y: -4,336622 Z: 30,000000
Vertex 12: X: 2,503751 Y: -4,336622 Z: 30,000000
Vertex 13: X: 10,005000 Y: 0,000000 Z: 25,000000
Vertex 14: X: 5,002500 Y: 8,664584 Z: 25,000000
Vertex 15: X: -5,002501 Y: 8,664584 Z: 25,000000
Vertex 16: X: -10,005000 Y: -0,000001 Z: 25,000000
Vertex 17: X: -5,002499 Y: -8,664584 Z: 25,000000
Vertex 18: X: 5,002501 Y: -8,664583 Z: 25,000000
Vertex 19: X: 15,002500 Y: 0,000000 Z: 20,000000
Vertex 20: X: 7,501249 Y: 12,992547 Z: 20,000000
Vertex 21: X: -7,501251 Y: 12,992546 Z: 20,000000
Vertex 22: X: -15,002500 Y: -0,000001 Z: 20,000000
Vertex 23: X: -7,501248 Y: -12,992547 Z: 20,000000
Vertex 24: X: 7,501252 Y: -12,992545 Z: 20,000000
Vertex 25: X: 20,000000 Y: 0,000000 Z: 15,000000
Vertex 26: X: 9,999999 Y: 17,320509 Z: 15,000000
Vertex 27: X: -10,000001 Y: 17,320507 Z: 15,000000
Vertex 28: X: -20,000000 Y: -0,000002 Z: 15,000000
Vertex 29: X: -9,999998 Y: -17,320509 Z: 15,000000
Vertex 30: X: 10,000002 Y: -17,320507 Z: 15,000000
Vertex 31: X: 20,000000 Y: 0,000000 Z: -15,000000
Vertex 32: X: 9,999999 Y: 17,320509 Z: -15,000000
Vertex 33: X: -10,000001 Y: 17,320507 Z: -15,000000
Vertex 34: X: -20,000000 Y: -0,000002 Z: -15,000000
Vertex 35: X: -9,999998 Y: -17,320509 Z: -15,000000
Vertex 36: X: 10,000002 Y: -17,320507 Z: -15,000000
Vertex 37: X: 15,002500 Y: 0,000000 Z: -20,000000
Vertex 38: X: 7,501249 Y: 12,992547 Z: -20,000000
Vertex 39: X: -7,501251 Y: 12,992546 Z: -20,000000
Vertex 40: X: -15,002500 Y: -0,000001 Z: -20,000000
Vertex 41: X: -7,501248 Y: -12,992547 Z: -20,000000
Vertex 42: X: 7,501252 Y: -12,992545 Z: -20,000000
Vertex 43: X: 10,005000 Y: 0,000000 Z: -25,000000
Vertex 44: X: 5,002500 Y: 8,664584 Z: -25,000000
Vertex 45: X: -5,002501 Y: 8,664584 Z: -25,000000
Vertex 46: X: -10,005000 Y: -0,000001 Z: -25,000000
Vertex 47: X: -5,002499 Y: -8,664584 Z: -25,000000
Vertex 48: X: 5,002501 Y: -8,664583 Z: -25,000000
Vertex 49: X: 5,007500 Y: 0,000000 Z: -30,000000
Vertex 50: X: 2,503750 Y: 4,336622 Z: -30,000000
Vertex 51: X: -2,503750 Y: 4,336622 Z: -30,000000
Vertex 52: X: -5,007500 Y: -0,000000 Z: -30,000000
Vertex 53: X: -2,503750 Y: -4,336622 Z: -30,000000
Vertex 54: X: 2,503751 Y: -4,336622 Z: -30,000000
Vertex 55: X: 0,010000 Y: 0,000000 Z: -35,000000
Vertex 56: X: 0,005000 Y: 0,008660 Z: -35,000000
Vertex 57: X: -0,005000 Y: 0,008660 Z: -35,000000
Vertex 58: X: -0,010000 Y: -0,000000 Z: -35,000000
Vertex 59: X: -0,005000 Y: -0,008660 Z: -35,000000
Vertex 60: X: 0,005000 Y: -0,008660 Z: -35,000000
Vertex 61: X: 0,000000 Y: 0,000000 Z: -35,000000
Face list:
Face 0: A:0 B:1 C:2 AB:1 BC:1 CA:0
Smoothing: 5
Face 1: A:0 B:2 C:3 AB:1 BC:1 CA:0
Smoothing: 5
Face 2: A:0 B:3 C:4 AB:1 BC:1 CA:0
Smoothing: 5
Face 3: A:0 B:4 C:5 AB:1 BC:1 CA:0
Smoothing: 5
Face 4: A:0 B:5 C:6 AB:1 BC:1 CA:0
Smoothing: 5
Face 5: A:0 B:6 C:1 AB:1 BC:1 CA:0
Smoothing: 5
Face 6: A:1 B:7 C:8 AB:1 BC:1 CA:0
Smoothing: 3
Face 7: A:1 B:8 C:2 AB:0 BC:1 CA:1
Smoothing: 3
Face 8: A:2 B:8 C:9 AB:1 BC:1 CA:0
Smoothing: 3
Face 9: A:2 B:9 C:3 AB:0 BC:1 CA:1
Smoothing: 3
Face 10: A:3 B:9 C:10 AB:1 BC:1 CA:0
Smoothing: 3
Face 11: A:3 B:10 C:4 AB:0 BC:1 CA:1
Smoothing: 3
Face 12: A:4 B:10 C:11 AB:1 BC:1 CA:0
Smoothing: 3
Face 13: A:4 B:11 C:5 AB:0 BC:1 CA:1
Smoothing: 3
Face 14: A:5 B:11 C:12 AB:1 BC:1 CA:0
Smoothing: 3
Face 15: A:5 B:12 C:6 AB:0 BC:1 CA:1
Smoothing: 3
Face 16: A:6 B:12 C:7 AB:1 BC:1 CA:0
Smoothing: 3
Face 17: A:6 B:7 C:1 AB:0 BC:1 CA:1
Smoothing: 3
Face 18: A:7 B:13 C:14 AB:1 BC:1 CA:0
Smoothing: 3
Face 19: A:7 B:14 C:8 AB:0 BC:1 CA:1
Smoothing: 3
Face 20: A:8 B:14 C:15 AB:1 BC:1 CA:0
Smoothing: 3
Face 21: A:8 B:15 C:9 AB:0 BC:1 CA:1
Smoothing: 3
Face 22: A:9 B:15 C:16 AB:1 BC:1 CA:0
Smoothing: 3
Face 23: A:9 B:16 C:10 AB:0 BC:1 CA:1
Smoothing: 3
Face 24: A:10 B:16 C:17 AB:1 BC:1 CA:0
Smoothing: 3
Face 25: A:10 B:17 C:11 AB:0 BC:1 CA:1
Smoothing: 3
Face 26: A:11 B:17 C:18 AB:1 BC:1 CA:0
Smoothing: 3
Face 27: A:11 B:18 C:12 AB:0 BC:1 CA:1
Smoothing: 3
Face 28: A:12 B:18 C:13 AB:1 BC:1 CA:0
Smoothing: 3
Face 29: A:12 B:13 C:7 AB:0 BC:1 CA:1
Smoothing: 3
Face 30: A:13 B:19 C:20 AB:1 BC:1 CA:0
Smoothing: 3
Face 31: A:13 B:20 C:14 AB:0 BC:1 CA:1
Smoothing: 3
Face 32: A:14 B:20 C:21 AB:1 BC:1 CA:0
Smoothing: 3
Face 33: A:14 B:21 C:15 AB:0 BC:1 CA:1
Smoothing: 3
Face 34: A:15 B:21 C:22 AB:1 BC:1 CA:0
Smoothing: 3
Face 35: A:15 B:22 C:16 AB:0 BC:1 CA:1
Smoothing: 3
Face 36: A:16 B:22 C:23 AB:1 BC:1 CA:0
Smoothing: 3
Face 37: A:16 B:23 C:17 AB:0 BC:1 CA:1
Smoothing: 3
Face 38: A:17 B:23 C:24 AB:1 BC:1 CA:0
Smoothing: 3
Face 39: A:17 B:24 C:18 AB:0 BC:1 CA:1
Smoothing: 3
Face 40: A:18 B:24 C:19 AB:1 BC:1 CA:0
Smoothing: 3
Face 41: A:18 B:19 C:13 AB:0 BC:1 CA:1
Smoothing: 3
Face 42: A:19 B:25 C:26 AB:1 BC:1 CA:0
Smoothing: 3
Face 43: A:19 B:26 C:20 AB:0 BC:1 CA:1
Smoothing: 3
Face 44: A:20 B:26 C:27 AB:1 BC:1 CA:0
Smoothing: 3
Face 45: A:20 B:27 C:21 AB:0 BC:1 CA:1
Smoothing: 3
Face 46: A:21 B:27 C:28 AB:1 BC:1 CA:0
Smoothing: 3
Face 47: A:21 B:28 C:22 AB:0 BC:1 CA:1
Smoothing: 3
Face 48: A:22 B:28 C:29 AB:1 BC:1 CA:0
Smoothing: 3
Face 49: A:22 B:29 C:23 AB:0 BC:1 CA:1
Smoothing: 3
Face 50: A:23 B:29 C:30 AB:1 BC:1 CA:0
Smoothing: 3
Face 51: A:23 B:30 C:24 AB:0 BC:1 CA:1
Smoothing: 3
Face 52: A:24 B:30 C:25 AB:1 BC:1 CA:0
Smoothing: 3
Face 53: A:24 B:25 C:19 AB:0 BC:1 CA:1
Smoothing: 3
Face 54: A:25 B:31 C:32 AB:1 BC:1 CA:0
Smoothing: 4
Face 55: A:25 B:32 C:26 AB:0 BC:1 CA:1
Smoothing: 4
Face 56: A:26 B:32 C:33 AB:1 BC:1 CA:0
Smoothing: 4
Face 57: A:26 B:33 C:27 AB:0 BC:1 CA:1
Smoothing: 4
Face 58: A:27 B:33 C:34 AB:1 BC:1 CA:0
Smoothing: 4
Face 59: A:27 B:34 C:28 AB:0 BC:1 CA:1
Smoothing: 4
Face 60: A:28 B:34 C:35 AB:1 BC:1 CA:0
Smoothing: 4
Face 61: A:28 B:35 C:29 AB:0 BC:1 CA:1
Smoothing: 4
Face 62: A:29 B:35 C:36 AB:1 BC:1 CA:0
Smoothing: 4
Face 63: A:29 B:36 C:30 AB:0 BC:1 CA:1
Smoothing: 4
Face 64: A:30 B:36 C:31 AB:1 BC:1 CA:0
Smoothing: 4
Face 65: A:30 B:31 C:25 AB:0 BC:1 CA:1
Smoothing: 4
Face 66: A:31 B:37 C:38 AB:1 BC:1 CA:0
Smoothing: 3
Face 67: A:31 B:38 C:32 AB:0 BC:1 CA:1
Smoothing: 3
Face 68: A:32 B:38 C:39 AB:1 BC:1 CA:0
Smoothing: 3
Face 69: A:32 B:39 C:33 AB:0 BC:1 CA:1
Smoothing: 3
Face 70: A:33 B:39 C:40 AB:1 BC:1 CA:0
Smoothing: 3
Face 71: A:33 B:40 C:34 AB:0 BC:1 CA:1
Smoothing: 3
Face 72: A:34 B:40 C:41 AB:1 BC:1 CA:0
Smoothing: 3
Face 73: A:34 B:41 C:35 AB:0 BC:1 CA:1
Smoothing: 3
Face 74: A:35 B:41 C:42 AB:1 BC:1 CA:0
Smoothing: 3
Face 75: A:35 B:42 C:36 AB:0 BC:1 CA:1
Smoothing: 3
Face 76: A:36 B:42 C:37 AB:1 BC:1 CA:0
Smoothing: 3
Face 77: A:36 B:37 C:31 AB:0 BC:1 CA:1
Smoothing: 3
Face 78: A:37 B:43 C:44 AB:1 BC:1 CA:0
Smoothing: 3
Face 79: A:37 B:44 C:38 AB:0 BC:1 CA:1
Smoothing: 3
Face 80: A:38 B:44 C:45 AB:1 BC:1 CA:0
Smoothing: 3
Face 81: A:38 B:45 C:39 AB:0 BC:1 CA:1
Smoothing: 3
Face 82: A:39 B:45 C:46 AB:1 BC:1 CA:0
Smoothing: 3
Face 83: A:39 B:46 C:40 AB:0 BC:1 CA:1
Smoothing: 3
Face 84: A:40 B:46 C:47 AB:1 BC:1 CA:0
Smoothing: 3
Face 85: A:40 B:47 C:41 AB:0 BC:1 CA:1
Smoothing: 3
Face 86: A:41 B:47 C:48 AB:1 BC:1 CA:0
Smoothing: 3
Face 87: A:41 B:48 C:42 AB:0 BC:1 CA:1
Smoothing: 3
Face 88: A:42 B:48 C:43 AB:1 BC:1 CA:0
Smoothing: 3
Face 89: A:42 B:43 C:37 AB:0 BC:1 CA:1
Smoothing: 3
Face 90: A:43 B:49 C:50 AB:1 BC:1 CA:0
Smoothing: 3
Face 91: A:43 B:50 C:44 AB:0 BC:1 CA:1
Smoothing: 3
Face 92: A:44 B:50 C:51 AB:1 BC:1 CA:0
Smoothing: 3
Face 93: A:44 B:51 C:45 AB:0 BC:1 CA:1
Smoothing: 3
Face 94: A:45 B:51 C:52 AB:1 BC:1 CA:0
Smoothing: 3
Face 95: A:45 B:52 C:46 AB:0 BC:1 CA:1
Smoothing: 3
Face 96: A:46 B:52 C:53 AB:1 BC:1 CA:0
Smoothing: 3
Face 97: A:46 B:53 C:47 AB:0 BC:1 CA:1
Smoothing: 3
Face 98: A:47 B:53 C:54 AB:1 BC:1 CA:0
Smoothing: 3
Face 99: A:47 B:54 C:48 AB:0 BC:1 CA:1
Smoothing: 3
Face 100: A:48 B:54 C:49 AB:1 BC:1 CA:0
Smoothing: 3
Face 101: A:48 B:49 C:43 AB:0 BC:1 CA:1
Smoothing: 3
Face 102: A:49 B:55 C:56 AB:1 BC:1 CA:0
Smoothing: 3
Face 103: A:49 B:56 C:50 AB:0 BC:1 CA:1
Smoothing: 3
Face 104: A:50 B:56 C:57 AB:1 BC:1 CA:0
Smoothing: 3
Face 105: A:50 B:57 C:51 AB:0 BC:1 CA:1
Smoothing: 3
Face 106: A:51 B:57 C:58 AB:1 BC:1 CA:0
Smoothing: 3
Face 107: A:51 B:58 C:52 AB:0 BC:1 CA:1
Smoothing: 3
Face 108: A:52 B:58 C:59 AB:1 BC:1 CA:0
Smoothing: 3
Face 109: A:52 B:59 C:53 AB:0 BC:1 CA:1
Smoothing: 3
Face 110: A:53 B:59 C:60 AB:1 BC:1 CA:0
Smoothing: 3
Face 111: A:53 B:60 C:54 AB:0 BC:1 CA:1
Smoothing: 3
Face 112: A:54 B:60 C:55 AB:1 BC:1 CA:0
Smoothing: 3
Face 113: A:54 B:55 C:49 AB:0 BC:1 CA:1
Smoothing: 3
Face 114: A:55 B:61 C:56 AB:0 BC:1 CA:1
Smoothing: 5
Face 115: A:56 B:61 C:57 AB:0 BC:1 CA:1
Smoothing: 5
Face 116: A:57 B:61 C:58 AB:0 BC:1 CA:1
Smoothing: 5
Face 117: A:58 B:61 C:59 AB:0 BC:1 CA:1
Smoothing: 5
Face 118: A:59 B:61 C:60 AB:0 BC:1 CA:1
Smoothing: 5
Face 119: A:60 B:61 C:55 AB:0 BC:1 CA:1
Smoothing: 5

cylindre.asc

  
Named Object: "Cylinder01"
Tri-mesh, Vertices: 50 Faces: 96
Vertex list:
Vertex 0: X: 0,000000 Y: 0,000000 Z: -15,000000
Vertex 1: X: 10,000000 Y: 0,000000 Z: -15,000000
Vertex 2: X: 9,659258 Y: 2,588191 Z: -15,000000
Vertex 3: X: 8,660254 Y: 5,000000 Z: -15,000000
Vertex 4: X: 7,071068 Y: 7,071068 Z: -15,000000
Vertex 5: X: 5,000000 Y: 8,660254 Z: -15,000000
Vertex 6: X: 2,588190 Y: 9,659258 Z: -15,000000
Vertex 7: X: -0,000000 Y: 10,000000 Z: -15,000000
Vertex 8: X: -2,588191 Y: 9,659258 Z: -15,000000
Vertex 9: X: -5,000000 Y: 8,660254 Z: -15,000000
Vertex 10: X: -7,071068 Y: 7,071067 Z: -15,000000
Vertex 11: X: -8,660254 Y: 5,000000 Z: -15,000000
Vertex 12: X: -9,659259 Y: 2,588190 Z: -15,000000
Vertex 13: X: -10,000000 Y: -0,000001 Z: -15,000000
Vertex 14: X: -9,659258 Y: -2,588191 Z: -15,000000
Vertex 15: X: -8,660254 Y: -5,000001 Z: -15,000000
Vertex 16: X: -7,071067 Y: -7,071069 Z: -15,000000
Vertex 17: X: -4,999999 Y: -8,660254 Z: -15,000000
Vertex 18: X: -2,588189 Y: -9,659259 Z: -15,000000
Vertex 19: X: 0,000001 Y: -10,000000 Z: -15,000000
Vertex 20: X: 2,588192 Y: -9,659258 Z: -15,000000
Vertex 21: X: 5,000001 Y: -8,660254 Z: -15,000000
Vertex 22: X: 7,071069 Y: -7,071067 Z: -15,000000
Vertex 23: X: 8,660254 Y: -4,999999 Z: -15,000000
Vertex 24: X: 9,659259 Y: -2,588189 Z: -15,000000
Vertex 25: X: 10,000000 Y: 0,000000 Z: 15,000000
Vertex 26: X: 9,659258 Y: 2,588191 Z: 15,000000
Vertex 27: X: 8,660254 Y: 5,000000 Z: 15,000000
Vertex 28: X: 7,071068 Y: 7,071068 Z: 15,000000
Vertex 29: X: 5,000000 Y: 8,660254 Z: 15,000000
Vertex 30: X: 2,588190 Y: 9,659258 Z: 15,000000
Vertex 31: X: -0,000000 Y: 10,000000 Z: 15,000000
Vertex 32: X: -2,588191 Y: 9,659258 Z: 15,000000
Vertex 33: X: -5,000000 Y: 8,660254 Z: 15,000000
Vertex 34: X: -7,071068 Y: 7,071067 Z: 15,000000
Vertex 35: X: -8,660254 Y: 5,000000 Z: 15,000000
Vertex 36: X: -9,659259 Y: 2,588190 Z: 15,000000
Vertex 37: X: -10,000000 Y: -0,000001 Z: 15,000000
Vertex 38: X: -9,659258 Y: -2,588191 Z: 15,000000
Vertex 39: X: -8,660254 Y: -5,000001 Z: 15,000000
Vertex 40: X: -7,071067 Y: -7,071069 Z: 15,000000
Vertex 41: X: -4,999999 Y: -8,660254 Z: 15,000000
Vertex 42: X: -2,588189 Y: -9,659259 Z: 15,000000
Vertex 43: X: 0,000001 Y: -10,000000 Z: 15,000000
Vertex 44: X: 2,588192 Y: -9,659258 Z: 15,000000
Vertex 45: X: 5,000001 Y: -8,660254 Z: 15,000000
Vertex 46: X: 7,071069 Y: -7,071067 Z: 15,000000
Vertex 47: X: 8,660254 Y: -4,999999 Z: 15,000000
Vertex 48: X: 9,659259 Y: -2,588189 Z: 15,000000
Vertex 49: X: 0,000000 Y: 0,000000 Z: 15,000000
Face list:
Face 0: A:0 B:2 C:1 AB:0 BC:1 CA:0
Smoothing: 1
Face 1: A:0 B:3 C:2 AB:0 BC:1 CA:0
Smoothing: 1
Face 2: A:0 B:4 C:3 AB:0 BC:1 CA:0
Smoothing: 1
Face 3: A:0 B:5 C:4 AB:0 BC:1 CA:0
Smoothing: 1
Face 4: A:0 B:6 C:5 AB:0 BC:1 CA:0
Smoothing: 1
Face 5: A:0 B:7 C:6 AB:0 BC:1 CA:0
Smoothing: 1
Face 6: A:0 B:8 C:7 AB:0 BC:1 CA:0
Smoothing: 1
Face 7: A:0 B:9 C:8 AB:0 BC:1 CA:0
Smoothing: 1
Face 8: A:0 B:10 C:9 AB:0 BC:1 CA:0
Smoothing: 1
Face 9: A:0 B:11 C:10 AB:0 BC:1 CA:0
Smoothing: 1
Face 10: A:0 B:12 C:11 AB:0 BC:1 CA:0
Smoothing: 1
Face 11: A:0 B:13 C:12 AB:0 BC:1 CA:0
Smoothing: 1
Face 12: A:0 B:14 C:13 AB:0 BC:1 CA:0
Smoothing: 1
Face 13: A:0 B:15 C:14 AB:0 BC:1 CA:0
Smoothing: 1
Face 14: A:0 B:16 C:15 AB:0 BC:1 CA:0
Smoothing: 1
Face 15: A:0 B:17 C:16 AB:0 BC:1 CA:0
Smoothing: 1
Face 16: A:0 B:18 C:17 AB:0 BC:1 CA:0
Smoothing: 1
Face 17: A:0 B:19 C:18 AB:0 BC:1 CA:0
Smoothing: 1
Face 18: A:0 B:20 C:19 AB:0 BC:1 CA:0
Smoothing: 1
Face 19: A:0 B:21 C:20 AB:0 BC:1 CA:0
Smoothing: 1
Face 20: A:0 B:22 C:21 AB:0 BC:1 CA:0
Smoothing: 1
Face 21: A:0 B:23 C:22 AB:0 BC:1 CA:0
Smoothing: 1
Face 22: A:0 B:24 C:23 AB:0 BC:1 CA:0
Smoothing: 1
Face 23: A:0 B:1 C:24 AB:0 BC:1 CA:0
Smoothing: 1
Face 24: A:1 B:26 C:25 AB:0 BC:1 CA:1
Smoothing:
Face 25: A:1 B:2 C:26 AB:1 BC:1 CA:0
Smoothing:
Face 26: A:2 B:27 C:26 AB:0 BC:1 CA:1
Smoothing:
Face 27: A:2 B:3 C:27 AB:1 BC:1 CA:0
Smoothing:
Face 28: A:3 B:28 C:27 AB:0 BC:1 CA:1
Smoothing:
Face 29: A:3 B:4 C:28 AB:1 BC:1 CA:0
Smoothing:
Face 30: A:4 B:29 C:28 AB:0 BC:1 CA:1
Smoothing:
Face 31: A:4 B:5 C:29 AB:1 BC:1 CA:0
Smoothing:
Face 32: A:5 B:30 C:29 AB:0 BC:1 CA:1
Smoothing:
Face 33: A:5 B:6 C:30 AB:1 BC:1 CA:0
Smoothing:
Face 34: A:6 B:31 C:30 AB:0 BC:1 CA:1
Smoothing:
Face 35: A:6 B:7 C:31 AB:1 BC:1 CA:0
Smoothing:
Face 36: A:7 B:32 C:31 AB:0 BC:1 CA:1
Smoothing:
Face 37: A:7 B:8 C:32 AB:1 BC:1 CA:0
Smoothing:
Face 38: A:8 B:33 C:32 AB:0 BC:1 CA:1
Smoothing:
Face 39: A:8 B:9 C:33 AB:1 BC:1 CA:0
Smoothing:
Face 40: A:9 B:34 C:33 AB:0 BC:1 CA:1
Smoothing:
Face 41: A:9 B:10 C:34 AB:1 BC:1 CA:0
Smoothing:
Face 42: A:10 B:35 C:34 AB:0 BC:1 CA:1
Smoothing:
Face 43: A:10 B:11 C:35 AB:1 BC:1 CA:0
Smoothing:
Face 44: A:11 B:36 C:35 AB:0 BC:1 CA:1
Smoothing:
Face 45: A:11 B:12 C:36 AB:1 BC:1 CA:0
Smoothing:
Face 46: A:12 B:37 C:36 AB:0 BC:1 CA:1
Smoothing:
Face 47: A:12 B:13 C:37 AB:1 BC:1 CA:0
Smoothing:
Face 48: A:13 B:38 C:37 AB:0 BC:1 CA:1
Smoothing:
Face 49: A:13 B:14 C:38 AB:1 BC:1 CA:0
Smoothing:
Face 50: A:14 B:39 C:38 AB:0 BC:1 CA:1
Smoothing:
Face 51: A:14 B:15 C:39 AB:1 BC:1 CA:0
Smoothing:
Face 52: A:15 B:40 C:39 AB:0 BC:1 CA:1
Smoothing:
Face 53: A:15 B:16 C:40 AB:1 BC:1 CA:0
Smoothing:
Face 54: A:16 B:41 C:40 AB:0 BC:1 CA:1
Smoothing:
Face 55: A:16 B:17 C:41 AB:1 BC:1 CA:0
Smoothing:
Face 56: A:17 B:42 C:41 AB:0 BC:1 CA:1
Smoothing:
Face 57: A:17 B:18 C:42 AB:1 BC:1 CA:0
Smoothing:
Face 58: A:18 B:43 C:42 AB:0 BC:1 CA:1
Smoothing:
Face 59: A:18 B:19 C:43 AB:1 BC:1 CA:0
Smoothing:
Face 60: A:19 B:44 C:43 AB:0 BC:1 CA:1
Smoothing:
Face 61: A:19 B:20 C:44 AB:1 BC:1 CA:0
Smoothing:
Face 62: A:20 B:45 C:44 AB:0 BC:1 CA:1
Smoothing:
Face 63: A:20 B:21 C:45 AB:1 BC:1 CA:0
Smoothing:
Face 64: A:21 B:46 C:45 AB:0 BC:1 CA:1
Smoothing:
Face 65: A:21 B:22 C:46 AB:1 BC:1 CA:0
Smoothing:
Face 66: A:22 B:47 C:46 AB:0 BC:1 CA:1
Smoothing:
Face 67: A:22 B:23 C:47 AB:1 BC:1 CA:0
Smoothing:
Face 68: A:23 B:48 C:47 AB:0 BC:1 CA:1
Smoothing:
Face 69: A:23 B:24 C:48 AB:1 BC:1 CA:0
Smoothing:
Face 70: A:24 B:25 C:48 AB:0 BC:1 CA:1
Smoothing:
Face 71: A:24 B:1 C:25 AB:1 BC:1 CA:0
Smoothing:
Face 72: A:49 B:25 C:26 AB:0 BC:1 CA:0
Smoothing: 1
Face 73: A:49 B:26 C:27 AB:0 BC:1 CA:0
Smoothing: 1
Face 74: A:49 B:27 C:28 AB:0 BC:1 CA:0
Smoothing: 1
Face 75: A:49 B:28 C:29 AB:0 BC:1 CA:0
Smoothing: 1
Face 76: A:49 B:29 C:30 AB:0 BC:1 CA:0
Smoothing: 1
Face 77: A:49 B:30 C:31 AB:0 BC:1 CA:0
Smoothing: 1
Face 78: A:49 B:31 C:32 AB:0 BC:1 CA:0
Smoothing: 1
Face 79: A:49 B:32 C:33 AB:0 BC:1 CA:0
Smoothing: 1
Face 80: A:49 B:33 C:34 AB:0 BC:1 CA:0
Smoothing: 1
Face 81: A:49 B:34 C:35 AB:0 BC:1 CA:0
Smoothing: 1
Face 82: A:49 B:35 C:36 AB:0 BC:1 CA:0
Smoothing: 1
Face 83: A:49 B:36 C:37 AB:0 BC:1 CA:0
Smoothing: 1
Face 84: A:49 B:37 C:38 AB:0 BC:1 CA:0
Smoothing: 1
Face 85: A:49 B:38 C:39 AB:0 BC:1 CA:0
Smoothing: 1
Face 86: A:49 B:39 C:40 AB:0 BC:1 CA:0
Smoothing: 1
Face 87: A:49 B:40 C:41 AB:0 BC:1 CA:0
Smoothing: 1
Face 88: A:49 B:41 C:42 AB:0 BC:1 CA:0
Smoothing: 1
Face 89: A:49 B:42 C:43 AB:0 BC:1 CA:0
Smoothing: 1
Face 90: A:49 B:43 C:44 AB:0 BC:1 CA:0
Smoothing: 1
Face 91: A:49 B:44 C:45 AB:0 BC:1 CA:0
Smoothing: 1
Face 92: A:49 B:45 C:46 AB:0 BC:1 CA:0
Smoothing: 1
Face 93: A:49 B:46 C:47 AB:0 BC:1 CA:0
Smoothing: 1
Face 94: A:49 B:47 C:48 AB:0 BC:1 CA:0
Smoothing: 1
Face 95: A:49 B:48 C:25 AB:0 BC:1 CA:0
Smoothing: 1

sphere.asc

  

Named Object: "GeoSphere01"
Tri-mesh, Vertices: 42 Faces: 80
Vertex list:
Vertex 0: X: 0,000000 Y: 0,000000 Z: 20,000000
Vertex 1: X: 17,888544 Y: 0,000000 Z: 8,944272
Vertex 2: X: 5,527864 Y: 17,013018 Z: 8,944272
Vertex 3: X: -14,472137 Y: 10,514621 Z: 8,944272
Vertex 4: X: -14,472136 Y: -10,514625 Z: 8,944272
Vertex 5: X: 5,527866 Y: -17,013016 Z: 8,944272
Vertex 6: X: 14,472136 Y: 10,514623 Z: -8,944272
Vertex 7: X: -5,527865 Y: 17,013016 Z: -8,944272
Vertex 8: X: -17,888544 Y: -0,000002 Z: -8,944272
Vertex 9: X: -5,527866 Y: -17,013016 Z: -8,944272
Vertex 10: X: 14,472140 Y: -10,514617 Z: -8,944272
Vertex 11: X: 0,000000 Y: 0,000000 Z: -20,000000
Vertex 12: X: 10,514623 Y: 0,000000 Z: 17,013018
Vertex 13: X: 3,249197 Y: 10,000001 Z: 17,013018
Vertex 14: X: -8,506509 Y: 6,180339 Z: 17,013018
Vertex 15: X: -8,506508 Y: -6,180341 Z: 17,013018
Vertex 16: X: 3,249198 Y: -10,000000 Z: 17,013018
Vertex 17: X: 13,763820 Y: 10,000001 Z: 10,514623
Vertex 18: X: -5,257312 Y: 16,180340 Z: 10,514623
Vertex 19: X: -17,013018 Y: -0,000002 Z: 10,514623
Vertex 20: X: -5,257309 Y: -16,180340 Z: 10,514623
Vertex 21: X: 13,763821 Y: -9,999999 Z: 10,514623
Vertex 22: X: 19,021130 Y: 6,180340 Z: 0,000000
Vertex 23: X: -0,000001 Y: 20,000002 Z: 0,000000
Vertex 24: X: -19,021132 Y: 6,180338 Z: 0,000000
Vertex 25: X: -11,755705 Y: -16,180340 Z: 0,000000
Vertex 26: X: 11,755711 Y: -16,180338 Z: 0,000000
Vertex 27: X: 19,021132 Y: -6,180336 Z: 0,000000
Vertex 28: X: 11,755705 Y: 16,180340 Z: 0,000000
Vertex 29: X: -11,755707 Y: 16,180338 Z: 0,000000
Vertex 30: X: -19,021130 Y: -6,180342 Z: 0,000000
Vertex 31: X: 0,000000 Y: -20,000002 Z: 0,000000
Vertex 32: X: 5,257311 Y: 16,180340 Z: -10,514623
Vertex 33: X: -13,763820 Y: 9,999998 Z: -10,514623
Vertex 34: X: -13,763820 Y: -10,000000 Z: -10,514622
Vertex 35: X: 5,257313 Y: -16,180338 Z: -10,514624
Vertex 36: X: 17,013018 Y: 0,000003 Z: -10,514622
Vertex 37: X: 8,506509 Y: 6,180340 Z: -17,013018
Vertex 38: X: -3,249198 Y: 10,000000 Z: -17,013018
Vertex 39: X: -10,514623 Y: -0,000001 Z: -17,013018
Vertex 40: X: -3,249198 Y: -10,000000 Z: -17,013018
Vertex 41: X: 8,506511 Y: -6,180337 Z: -17,013018
Face list:
Face 0: A:0 B:12 C:13 AB:1 BC:1 CA:1
Smoothing:
Face 1: A:12 B:1 C:17 AB:1 BC:1 CA:1
Smoothing:
Face 2: A:12 B:17 C:13 AB:1 BC:1 CA:1
Smoothing:
Face 3: A:13 B:17 C:2 AB:1 BC:1 CA:1
Smoothing:
Face 4: A:0 B:13 C:14 AB:1 BC:1 CA:1
Smoothing:
Face 5: A:13 B:2 C:18 AB:1 BC:1 CA:1
Smoothing:
Face 6: A:13 B:18 C:14 AB:1 BC:1 CA:1
Smoothing:
Face 7: A:14 B:18 C:3 AB:1 BC:1 CA:1
Smoothing:
Face 8: A:0 B:14 C:15 AB:1 BC:1 CA:1
Smoothing:
Face 9: A:14 B:3 C:19 AB:1 BC:1 CA:1
Smoothing:
Face 10: A:14 B:19 C:15 AB:1 BC:1 CA:1
Smoothing:
Face 11: A:15 B:19 C:4 AB:1 BC:1 CA:1
Smoothing:
Face 12: A:0 B:15 C:16 AB:1 BC:1 CA:1
Smoothing:
Face 13: A:15 B:4 C:20 AB:1 BC:1 CA:1
Smoothing:
Face 14: A:15 B:20 C:16 AB:1 BC:1 CA:1
Smoothing:
Face 15: A:16 B:20 C:5 AB:1 BC:1 CA:1
Smoothing:
Face 16: A:0 B:16 C:12 AB:1 BC:1 CA:1
Smoothing:
Face 17: A:16 B:5 C:21 AB:1 BC:1 CA:1
Smoothing:
Face 18: A:16 B:21 C:12 AB:1 BC:1 CA:1
Smoothing:
Face 19: A:12 B:21 C:1 AB:1 BC:1 CA:1
Smoothing:
Face 20: A:1 B:27 C:22 AB:1 BC:1 CA:1
Smoothing:
Face 21: A:27 B:10 C:36 AB:1 BC:1 CA:1
Smoothing:
Face 22: A:27 B:36 C:22 AB:1 BC:1 CA:1
Smoothing:
Face 23: A:22 B:36 C:6 AB:1 BC:1 CA:1
Smoothing:
Face 24: A:2 B:28 C:23 AB:1 BC:1 CA:1
Smoothing:
Face 25: A:28 B:6 C:32 AB:1 BC:1 CA:1
Smoothing:
Face 26: A:28 B:32 C:23 AB:1 BC:1 CA:1
Smoothing:
Face 27: A:23 B:32 C:7 AB:1 BC:1 CA:1
Smoothing:
Face 28: A:3 B:29 C:24 AB:1 BC:1 CA:1
Smoothing:
Face 29: A:29 B:7 C:33 AB:1 BC:1 CA:1
Smoothing:
Face 30: A:29 B:33 C:24 AB:1 BC:1 CA:1
Smoothing:
Face 31: A:24 B:33 C:8 AB:1 BC:1 CA:1
Smoothing:
Face 32: A:4 B:30 C:25 AB:1 BC:1 CA:1
Smoothing:
Face 33: A:30 B:8 C:34 AB:1 BC:1 CA:1
Smoothing:
Face 34: A:30 B:34 C:25 AB:1 BC:1 CA:1
Smoothing:
Face 35: A:25 B:34 C:9 AB:1 BC:1 CA:1
Smoothing:
Face 36: A:5 B:31 C:26 AB:1 BC:1 CA:1
Smoothing:
Face 37: A:31 B:9 C:35 AB:1 BC:1 CA:1
Smoothing:
Face 38: A:31 B:35 C:26 AB:1 BC:1 CA:1
Smoothing:
Face 39: A:26 B:35 C:10 AB:1 BC:1 CA:1
Smoothing:
Face 40: A:6 B:28 C:22 AB:1 BC:1 CA:1
Smoothing:
Face 41: A:28 B:2 C:17 AB:1 BC:1 CA:1
Smoothing:
Face 42: A:28 B:17 C:22 AB:1 BC:1 CA:1
Smoothing:
Face 43: A:22 B:17 C:1 AB:1 BC:1 CA:1
Smoothing:
Face 44: A:7 B:29 C:23 AB:1 BC:1 CA:1
Smoothing:
Face 45: A:29 B:3 C:18 AB:1 BC:1 CA:1
Smoothing:
Face 46: A:29 B:18 C:23 AB:1 BC:1 CA:1
Smoothing:
Face 47: A:23 B:18 C:2 AB:1 BC:1 CA:1
Smoothing:
Face 48: A:8 B:30 C:24 AB:1 BC:1 CA:1
Smoothing:
Face 49: A:30 B:4 C:19 AB:1 BC:1 CA:1
Smoothing:
Face 50: A:30 B:19 C:24 AB:1 BC:1 CA:1
Smoothing:
Face 51: A:24 B:19 C:3 AB:1 BC:1 CA:1
Smoothing:
Face 52: A:9 B:31 C:25 AB:1 BC:1 CA:1
Smoothing:
Face 53: A:31 B:5 C:20 AB:1 BC:1 CA:1
Smoothing:
Face 54: A:31 B:20 C:25 AB:1 BC:1 CA:1
Smoothing:
Face 55: A:25 B:20 C:4 AB:1 BC:1 CA:1
Smoothing:
Face 56: A:10 B:27 C:26 AB:1 BC:1 CA:1
Smoothing:
Face 57: A:27 B:1 C:21 AB:1 BC:1 CA:1
Smoothing:
Face 58: A:27 B:21 C:26 AB:1 BC:1 CA:1
Smoothing:
Face 59: A:26 B:21 C:5 AB:1 BC:1 CA:1
Smoothing:
Face 60: A:11 B:38 C:37 AB:1 BC:1 CA:1
Smoothing:
Face 61: A:38 B:7 C:32 AB:1 BC:1 CA:1
Smoothing:
Face 62: A:38 B:32 C:37 AB:1 BC:1 CA:1
Smoothing:
Face 63: A:37 B:32 C:6 AB:1 BC:1 CA:1
Smoothing:
Face 64: A:11 B:39 C:38 AB:1 BC:1 CA:1
Smoothing:
Face 65: A:39 B:8 C:33 AB:1 BC:1 CA:1
Smoothing:
Face 66: A:39 B:33 C:38 AB:1 BC:1 CA:1
Smoothing:
Face 67: A:38 B:33 C:7 AB:1 BC:1 CA:1
Smoothing:
Face 68: A:11 B:40 C:39 AB:1 BC:1 CA:1
Smoothing:
Face 69: A:40 B:9 C:34 AB:1 BC:1 CA:1
Smoothing:
Face 70: A:40 B:34 C:39 AB:1 BC:1 CA:1
Smoothing:
Face 71: A:39 B:34 C:8 AB:1 BC:1 CA:1
Smoothing:
Face 72: A:11 B:41 C:40 AB:1 BC:1 CA:1
Smoothing:
Face 73: A:41 B:10 C:35 AB:1 BC:1 CA:1
Smoothing:
Face 74: A:41 B:35 C:40 AB:1 BC:1 CA:1
Smoothing:
Face 75: A:40 B:35 C:9 AB:1 BC:1 CA:1
Smoothing:
Face 76: A:11 B:37 C:41 AB:1 BC:1 CA:1
Smoothing:
Face 77: A:37 B:6 C:36 AB:1 BC:1 CA:1
Smoothing:
Face 78: A:37 B:36 C:41 AB:1 BC:1 CA:1
Smoothing:
Face 79: A:41 B:36 C:10 AB:1 BC:1 CA:1
Smoothing:

torus.asc

  

Named Object: "Torus01"
Tri-mesh, Vertices: 36 Faces: 72
Vertex list:
Vertex 0: X: -0,000001 Y: 30,000000 Z: 0,000000
Vertex 1: X: -0,000001 Y: 25,000000 Z: 8,660254
Vertex 2: X: -0,000001 Y: 14,999999 Z: 8,660254
Vertex 3: X: -0,000000 Y: 10,000000 Z: -0,000001
Vertex 4: X: -0,000001 Y: 15,000001 Z: -8,660254
Vertex 5: X: -0,000001 Y: 25,000002 Z: -8,660254
Vertex 6: X: 25,980762 Y: 15,000000 Z: 0,000000
Vertex 7: X: 21,650635 Y: 12,500000 Z: 8,660254
Vertex 8: X: 12,990380 Y: 7,500000 Z: 8,660254
Vertex 9: X: 8,660254 Y: 5,000000 Z: -0,000001
Vertex 10: X: 12,990381 Y: 7,500000 Z: -8,660254
Vertex 11: X: 21,650637 Y: 12,500001 Z: -8,660254
Vertex 12: X: 25,980762 Y: -15,000000 Z: 0,000000
Vertex 13: X: 21,650635 Y: -12,500000 Z: 8,660254
Vertex 14: X: 12,990380 Y: -7,500000 Z: 8,660254
Vertex 15: X: 8,660254 Y: -5,000000 Z: -0,000001
Vertex 16: X: 12,990381 Y: -7,500000 Z: -8,660254
Vertex 17: X: 21,650637 Y: -12,500001 Z: -8,660254
Vertex 18: X: -0,000001 Y: -30,000000 Z: 0,000000
Vertex 19: X: -0,000001 Y: -25,000000 Z: 8,660254
Vertex 20: X: -0,000001 Y: -14,999999 Z: 8,660254
Vertex 21: X: -0,000000 Y: -10,000000 Z: -0,000001
Vertex 22: X: -0,000001 Y: -15,000001 Z: -8,660254
Vertex 23: X: -0,000001 Y: -25,000002 Z: -8,660254
Vertex 24: X: -25,980762 Y: -14,999998 Z: 0,000000
Vertex 25: X: -21,650637 Y: -12,499998 Z: 8,660254
Vertex 26: X: -12,990381 Y: -7,499999 Z: 8,660254
Vertex 27: X: -8,660254 Y: -5,000000 Z: -0,000001
Vertex 28: X: -12,990382 Y: -7,500000 Z: -8,660254
Vertex 29: X: -21,650637 Y: -12,499999 Z: -8,660254
Vertex 30: X: -25,980761 Y: 15,000002 Z: 0,000000
Vertex 31: X: -21,650633 Y: 12,500001 Z: 8,660254
Vertex 32: X: -12,990379 Y: 7,500000 Z: 8,660254
Vertex 33: X: -8,660254 Y: 5,000000 Z: -0,000001
Vertex 34: X: -12,990381 Y: 7,500001 Z: -8,660254
Vertex 35: X: -21,650635 Y: 12,500002 Z: -8,660254
Face list:
Face 0: A:0 B:7 C:6 AB:0 BC:1 CA:1
Smoothing:
Face 1: A:0 B:1 C:7 AB:1 BC:1 CA:0
Smoothing:
Face 2: A:1 B:8 C:7 AB:0 BC:1 CA:1
Smoothing:
Face 3: A:1 B:2 C:8 AB:1 BC:1 CA:0
Smoothing:
Face 4: A:2 B:9 C:8 AB:0 BC:1 CA:1
Smoothing:
Face 5: A:2 B:3 C:9 AB:1 BC:1 CA:0
Smoothing:
Face 6: A:3 B:10 C:9 AB:0 BC:1 CA:1
Smoothing:
Face 7: A:3 B:4 C:10 AB:1 BC:1 CA:0
Smoothing:
Face 8: A:4 B:11 C:10 AB:0 BC:1 CA:1
Smoothing:
Face 9: A:4 B:5 C:11 AB:1 BC:1 CA:0
Smoothing:
Face 10: A:5 B:6 C:11 AB:0 BC:1 CA:1
Smoothing:
Face 11: A:5 B:0 C:6 AB:1 BC:1 CA:0
Smoothing:
Face 12: A:6 B:13 C:12 AB:0 BC:1 CA:1
Smoothing:
Face 13: A:6 B:7 C:13 AB:1 BC:1 CA:0
Smoothing:
Face 14: A:7 B:14 C:13 AB:0 BC:1 CA:1
Smoothing:
Face 15: A:7 B:8 C:14 AB:1 BC:1 CA:0
Smoothing:
Face 16: A:8 B:15 C:14 AB:0 BC:1 CA:1
Smoothing:
Face 17: A:8 B:9 C:15 AB:1 BC:1 CA:0
Smoothing:
Face 18: A:9 B:16 C:15 AB:0 BC:1 CA:1
Smoothing:
Face 19: A:9 B:10 C:16 AB:1 BC:1 CA:0
Smoothing:
Face 20: A:10 B:17 C:16 AB:0 BC:1 CA:1
Smoothing:
Face 21: A:10 B:11 C:17 AB:1 BC:1 CA:0
Smoothing:
Face 22: A:11 B:12 C:17 AB:0 BC:1 CA:1
Smoothing:
Face 23: A:11 B:6 C:12 AB:1 BC:1 CA:0
Smoothing:
Face 24: A:12 B:19 C:18 AB:0 BC:1 CA:1
Smoothing:
Face 25: A:12 B:13 C:19 AB:1 BC:1 CA:0
Smoothing:
Face 26: A:13 B:20 C:19 AB:0 BC:1 CA:1
Smoothing:
Face 27: A:13 B:14 C:20 AB:1 BC:1 CA:0
Smoothing:
Face 28: A:14 B:21 C:20 AB:0 BC:1 CA:1
Smoothing:
Face 29: A:14 B:15 C:21 AB:1 BC:1 CA:0
Smoothing:
Face 30: A:15 B:22 C:21 AB:0 BC:1 CA:1
Smoothing:
Face 31: A:15 B:16 C:22 AB:1 BC:1 CA:0
Smoothing:
Face 32: A:16 B:23 C:22 AB:0 BC:1 CA:1
Smoothing:
Face 33: A:16 B:17 C:23 AB:1 BC:1 CA:0
Smoothing:
Face 34: A:17 B:18 C:23 AB:0 BC:1 CA:1
Smoothing:
Face 35: A:17 B:12 C:18 AB:1 BC:1 CA:0
Smoothing:
Face 36: A:18 B:25 C:24 AB:0 BC:1 CA:1
Smoothing:
Face 37: A:18 B:19 C:25 AB:1 BC:1 CA:0
Smoothing:
Face 38: A:19 B:26 C:25 AB:0 BC:1 CA:1
Smoothing:
Face 39: A:19 B:20 C:26 AB:1 BC:1 CA:0
Smoothing:
Face 40: A:20 B:27 C:26 AB:0 BC:1 CA:1
Smoothing:
Face 41: A:20 B:21 C:27 AB:1 BC:1 CA:0
Smoothing:
Face 42: A:21 B:28 C:27 AB:0 BC:1 CA:1
Smoothing:
Face 43: A:21 B:22 C:28 AB:1 BC:1 CA:0
Smoothing:
Face 44: A:22 B:29 C:28 AB:0 BC:1 CA:1
Smoothing:
Face 45: A:22 B:23 C:29 AB:1 BC:1 CA:0
Smoothing:
Face 46: A:23 B:24 C:29 AB:0 BC:1 CA:1
Smoothing:
Face 47: A:23 B:18 C:24 AB:1 BC:1 CA:0
Smoothing:
Face 48: A:24 B:31 C:30 AB:0 BC:1 CA:1
Smoothing:
Face 49: A:24 B:25 C:31 AB:1 BC:1 CA:0
Smoothing:
Face 50: A:25 B:32 C:31 AB:0 BC:1 CA:1
Smoothing:
Face 51: A:25 B:26 C:32 AB:1 BC:1 CA:0
Smoothing:
Face 52: A:26 B:33 C:32 AB:0 BC:1 CA:1
Smoothing:
Face 53: A:26 B:27 C:33 AB:1 BC:1 CA:0
Smoothing:
Face 54: A:27 B:34 C:33 AB:0 BC:1 CA:1
Smoothing:
Face 55: A:27 B:28 C:34 AB:1 BC:1 CA:0
Smoothing:
Face 56: A:28 B:35 C:34 AB:0 BC:1 CA:1
Smoothing:
Face 57: A:28 B:29 C:35 AB:1 BC:1 CA:0
Smoothing:
Face 58: A:29 B:30 C:35 AB:0 BC:1 CA:1
Smoothing:
Face 59: A:29 B:24 C:30 AB:1 BC:1 CA:0
Smoothing:
Face 60: A:30 B:1 C:0 AB:0 BC:1 CA:1
Smoothing:
Face 61: A:30 B:31 C:1 AB:1 BC:1 CA:0
Smoothing:
Face 62: A:31 B:2 C:1 AB:0 BC:1 CA:1
Smoothing:
Face 63: A:31 B:32 C:2 AB:1 BC:1 CA:0
Smoothing:
Face 64: A:32 B:3 C:2 AB:0 BC:1 CA:1
Smoothing:
Face 65: A:32 B:33 C:3 AB:1 BC:1 CA:0
Smoothing:
Face 66: A:33 B:4 C:3 AB:0 BC:1 CA:1
Smoothing:
Face 67: A:33 B:34 C:4 AB:1 BC:1 CA:0
Smoothing:
Face 68: A:34 B:5 C:4 AB:0 BC:1 CA:1
Smoothing:
Face 69: A:34 B:35 C:5 AB:1 BC:1 CA:0
Smoothing:
Face 70: A:35 B:0 C:5 AB:0 BC:1 CA:1
Smoothing:
Face 71: A:35 B:30 C:0 AB:1 BC:1 CA:0
Smoothing:

teapot.asc

  

Named Object: "Teapot01"
Tri-mesh, Vertices: 38 Faces: 64
Vertex list:
Vertex 0: X: 14,000000 Y: 0,000000 Z: 14,000000
Vertex 1: X: 15,000000 Y: 0,000000 Z: 14,000000
Vertex 2: X: 0,000000 Y: -14,000000 Z: 14,000000
Vertex 3: X: 0,000000 Y: -15,000000 Z: 14,000000
Vertex 4: X: -14,000000 Y: 0,000000 Z: 14,000000
Vertex 5: X: -15,000000 Y: 0,000000 Z: 14,000000
Vertex 6: X: 0,000000 Y: 14,000000 Z: 14,000000
Vertex 7: X: 0,000000 Y: 15,000000 Z: 14,000000
Vertex 8: X: 20,000000 Y: 0,000000 Z: -1,000000
Vertex 9: X: 0,000000 Y: -20,000000 Z: -1,000000
Vertex 10: X: -20,000000 Y: 0,000000 Z: -1,000000
Vertex 11: X: 0,000000 Y: 20,000000 Z: -1,000000
Vertex 12: X: 15,000000 Y: 0,000000 Z: -8,500000
Vertex 13: X: 0,000000 Y: -15,000000 Z: -8,500000
Vertex 14: X: -15,000000 Y: 0,000000 Z: -8,500000
Vertex 15: X: 0,000000 Y: 15,000000 Z: -8,500000
Vertex 16: X: 0,000000 Y: 0,000000 Z: -10,000000
Vertex 17: X: -16,000000 Y: 0,000000 Z: 10,250000
Vertex 18: X: -27,000000 Y: 0,000000 Z: 8,000000
Vertex 19: X: -15,000000 Y: 0,000000 Z: 12,500000
Vertex 20: X: -30,000000 Y: 0,000000 Z: 8,000000
Vertex 21: X: -20,000000 Y: 0,000000 Z: -1,000000
Vertex 22: X: -19,000000 Y: 0,000000 Z: -4,000000
Vertex 23: X: 17,000000 Y: 0,000000 Z: 4,250000
Vertex 24: X: 27,000000 Y: 0,000000 Z: 14,000000
Vertex 25: X: 17,000000 Y: 0,000000 Z: -4,000000
Vertex 26: X: 33,000000 Y: 0,000000 Z: 14,000000
Vertex 27: X: 28,000000 Y: 0,000000 Z: 14,000000
Vertex 28: X: 32,000000 Y: 0,000000 Z: 14,000000
Vertex 29: X: 0,000000 Y: 0,000000 Z: 21,500000
Vertex 30: X: 2,000000 Y: 0,000000 Z: 17,000000
Vertex 31: X: 0,000000 Y: -2,000000 Z: 17,000000
Vertex 32: X: -2,000000 Y: 0,000000 Z: 17,000000
Vertex 33: X: 0,000000 Y: 2,000000 Z: 17,000000
Vertex 34: X: 13,000000 Y: 0,000000 Z: 14,000000
Vertex 35: X: 0,000000 Y: -13,000000 Z: 14,000000
Vertex 36: X: -13,000000 Y: 0,000000 Z: 14,000000
Vertex 37: X: 0,000000 Y: 13,000000 Z: 14,000000
Face list:
Face 0: A:0 B:2 C:3 AB:1 BC:1 CA:0
Smoothing:
Face 1: A:3 B:1 C:0 AB:1 BC:1 CA:0
Smoothing:
Face 2: A:2 B:4 C:5 AB:1 BC:1 CA:0
Smoothing:
Face 3: A:5 B:3 C:2 AB:1 BC:1 CA:0
Smoothing:
Face 4: A:4 B:6 C:7 AB:1 BC:1 CA:0
Smoothing:
Face 5: A:7 B:5 C:4 AB:1 BC:1 CA:0
Smoothing:
Face 6: A:6 B:0 C:1 AB:1 BC:1 CA:0
Smoothing:
Face 7: A:1 B:7 C:6 AB:1 BC:1 CA:0
Smoothing:
Face 8: A:1 B:3 C:9 AB:1 BC:1 CA:0
Smoothing:
Face 9: A:9 B:8 C:1 AB:1 BC:1 CA:0
Smoothing:
Face 10: A:3 B:5 C:10 AB:1 BC:1 CA:0
Smoothing:
Face 11: A:10 B:9 C:3 AB:1 BC:1 CA:0
Smoothing:
Face 12: A:5 B:7 C:11 AB:1 BC:1 CA:0
Smoothing:
Face 13: A:11 B:10 C:5 AB:1 BC:1 CA:0
Smoothing:
Face 14: A:7 B:1 C:8 AB:1 BC:1 CA:0
Smoothing:
Face 15: A:8 B:11 C:7 AB:1 BC:1 CA:0
Smoothing:
Face 16: A:8 B:9 C:13 AB:1 BC:1 CA:0
Smoothing:
Face 17: A:13 B:12 C:8 AB:1 BC:1 CA:0
Smoothing:
Face 18: A:9 B:10 C:14 AB:1 BC:1 CA:0
Smoothing:
Face 19: A:14 B:13 C:9 AB:1 BC:1 CA:0
Smoothing:
Face 20: A:10 B:11 C:15 AB:1 BC:1 CA:0
Smoothing:
Face 21: A:15 B:14 C:10 AB:1 BC:1 CA:0
Smoothing:
Face 22: A:11 B:8 C:12 AB:1 BC:1 CA:0
Smoothing:
Face 23: A:12 B:15 C:11 AB:1 BC:1 CA:0
Smoothing:
Face 24: A:12 B:13 C:16 AB:1 BC:1 CA:0
Smoothing:
Face 25: A:16 B:16 C:12 AB:1 BC:1 CA:0
Smoothing:
Face 26: A:13 B:14 C:16 AB:1 BC:1 CA:0
Smoothing:
Face 27: A:16 B:16 C:13 AB:1 BC:1 CA:0
Smoothing:
Face 28: A:14 B:15 C:16 AB:1 BC:1 CA:0
Smoothing:
Face 29: A:16 B:16 C:14 AB:1 BC:1 CA:0
Smoothing:
Face 30: A:15 B:12 C:16 AB:1 BC:1 CA:0
Smoothing:
Face 31: A:16 B:16 C:15 AB:1 BC:1 CA:0
Smoothing:
Face 32: A:17 B:19 C:20 AB:1 BC:1 CA:0
Smoothing:
Face 33: A:20 B:18 C:17 AB:1 BC:1 CA:0
Smoothing:
Face 34: A:19 B:17 C:18 AB:1 BC:1 CA:0
Smoothing:
Face 35: A:18 B:20 C:19 AB:1 BC:1 CA:0
Smoothing:
Face 36: A:18 B:20 C:22 AB:1 BC:1 CA:0
Smoothing:
Face 37: A:22 B:21 C:18 AB:1 BC:1 CA:0
Smoothing:
Face 38: A:20 B:18 C:21 AB:1 BC:1 CA:0
Smoothing:
Face 39: A:21 B:22 C:20 AB:1 BC:1 CA:0
Smoothing:
Face 40: A:23 B:25 C:26 AB:1 BC:1 CA:0
Smoothing:
Face 41: A:26 B:24 C:23 AB:1 BC:1 CA:0
Smoothing:
Face 42: A:25 B:23 C:24 AB:1 BC:1 CA:0
Smoothing:
Face 43: A:24 B:26 C:25 AB:1 BC:1 CA:0
Smoothing:
Face 44: A:24 B:26 C:28 AB:1 BC:1 CA:0
Smoothing:
Face 45: A:28 B:27 C:24 AB:1 BC:1 CA:0
Smoothing:
Face 46: A:26 B:24 C:27 AB:1 BC:1 CA:0
Smoothing:
Face 47: A:27 B:28 C:26 AB:1 BC:1 CA:0
Smoothing:
Face 48: A:29 B:29 C:31 AB:1 BC:1 CA:0
Smoothing:
Face 49: A:31 B:30 C:29 AB:1 BC:1 CA:0
Smoothing:
Face 50: A:29 B:29 C:32 AB:1 BC:1 CA:0
Smoothing:
Face 51: A:32 B:31 C:29 AB:1 BC:1 CA:0
Smoothing:
Face 52: A:29 B:29 C:33 AB:1 BC:1 CA:0
Smoothing:
Face 53: A:33 B:32 C:29 AB:1 BC:1 CA:0
Smoothing:
Face 54: A:29 B:29 C:30 AB:1 BC:1 CA:0
Smoothing:
Face 55: A:30 B:33 C:29 AB:1 BC:1 CA:0
Smoothing:
Face 56: A:30 B:31 C:35 AB:1 BC:1 CA:0
Smoothing:
Face 57: A:35 B:34 C:30 AB:1 BC:1 CA:0
Smoothing:
Face 58: A:31 B:32 C:36 AB:1 BC:1 CA:0
Smoothing:
Face 59: A:36 B:35 C:31 AB:1 BC:1 CA:0
Smoothing:
Face 60: A:32 B:33 C:37 AB:1 BC:1 CA:0
Smoothing:
Face 61: A:37 B:36 C:32 AB:1 BC:1 CA:0
Smoothing:
Face 62: A:33 B:30 C:34 AB:1 BC:1 CA:0
Smoothing:
Face 63: A:34 B:37 C:33 AB:1 BC:1 CA:0
Smoothing:

cube.asc

  

Named Object: "Box01"
Tri-mesh, Vertices: 8 Faces: 12
Vertex list:
Vertex 0: X: -20,000000 Y: -20,000000 Z: -20,000000
Vertex 1: X: 20,000000 Y: -20,000000 Z: -20,000000
Vertex 2: X: -20,000000 Y: 20,000000 Z: -20,000000
Vertex 3: X: 20,000000 Y: 20,000000 Z: -20,000000
Vertex 4: X: -20,000000 Y: -20,000000 Z: 20,000000
Vertex 5: X: 20,000000 Y: -20,000000 Z: 20,000000
Vertex 6: X: -20,000000 Y: 20,000000 Z: 20,000000
Vertex 7: X: 20,000000 Y: 20,000000 Z: 20,000000
Face list:
Face 0: A:0 B:2 C:3 AB:1 BC:1 CA:0
Smoothing: 2
Face 1: A:3 B:1 C:0 AB:1 BC:1 CA:0
Smoothing: 2
Face 2: A:4 B:5 C:7 AB:1 BC:1 CA:0
Smoothing: 3
Face 3: A:7 B:6 C:4 AB:1 BC:1 CA:0
Smoothing: 3
Face 4: A:0 B:1 C:5 AB:1 BC:1 CA:0
Smoothing: 6
Face 5: A:5 B:4 C:0 AB:1 BC:1 CA:0
Smoothing: 6
Face 6: A:1 B:3 C:7 AB:1 BC:1 CA:0
Smoothing: 5
Face 7: A:7 B:5 C:1 AB:1 BC:1 CA:0
Smoothing: 5
Face 8: A:3 B:2 C:6 AB:1 BC:1 CA:0
Smoothing: 6
Face 9: A:6 B:7 C:3 AB:1 BC:1 CA:0
Smoothing: 6
Face 10: A:2 B:0 C:4 AB:1 BC:1 CA:0
Smoothing: 7
Face 11: A:4 B:6 C:2 AB:1 BC:1 CA:0
Smoothing: 7

← previous
next →
loading
sending ...
New to Neperos ? Sign Up for free
download Neperos App from Google Play
install Neperos as PWA

Let's discover also

Recent Articles

Recent Comments

Neperos cookies
This website uses cookies to store your preferences and improve the service. Cookies authorization will allow me and / or my partners to process personal data such as browsing behaviour.

By pressing OK you agree to the Terms of Service and acknowledge the Privacy Policy

By pressing REJECT you will be able to continue to use Neperos (like read articles or write comments) but some important cookies will not be set. This may affect certain features and functions of the platform.
OK
REJECT