; Commonly used standard (Euclidean) geometric formulas ; Triangle area: triangle_area = base*height/2 ; See file "heron.in" for Heron's formula for the area of any triangle ; given all three side lengths. ; Rectangle of length "l" and width "w": rectangle_area = l*w rectangle_perimeter = 2*l + 2*w ; Trapezoid of parallel sides "a" and "b", and the "distance" between them: trapezoid_area = distance*(a + b)/2 ; Circle of radius "r": circle_area = pi*r^2 circle_perimeter = 2*pi*r ; Rectangular solid of length "l", width "w", and height "h": brick_volume = l*w*h brick_surface_area = 2*l*w + 2*l*h + 2*w*h ; Sphere of radius "r": sphere_volume = 4/3*pi*r^3 sphere_surface_area = 4*pi*r^2 ; Convex polygon with straight sides, sum of all interior angles formula: sum_degrees = (sides - 2)*180 sum_radians = (sides - 2)*pi ; "sides" is the number of sides.