Skip to content
Snippets Groups Projects
Commit db5b7551 authored by JM's avatar JM
Browse files

Affichage correct en negatif et positif

parent 3faf287c
Branches
No related tags found
No related merge requests found
...@@ -131,16 +131,6 @@ bool is_point_part_of_triangle(triangle* tri, position point){ ...@@ -131,16 +131,6 @@ bool is_point_part_of_triangle(triangle* tri, position point){
* @return triangle* Triangle englobant toues les points. * @return triangle* Triangle englobant toues les points.
*/ */
triangle* generate_super_triangle(position min, position max){ triangle* generate_super_triangle(position min, position max){
//double min_x = 2 * min.x - EPSILON;
//double max_x = 2 * max.x + EPSILON;
//
//double min_y = 2 * min.y - EPSILON;
//double max_y = 2 * max.y + EPSILON;
//
//position a = (position){.x = min_x, .y = min_y, .z = 0};
//position b = (position){.x = max_x, .y = min_y, .z = 0};
//position c = (position){.x = min_x, .y = max_y, .z = 0};
position center = (position){.x = 0, .y = 0, .z = 0}; position center = (position){.x = 0, .y = 0, .z = 0};
double dst_min = distance(center, min); double dst_min = distance(center, min);
double dst_max = distance(center, max); double dst_max = distance(center, max);
...@@ -152,10 +142,6 @@ triangle* generate_super_triangle(position min, position max){ ...@@ -152,10 +142,6 @@ triangle* generate_super_triangle(position min, position max){
position b = (position){.x = cos(225*M_PI/180) * dst, .y = sin(225*M_PI/180) * dst, .z = 0}; position b = (position){.x = cos(225*M_PI/180) * dst, .y = sin(225*M_PI/180) * dst, .z = 0};
position c = (position){.x = cos(315*M_PI/180) * dst, .y = sin(315*M_PI/180) * dst, .z = 0}; position c = (position){.x = cos(315*M_PI/180) * dst, .y = sin(315*M_PI/180) * dst, .z = 0};
printf("%f %f\n", a.x, a.y);
printf("%f %f\n", b.x, b.y);
printf("%f %f\n\n", c.x, c.y);
triangle* s_t = create_triangle(a, b, c); triangle* s_t = create_triangle(a, b, c);
return s_t; return s_t;
......
solid result solid result
facet normal -0.010000 -0.010000 0.010000 facet normal 0.000000 0.000000 0.022500
outer loop outer loop
vertex 0.000000 0.100000 0.100000 vertex -0.050000 0.100000 0.100000
vertex 0.000000 0.000000 0.000000 vertex -0.050000 -0.050000 0.100000
vertex 0.100000 0.000000 0.100000 vertex 0.100000 -0.050000 0.100000
endloop
endfacet
facet normal -0.010000 -0.010000 0.010000
outer loop
vertex 0.000000 0.100000 0.100000
vertex 0.100000 0.000000 0.100000
vertex 0.100000 0.100000 0.200000
endloop
endfacet
facet normal 0.000000 0.000000 0.000000
outer loop
vertex 0.100000 0.100000 0.200000
vertex 0.100000 0.000000 0.100000
vertex 0.150000 0.050000 0.100000
endloop
endfacet
facet normal 0.000000 0.000000 0.005000
outer loop
vertex 0.150000 0.050000 0.100000
vertex 0.100000 0.000000 0.100000
vertex 0.200000 0.000000 0.100000
endloop
endfacet
facet normal 0.000000 0.000000 0.000000
outer loop
vertex 0.100000 0.100000 0.200000
vertex 0.150000 0.050000 0.100000
vertex 0.250000 0.050000 0.200000
endloop
endfacet
facet normal -0.005000 -0.005000 0.005000
outer loop
vertex 0.150000 0.050000 0.100000
vertex 0.200000 0.000000 0.100000
vertex 0.250000 0.050000 0.200000
endloop endloop
endfacet endfacet
endsolid result endsolid result
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment