World Daylight Map

An ANSI art map of the world, colored to show the part of the world currently in daylight.

Author: Minion@M*U*S*H
Category: Other
Commands: @create, @lock, @set.
Compatibility: CobraMUSH, PennMUSH, RhostMUSH, TinyBit.

Instructions

Copy and paste the below code into a compatible MUSH or MUX.

MUSHCode for World Daylight Map

@create World Daylight Map
@lock World Daylight Map==me
&C World Daylight Map=
&DESCRIBE World Daylight Map=[setq(N,div(sub(secs(),946659600),86400))][setq(M,u(f`meansolaranomaly))][setq(C,u(f`equationofcenter))][setq(E,u(f`eclipticallongitude))][setq(D,u(f`declination))][setq(S,mod(secs(),86400))][null(iter(lnum(25),switch(%i0,0,pemit(%#,v(map`0)),24,pemit(%#,v(map`0)),pemit(%#,[setq(L,sub(90,mul(7.5,%i0)))][setq(N,u(f`solarnoon),A,u(f`secondsangle))][left(setr(V,v(map`%i0)),1)][foreach(f`colorize,mid(%qV,1,71))][right(%qV,1)]))))]
@set World Daylight Map/DESCRIBE=no_command visual prefixmatch public nearby
&F World Daylight Map=
&F`COLORIZE World Daylight Map=[setq(T,mod(add(%qS,44400,mul(%1,1200)),86400))][setq(H,if(lt(min(abs(sub(%qN,%qT)),abs(sub(%qT,%qN))),%qA),h))][switch(%0,~,ansi(%qhb,~),#,ansi(%qhg,#),ansi(%qh,%0))]
&F`DECLINATION World Daylight Map=mul(sin(%qE,d),0.3979486313076104)
&F`ECLIPTICALLONGITUDE World Daylight Map=mod(round(add(%qM,%qC,282.9372),0),360)
&F`EQUATIONOFCENTER World Daylight Map=add(mul(1.9148,sin(%qM,d)),mul(0.02,sin(mul(2,%qM),d)),mul(0.0003,sin(mul(3,%qM),d)))
&F`HOURANGLE World Daylight Map=acos(bound(fdiv(sub(-0.014485726138606464,mul(sin(%qL,d),sin(%qD))),mul(cos(%qL,d),cos(%qD))),-1,1))
&F`MEANSOLARANOMALY World Daylight Map=mod(round(add(357.5291,mul(0.98560028,%qN)),0),360)
&F`SECONDSANGLE World Daylight Map=trunc(mul(13751,abs(u(f`hourangle))))
&F`SOLARNOON World Daylight Map=round(add(43200,mul(457.92,sin(%qM,d)),mul(596.16,sin(mul(2,%qE),d))),0)
&MAP World Daylight Map=
&MAP`0 World Daylight Map=+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+
&MAP`1 World Daylight Map=|~~~~~~~~~~~.~_..::__:~~,-"-"._~~~~~~~~|7~~~~~~~,~~~~~_,.__~~~~~~~~~~~~~|
&MAP`10 World Daylight Map=|~~~~~~~~~~~~~~`._,~~~""~~~~~~~~~|###########\`'~~~\|~~~?_)~~{\~~~~~~~~~|
&MAP`11 World Daylight Map=|~~~~~~~~~~~~~~~~~`=.---.~~~~~~~~`._._#######,'~~~~~"`~~|'~,-~'.~~~~~~~~|
&MAP`12 World Daylight Map=+~~~~~~~~~~~~~~~~~~~|####`-._~~~~~~~~~|#####/~~~~~~~~~~`:`<_|h--._~~~~~~+
&MAP`13 World Daylight Map=|~~~~~~~~~~~~~~~~~~~(########>~~~~~~~~.#####|~,~~~~~~~~~~`=.__.`-'\~~~~~|
&MAP`14 World Daylight Map=|~~~~~~~~~~~~~~~~~~~~`.#####/~~~~~~~~~|#####|{|~~~~~~~~~~~~~~,-.,\~~~~~.|
&MAP`15 World Daylight Map=|~~~~~~~~~~~~~~~~~~~~~|###,'~~~~~~~~~~~\###/~`'~~~~~~~~~~~~,"#####\~~~~~|
&MAP`16 World Daylight Map=+~~~~~~~~~~~~~~~~~~~~~|##/~~~~~~~~~~~~~~|_'~~~~~~~~~~~~~~~~|##__##/~~~~~+
&MAP`17 World Daylight Map=|~~~~~~~~~~~~~~~~~~~~~|#|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~'-'~~`-'~~~\.|
&MAP`18 World Daylight Map=|~~~~~~~~~~~~~~~~~~~~~|/~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"~~~~/~|
&MAP`19 World Daylight Map=|~~~~~~~~~~~~~~~~~~~~~\.~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~'~~|
&MAP`2 World Daylight Map=|~~~_.___~_~_<_>`!(._`.`-.####/~~~~~~~~~_._~~~~~`_~,_/##'##'-._.---.-.__|
&MAP`20 World Daylight Map=+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+
&MAP`21 World Daylight Map=|~~~~~~~~~~~~~~~~~~~~~~,/~~~~~~~~~~~~______._.--._~_..---.---------._~~~|
&MAP`22 World Daylight Map=|~~~~~,-----"-..?----_/#)~~~~~~__,-'"#############"##################(~~|
&MAP`23 World Daylight Map=|-.._(##################`-----'#######################################`-|
&MAP`24 World Daylight Map=+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+
&MAP`3 World Daylight Map=|>.{#####"#"#`-==,',._\{~~\##/~{)~~~~~~/#_#">_,-'#`####################_|
&MAP`4 World Daylight Map=+~~\_.:--.#######`._~)`^-.~"'~~~~~~~,~[_/(#######################__,/-'~+
&MAP`5 World Daylight Map=|~'"'~~~~~\#########"####_L~~~~~~~~oD_,--'################)#####/.~(|~~~|
&MAP`6 World Daylight Map=|~~~~~~~~~~|###########,'~~~~~~~~~~_)_.\\._<>#6##############_,'~/~~'~~~|
&MAP`7 World Daylight Map=|~~~~~~~~~~`.#########/~~~~~~~~~~~[_/_'`~`"(################<'}~~)~~~~~~|
&MAP`8 World Daylight Map=+~~~~~~~~~~~\\####.-.#)~~~~~~~~~~~/###`-'"..'#`:._##########_)~~'~~~~~~~+
&MAP`9 World Daylight Map=|~~~~`~~~~~~~~\##(~~`(~~~~~~~~~~~/#########`:\##>~\##,-^.##/'~'~~~~~~~~~|

look World Daylight Map