Skip to main content
deleted 8 characters in body
Source Link
LegionMammal978
  • 18k
  • 4
  • 25
  • 57

Mathematica, 186 183183 164 bytes

Graphics[{Hue@#,Disk[{0,0},{1,1},a=2Pi{##}],Black,Text[ToString@Round[100(#2-#)]<>"%",FromPolarCoordinates@5Through@{5/4,Mod[Mean@a,2PiCos,-Pi]Sin}]@Mean@a/4]}&@@@Partition[Accumulate[#/Tr@#]~Prepend~0,2,1]]&

Could be golfed further. Currently generates a Graphics object. Test cases:



Mathematica, 186 183 bytes

Graphics[{Hue@#,Disk[{0,0},{1,1},a=2Pi{##}],Black,Text[ToString@Round[100(#2-#)]<>"%",FromPolarCoordinates@{5/4,Mod[Mean@a,2Pi,-Pi]}]}&@@@Partition[Accumulate[#/Tr@#]~Prepend~0,2,1]]&

Could be golfed further. Currently generates a Graphics object. Test cases:



Mathematica, 186 183 164 bytes

Graphics[{Hue@#,Disk[{0,0},{1,1},a=2Pi{##}],Black,Text[ToString@Round[100(#2-#)]<>"%",5Through@{Cos,Sin}@Mean@a/4]}&@@@Partition[Accumulate[#/Tr@#]~Prepend~0,2,1]]&

Could be golfed further. Currently generates a Graphics object. Test cases:



added 8 characters in body
Source Link
LegionMammal978
  • 18k
  • 4
  • 25
  • 57

Mathematica, 186186 183 bytes

Graphics[{Hue@#,Disk[{0,0},{1,1},a=2Pi{##}],Black,Text[ToString@Round[100 (#2 - #)]<>"%",FromPolarCoordinates@{5/4,Mod[Mean@a,2Pi,-Pi]}]}&@@@Partition[Accumulate[#/Tr@#]~Prepend~0,2,1]]&

Could be golfed further. Currently generates a Graphics object. Test cases:



Mathematica, 186 bytes

Graphics[{Hue@#,Disk[{0,0},{1,1},a=2Pi{##}],Black,Text[ToString@Round[100 (#2 - #)]<>"%",FromPolarCoordinates@{5/4,Mod[Mean@a,2Pi,-Pi]}]}&@@@Partition[Accumulate[#/Tr@#]~Prepend~0,2,1]]&

Could be golfed further. Currently generates a Graphics object. Test cases:



Mathematica, 186 183 bytes

Graphics[{Hue@#,Disk[{0,0},{1,1},a=2Pi{##}],Black,Text[ToString@Round[100(#2-#)]<>"%",FromPolarCoordinates@{5/4,Mod[Mean@a,2Pi,-Pi]}]}&@@@Partition[Accumulate[#/Tr@#]~Prepend~0,2,1]]&

Could be golfed further. Currently generates a Graphics object. Test cases:



Source Link
LegionMammal978
  • 18k
  • 4
  • 25
  • 57

Mathematica, 186 bytes

Graphics[{Hue@#,Disk[{0,0},{1,1},a=2Pi{##}],Black,Text[ToString@Round[100 (#2 - #)]<>"%",FromPolarCoordinates@{5/4,Mod[Mean@a,2Pi,-Pi]}]}&@@@Partition[Accumulate[#/Tr@#]~Prepend~0,2,1]]&

Could be golfed further. Currently generates a Graphics object. Test cases: