article

MetaPost Code


def star(expr p, ang, r)= pair a, b, c, d, z; pair za, ab, bc, cd, dz; z=(r*(0, 1) rotated ang)shifted p; a=(r*(sind(72),cosd(72)) rotated ang) shifted p; b=(r*(sind(36),- cosd(36)) rotated ang)shifted p; c=(r*(- sind(36),- cosd(36)) rotated ang)shifted p; d=(r*(- sind(72),cosd(72)) rotated ang)shifted p; za = whateverd = whatever*; ab = whateverc = whatever*; bc = whateverc = whateverd; cd = whateverz = whatever*; dz = whateverd = whatever*; fill z -- za -- a -- ab -- b -- bc -- c -- cd -- d -- dz -- cycle withcolor red+green; enddef; u=1cm; fill (0, 2u) -- (6u, 2u) -- (6u, -2u) -- (0, -2u) --cycle withcolor red; t1=120.9637565; t2=98.1301235; t3=74.05460410; t4=51.34019175; star((u,u), 0, 6u/10); star((2u,8u/5), t1, u/5); star((12u/5,6u/5), t2, u/5); star((12u/5,3u/5), t3, u/5); star((2u,u/5), t4, u/5);

 

This article is licensed under the GNU Free Documentation License. It uses material from the "Image:Flag of the People's Republic of China.svg".

Home Pageartsbusinesscomputersgameshealthhospitalshomekids & teensnewsphysiciansrecreationreferenceregionalscienceshoppingsocietysportsworld