diff --git a/builds/fdf.o b/builds/fdf.o index 0811ef2..7a9949f 100644 Binary files a/builds/fdf.o and b/builds/fdf.o differ diff --git a/fdf b/fdf index b87f2d5..9a7e496 100755 Binary files a/fdf and b/fdf differ diff --git a/srcs/fdf.c b/srcs/fdf.c index 1e28fe4..551c33e 100644 --- a/srcs/fdf.c +++ b/srcs/fdf.c @@ -19,10 +19,6 @@ void draw_lines(t_fdf *fdf, int *start, int *end) int dz; int i; int j; - int slope_big; - int slope_small; - int pixel; - int z; if (end) { @@ -31,7 +27,7 @@ void draw_lines(t_fdf *fdf, int *start, int *end) //dz = end[2] - start[2]; i = 0; j = 0; - while (i < dx && j < dy) + while (i <= dx && j <= dy) { draw_color_pixel(fdf, start[0] + i, start[1] + j, start[2]); if (j < i * dy / dx) @@ -39,26 +35,10 @@ void draw_lines(t_fdf *fdf, int *start, int *end) else i++; } - /* - slope_big = ft_greater(ft_absolute(dx), ft_absolute(dy)); - slope_small = ft_smaller(ft_absolute(dx), ft_absolute(dy)); - i = 0; - while (++i <= slope_big) - { - pixel = slope_small / slope_big * i * ft_sign(dx); - z = start[3] + (dz / slope_big * i); - draw_color_pixel(fdf, start[0] + i, start[1] + pixel, z); - } - */ } (void)dx; (void)dy; (void)dz; - (void)slope_big; - (void)slope_small; - (void)i; - (void)pixel; - (void)z; } // point[0], point[1], point[2] -> new x, new y, new z