One well-known symbol of the philosophy of duality known as yin and yang is the taijitu.



Task

   Create a function that, given a parameter representing size, generates such a symbol scaled to the requested size.
   Generate and display the symbol for two different (small) sizes.


/* NetRexx */
 
options replace format comments java crossref savelog symbols binary
 
say "<?xml version='1.0' encoding='UTF-8' standalone='no'?>"
say "<!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN'"
say "  'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'>"
say "<svg xmlns='http://www.w3.org/2000/svg' version='1.1'"
say "  xmlns:xlink='http://www.w3.org/1999/xlink'"
say "  width='30' height='30'>"
say "  <defs><g id='y'>"
say "    <circle cx='0' cy='0' r='200' stroke='black'"
say "      fill='white' stroke-width='1'/>"
say "    <path d='M0 -200 A 200 200 0 0 0 0 200"
say "      100 100 0 0 0 0 0 100 100 0 0 1 0 -200"
say "      z' fill='black'/>"
say "    <circle cx='0' cy='100' r='33' fill='white'/>"
say "    <circle cx='0' cy='-100' r='33' fill='black'/>"
say "  </g></defs>"
 
say draw_yinyang(20, 0.05)
say draw_yinyang(8, 0.02)
 
say "</svg>"
 
return
 
method draw_yinyang(trans = int, scale = double) inheritable static returns String
  yy = String.format("  <use xlink:href='#y' transform='translate(%d,%d) scale(%g)'/>", -
       [Object Integer(trans), Integer(trans), Double(scale)])
  return yy