Draw the Olympic Games logo

  • Challenge


    Draw the Olympic Games logo...


    Olympic Games logo


    ...as character (e.g. ASCII) art!


    Sample Output


          * * *               * * *               * * *
    * * * * * *
    * * * * * *
    * * * * * * * *
    * * * * * * * * * *
    * * * * * * * * * *
    * * * * * * * * *
    * * * *
    * * * *
    * * * * * *

    Your art doesn't have to look exactly like mine, but it has to represent the Olympic rings well enough that it's recognizable.


    Rules



    • The program must write the art to the console.

    • Shortest code (in bytes, any language) wins.

    • A solution that prints rings in their respective colors (or a close representation) will be awarded a minus-twenty-point bonus.


    The winner will be chosen on February 23rd at the end of the 2014 Winter Olympics.




    Winners



    20 bonus points. Um, why would I want +20 to my score?

    @Quincunx I assume -20 was meant

    Hum, this is a trademark…

    @moala I think this falls under fair use policy.

    @NateKerkhofs ok, if you think that the IOC is ok to comply with solely the US copyright law, no problem for me.

    Be aware : http://registration.olympic.org/en/faq/detail/id/25 IOC are ùùùùù. Do not mess with them, they are really strict on the use of there logo

    AFAIK, countries willing to participate in the Olympic Games have to adjust their copyright law to the IOC ideas, not the other way round.

    Add a rule to include the (tm) mark also.

    I've changed the wording of the bonus rule to reflect that the "twenty-point bonus" is indeed **not** 20 points *added* to your score.

    To the trademark issue, I believe that this falls under nominative use, but the final decision resides with the purview of the administration and the lawyers.

    In color, it's evident that they are *interlocking* rings, not merely *overlapping*. Few of the entries so far have accounted for that.

    Totally IANAL: ok to write the sofware which draws the O******ic R**gs, not ok to execute it. :-)

    Surely as no money is being made, this is not illegal.

    Too bad it's ASCII. Would look great with Python+Turtle for example. ;_;

    How big a bonus is there for making the rings overlap in the correct way? Maybe 50? The only one I spotted doing this right was http://codegolf.stackexchange.com/a/19218/14680.

    er, **s/is there/should there be/**

    @SamB The challenge has already been up for a week, I'd rather keep the rules as they are in terms of bonuses.

  • marinus

    marinus Correct answer

    7 years ago

    APL (82) (-20 = 62)



    Edit: for a change, this program is simple enough that TryAPL will touch it, so you can run it there (just paste the line in).



    Not sure if I can claim the 'color' bit, I'm representing them all differently though.



    2/' ▓█░▓▒'[1+(13↑⍉n)⌈¯13↑⍉32↑¯26↑⌈1.1×11↓n←⍉c,0,2×c,0,2×c←(⍳2/10)∊⌈5+5×1 2∘○¨⍳1e4]


    The APL console doesn't support color, so I used shaded block characters (assigning any kind of other ASCII art would be as simple as replacing the characters at the beginning of the string.)



    They should look like unbroken circles (depending on your font.)



          2/' ▓█░▓▒'[1+(13↑⍉n)⌈¯13↑⍉32↑¯26↑⌈1.1×11↓n←⍉c,0,2×c,0,2×c←(⍳2/10)∊⌈5+5×1 2∘○¨⍳1e4]
    ▓▓▓▓▓▓▓▓▓▓▓▓ ████████████ ▓▓▓▓▓▓▓▓▓▓▓▓
    ▓▓ ▓▓ ██ ██ ▓▓ ▓▓
    ▓▓ ▓▓ ██ ██ ▓▓ ▓▓
    ▓▓ ░░░░░░░░░░░░ ▒▒▒▒▒▒▒▒▒▒▒▒ ▓▓
    ▓▓ ░░ ▓▓ ██ ░░ ▒▒ ██ ▓▓ ▒▒ ▓▓
    ▓▓ ░░ ▓▓ ██ ░░ ▒▒ ██ ▓▓ ▒▒ ▓▓
    ▓▓ ░░ ▓▓ ██ ░░ ▒▒ ██ ▓▓ ▒▒ ▓▓
    ▓▓ ░░ ▓▓ ██ ░░ ▒▒ ██ ▓▓ ▒▒ ▓▓
    ▓▓ ░░ ▓▓ ██ ░░ ▒▒ ██ ▓▓ ▒▒ ▓▓
    ▓▓▓▓▓▓░░▓▓▓▓ ██░░██▒▒████ ▓▓▒▒▓▓▓▓▓▓▓▓
    ░░ ░░ ▒▒ ▒▒
    ░░ ░░ ▒▒ ▒▒
    ░░░░░░░░░░░░ ▒▒▒▒▒▒▒▒▒▒▒▒


    Or:



          2/' bByRg'[1+(13↑⍉n)⌈¯13↑⍉32↑¯26↑⌈1.1×11↓n←⍉c,0,2×c,0,2×c←(⍳2/10)∊⌈5+5×1 2∘○¨⍳1e4]
    bbbbbbbbbbbb BBBBBBBBBBBB RRRRRRRRRRRR
    bb bb BB BB RR RR
    bb bb BB BB RR RR
    bb yyyyyyyyyyyy gggggggggggg RR
    bb yy bb BB yy gg BB RR gg RR
    bb yy bb BB yy gg BB RR gg RR
    bb yy bb BB yy gg BB RR gg RR
    bb yy bb BB yy gg BB RR gg RR
    bb yy bb BB yy gg BB RR gg RR
    bbbbbbyybbbb BByyBBggBBBB RRggRRRRRRRR
    yy yy gg gg
    yy yy gg gg
    yyyyyyyyyyyy gggggggggggg

License under CC-BY-SA with attribution


Content dated before 7/24/2021 11:53 AM