How to draw a brick wall on Python in a Forb cycle
📁 python, ии
There is a library simple_DRAW for drawing simple graphic primitives. I can’t understand how to draw a cycle of vertical lines, more precisely, I get in each row one line with a shift.
Width = 100 height = 50 x = 0 y = 0 x_1 = 100 y_1 = 50 rows = ( 1 , 2 , 3 , 4 , 5 , 6 , 7 8 , 9 ,,,,, 10 , 11 , 12 ) x0 = 0 y0 = 0 x1 = 600 y1 = 0 x_v_0 = 0 y_v_0 = 0 x_v_1 = 0 y_v_1 = 50 for row in rows: y1 += 50 span> Start_point = sd.get_point ( 0 , y1) end_point = sd.get_point ( 600 , y1) sd.line (start_point = start_point, end_point = end_point, color = sd.color_orance, width = 6 ) row_v in range ( 6 ): x_v_0 += width y_v_0 += height x_v_1 += width y_v_1 += Height Start_Point1 = SD.GET_POINT (X_V_0, Y_V_0) END_POINT1 = SD.GET_POINT (X_V_1, Y_V_1) SD.LINE (Start_Point_PONT1, end_point = end_point1, color = sd.color_orange, width = 6 ) Pre>