Yin and yang: Difference between revisions
Content added Content deleted
m (→{{header|Delphi}}: Fix syntax highlighting) |
Underscore (talk | contribs) (Added Asymptote.) |
||
Line 3: | Line 3: | ||
Generate and display the symbol generated for two different (small) sizes. |
Generate and display the symbol generated for two different (small) sizes. |
||
=={{header|Asymptote}}== |
|||
<lang asymptote>unitsize(1 inch); |
|||
fill(scale(6)*unitsquare, invisible); |
|||
picture yinyang(pair center, real radius) { |
|||
picture p; |
|||
fill(p, unitcircle, white); |
|||
fill(p, arc(0, S, N) -- cycle, black); |
|||
fill(p, circle(N/2, 1/2), white); |
|||
fill(p, circle(S/2, 1/2), black); |
|||
fill(p, circle(N/2, 1/5), black); |
|||
fill(p, circle(S/2, 1/5), white); |
|||
draw(p, unitcircle, linewidth((1/32) * inch) + gray(0.5)); |
|||
return shift(center) * scale(radius) * p; |
|||
} |
|||
add(yinyang((1 + 1/4, 4 + 3/4), 1)); |
|||
add(yinyang((3 + 3/4, 2 + 1/4), 2));</lang> |
|||
=={{header|D}}== |
=={{header|D}}== |
||
Line 90: | Line 110: | ||
·###### |
·###### |
||
# </pre> |
# </pre> |
||
=={{header|Delphi}}== |
=={{header|Delphi}}== |