Skip to content

Commit

Permalink
print recommended wood sizes
Browse files Browse the repository at this point in the history
  • Loading branch information
fenrus75 committed Nov 23, 2019
1 parent 4eb9344 commit 054212b
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion triangle.c
Original file line number Diff line number Diff line change
Expand Up @@ -160,13 +160,21 @@ void print_triangle_stats(void)
{
double scale;
printf("Number of triangles in file : %i\n", current);
/*
printf("Span of the design : (%5.1f, %5.1f, %5.1f) - (%5.1f, %5.1f, %5.1f) \n",
minX, minY, minZ, maxX, maxY, maxZ);
*/
printf("Image size : %i x %i \n", image_X(), image_Y());

scale = 0.75 / maxZ;
printf("Recommended wood size : %5.2f\"x %5.2f\" x %5.2f\" \n",
printf("Recommended wood size 1 : %5.2f\"x %5.2f\" x %5.2f\" \n",
scale * maxX, scale * maxY, scale * maxZ);
scale = 1.0 / maxZ;
printf("Recommended wood size 2 : %5.2f\"x %5.2f\" x %5.2f\" \n",
scale * maxX, scale * maxY, scale * maxZ);

if (current > 10000)
printf("Large number of triangles, this may take some time\n");
}

static double point_to_the_left(double X, double Y, double AX, double AY, double BX, double BY)
Expand Down

0 comments on commit 054212b

Please sign in to comment.