from math import pi, asin def fix_angle(a): return a * 2 * asin(1) / pi def get_infos(): import ti_graphics import ti_system screen_y0 = 30 def poly_draw_line(x1, y1, x2, y2, c): ti_graphics.setColor(c) ti_graphics.drawLine(x1, y1 + screen_y0, x2, y2 + screen_y0) def poly_fill_rect(x, y, w, h, c): ti_graphics.setColor(c) ti_graphics.fillRect(x, y + screen_y0, w, h) def poly_set_pixel(x, y, c): ti_graphics.setPixel(x, y + screen_y0, c) def poly_fill_ellipse(x, y, rx, ry, c): ti_graphics.setColor(c) ti_graphics.fillArc(x - rx, y - ry + screen_y0, 2 * rx, 2 * ry, 0, 3600) screen_w, screen_h, poly_show_pause = 320, 210, ti_system.disp_wait def poly_clean_screen(): poly_fill_rect(0, 0, screen_w, screen_h, (255, 255, 255)) return screen_w, screen_h, 1, poly_set_pixel, poly_draw_line, poly_fill_rect, poly_fill_ellipse, poly_clean_screen, poly_show_pause