File:Paradoxical decomposition F 2.svg

From testwiki
Jump to navigation Jump to search
    Original file (SVG file, nominally 679 × 679 pixels, file size: 308 KB)

    This file is from Wikimedia Commons and may be used by other projects. The description on its file description page there is shown below.

    Summary

    Description
    English: Illustration for the paradoxical decomposition used in the proof of the Banach–Tarski paradox.
    Date
    Source Paradoxical decomposition F2.svg
    Author Qef
    SVG development
    InfoField
     The SVG code is valid.
     This vector image was created with MetaPost.
    Source code
    InfoField

    PostScript code

    metapost-source
    Linethickness = 0.5pt;
     
    beginfig(1);
      recursion_depth := 6;
      const := 2.2;
     
      picture reds, blues, greens;
      blues := reds := greens := currentpicture;
     
      vardef orbitdots(expr iter, maxiter, xoffset, yoffset, lastg) =
       save offlen;
       offlen := 1.3in/(const**iter);
       if lastg = "":
            addto blues doublepath (xoffset, yoffset) withpen pencircle scaled 2bp withcolor blue;
         if iter <= maxiter:
            orbitdots(iter+1, maxiter, xoffset + offlen, yoffset, "a");
            orbitdots(iter+1, maxiter, xoffset - offlen, yoffset, "a-1"); 
            orbitdots(iter+1, maxiter, xoffset, yoffset + offlen, "b");
            orbitdots(iter+1, maxiter, xoffset, yoffset - offlen, "b-1");
         fi;
       fi;
       if lastg = "a":
            addto greens doublepath (xoffset, yoffset) withpen pencircle scaled 2bp withcolor 0.8green;
         if iter <= maxiter:
            orbitdots(iter+1, maxiter, xoffset + offlen, yoffset, "a");
            orbitdots(iter+1, maxiter, xoffset, yoffset + offlen, "b");
            orbitdots(iter+1, maxiter, xoffset, yoffset - offlen, "b-1");
         fi;
       fi;
       if lastg = "a-1":
            addto reds doublepath (xoffset, yoffset) withpen pencircle scaled 1.2bp withcolor red;
            addto blues doublepath (xoffset, yoffset) withpen pencircle scaled 2bp withcolor blue;
         if iter <= maxiter:
            orbitdots(iter+1, maxiter, xoffset, yoffset + offlen, "b"); 
            orbitdots(iter+1, maxiter, xoffset - offlen, yoffset, "a-1");
            orbitdots(iter+1, maxiter, xoffset, yoffset - offlen, "b-1");
         fi;
       fi;
       if lastg = "b":
            addto blues doublepath (xoffset, yoffset) withpen pencircle scaled 2bp withcolor blue;
         if iter <= maxiter:
            orbitdots(iter+1, maxiter, xoffset + offlen, yoffset, "a");
            orbitdots(iter+1, maxiter, xoffset, yoffset + offlen, "b"); 
            orbitdots(iter+1, maxiter, xoffset - offlen, yoffset, "a-1");
         fi;
       fi;
       if lastg = "b-1":
            addto blues doublepath (xoffset, yoffset) withpen pencircle scaled 2bp withcolor blue;
         if iter <= maxiter:
            orbitdots(iter+1, maxiter, xoffset + offlen, yoffset, "a");
            orbitdots(iter+1, maxiter, xoffset - offlen, yoffset, "a-1");
            orbitdots(iter+1, maxiter, xoffset, yoffset - offlen, "b-1");
         fi;
       fi;
      enddef;
     
      numeric length;
      length := 1.3in / (const**recursion_depth);
     
      pickup pencircle scaled Linethickness;
      picture p, q, r;
     
      for i = 1 upto recursion_depth - 2:
        draw (0,0) -- (length,0);
        draw (0,-length) -- (0,length);
     
        length := length * const;
     
        currentpicture := currentpicture shifted (length,0);
        p := currentpicture rotated 90;
        q := p yscaled -1;
     
        addto currentpicture also p;
        addto currentpicture also q;
      endfor;
     
      draw (0,0) -- (length,0);
      draw (0,-length) -- (0,length);
     
      length := length * const;
     
      currentpicture := currentpicture shifted (length,0);
      p := currentpicture rotated 90;
      q := p yscaled -1;
      r := currentpicture xscaled -1;
     
      addto currentpicture also p;
      addto currentpicture also q;
      addto currentpicture also r;
     
      draw (-length,0) -- (length,0);
      draw (0,-length) -- (0,length);
     
      dotlabel.urt(btex$e$etex, (0,0));
      dotlabel.ulft(btex$a$etex, (length,0));
      dotlabel.lrt(btex$b$etex, (0,length));
     
      label.top(btex$S(a^{-1})$etex, (-1.2length, 0.9length)) withcolor red;
     
      label.bot(btex$aS(a^{-1})$etex, (-1.3length,-0.9length)) withcolor blue;
    
      label.rt(btex$S(a)$etex, (1.1length,1.1length)) withcolor 0.8green;
     
      orbitdots(1, recursion_depth-2, 0, 0, "");
      addto currentpicture also greens;
      addto currentpicture also blues;
      addto currentpicture also reds;
      currentpicture := currentpicture shifted (10cm,10cm);
      currentpicture := currentpicture scaled 3.5;
    endfig;
    end;
    

    Data

    mptopdf fig.mp
    pdf2svg fig-1.pdf fig-1.svg
    

    Licensing

    w:en:Creative Commons
    attribution share alike
    This file is licensed under the Creative Commons Attribution-Share Alike 3.0 Unported license.
    You are free:
    • to share – to copy, distribute and transmit the work
    • to remix – to adapt the work
    Under the following conditions:
    • attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
    • share alike – If you remix, transform, or build upon the material, you must distribute your contributions under the same or compatible license as the original.

    Captions

    Add a one-line explanation of what this file represents

    Items portrayed in this file

    depicts

    2 November 2014

    315,023 byte

    image/svg+xml

    03b74852c32de9703ff672de12858736b6d4ba50

    File history

    Click on a date/time to view the file as it appeared at that time.

    Date/TimeThumbnailDimensionsUserComment
    current23:54, 4 October 2015Thumbnail for version as of 23:54, 4 October 2015679 × 679 (308 KB)wikimediacommons>DamlukAdd inverse labels

    There are no pages that use this file.