0xb034…3ff5

All memos sent from and to 0xb034…3ff5.

**Avalon is a series of generative maps to imaginary places.** Visually inspired by vintage textbooks and map collections, Avalon takes a purely aesthetical perspective on the land drop hype and the mythical realm that is the metaverse. The practice of mapping the imaginary reaches back to the middle ages and has been particularly popular in the renaissance era. It has always been used as tool to visualize allegories and manifest a sense of longing. In that sense, Avalon can be interpreted as a visualization of a machines wanderlust. The series is named after the place where, according to legend, King Arthur is buried. Avalon is referred to in literary sources as an island, valley or field. **Avalon is a dynamic collection.** Each map is positioned on a virtual globe and will go through 12.5 hour tidal cycles based on a virtual moon orbit. Maps will update every two minutes and to reflect the changing tides. Map labels show some basic information about each map. They include the map coordinates, maximum elevation and maximum sea depth, a topographic profile of the map and an indication of the current tidal level. **Avalon is interactive.** Collectors can interact with and customize their maps by using a series of commands that will change some of the basic visual traits of their maps. Maps can be downloaded both as high and low resolution images directly from the art blocks preview. **Basic commands:** ‘s’ - save image ‘i’ - toggle label on or off ‘m’ - switch between colored and monochrome versions ‘h’ - render high resolution image 'r' - refresh image in its original state **Please make sure the map is active by clicking it before you interact.** Avalon is limited to 208 mints, one for every sovereign state (based on [this list](https://en.wikipedia.org/wiki/List_of_sovereign_states))
**Avalon is a series of generative maps to imaginary places.** Visually inspired by vintage textbooks and map collections, Avalon takes a purely aesthetical perspective on the land drop hype and the mythical realm that is the metaverse. The practice of mapping the imaginary reaches back to the middle ages and has been particularly popular in the renaissance era. It has always been used as tool to visualize allegories and manifest a sense of longing. In that sense, Avalon can be interpreted as a visualization of a machines wanderlust. The series is named after the place where, according to legend, King Arthur is buried. Avalon is referred to in literary sources as an island, valley or field. **Avalon is a dynamic collection.** Each map is positioned on a virtual globe and will go through 12.5 hour tidal cycles based on a virtual moon orbit. Maps will update every two minutes and to reflect the changing tides. Map labels show some basic information about each map. They include the map coordinates, maximum elevation and maximum sea depth, a topographic profile of the map and an indication of the current tidal level. **Avalon is interactive.** Collectors can interact with and customize their maps by using a series of commands that will change some of the basic visual traits of their maps. Maps can be downloaded both as high and low resolution images directly from the art blocks preview. **Basic commands:** ‘s’ - save image ‘i’ - toggle label on or off ‘m’ - switch between colored and monochrome versions ‘h’ - render high resolution image 'r' - refresh image in its original state **Please make sure the map is active by clicking it before you interact.** Avalon is limited to 208 mints, one for ever sovereign state (based on [this list](https://en.wikipedia.org/wiki/List_of_sovereign_states))
p5.disableFriendlyErrors=!0;class Random{constructor(){this.useA=!1;let a=function(a){let b=parseInt(a.substr(0,8),16),c=parseInt(a.substr(8,8),16),d=parseInt(a.substr(16,8),16),e=parseInt(a.substr(24,8),16);return function(){d|=0;let a=((b|=0)+(c|=0)|0)+(e|=0)|0;return e=e+1|0,b=c^c>>>9,c=d+(d<<3)|0,d=d<<21|d>>>11,d=d+a|0,(a>>>0)/4294967296}};this.prngA=new a(tokenData.hash.substr(2,32)),this.prngB=new a(tokenData.hash.substr(34,32));for(let b=0;b<1e6;b+=2)this.prngA(),this.prngB()}random_dec(){return this.useA=!this.useA,this.useA?this.prngA():this.prngB()}random_num(a,b){return a+(b-a)*this.random_dec()}random_int(a,b){return Math.floor(this.random_num(a,b+1))}random_bool(a){return this.random_dec()<a}random_choice(a){return a[this.random_int(0,a.length-1)]}}const Seed=tokenData.hash;let rnd=new Random;const screenMode=window.innerWidth<=1*window.innerHeight?1:0,DEFAULT_SIZE=800,HEIGHT=Math.floor(screenMode?1.5*window.innerWidth:window.innerHeight),WIDTH=Math.floor(HEIGHT/1.5),DIM=Math.min(WIDTH,HEIGHT),M=DIM/800;function gauss(){for(var a=0,b=0;0===a;)a=rnd.random_dec();for(;0===b;)b=rnd.random_dec();return Math.sqrt(-2*Math.log(a))*Math.cos(2*Math.PI*b)}const W=160,H=240,N=W*H,F=rnd.random_num(.02,.05),steps=[0,1,W+1,W],path=[1,0,3,1,2,3],octaves=rnd.random_int(2,30);let persistance=rnd.random_num(.1,.6),lacunarity=rnd.random_num(.15,.8),nvalues=[],noiseMap=[],noiseMap2=[],noiseMapNorm=[],noiseMapNorm2=[],noiseMapNew=[],offx,offy,scale=rnd.random_num(.5,1.65),sealevel,lowtide=.58,hightide=.75,padding=50*M,linestyle=rnd.random_dec(),fillstyle=rnd.random_dec(),colorpicker=rnd.random_int(1,18),distance,arraystart=rnd.random_int(0,1e3),noiseoffset=rnd.random_int(0,5e3),level=rnd.random_num(sealevel+.1,.95),contouroff=rnd.random_num(.01,.035),highlights=rnd.random_dec(),gridsize=rnd.random_int(45,170)*M,gridstartx=rnd.random_int(0,gridsize),gridstarty=rnd.random_int(0,gridsize),grid=rnd.random_dec(),border=rnd.random_dec(),seadepth=rnd.random_dec(),ruler=rnd.random_dec(),colored=rnd.random_dec(),hasrivers=rnd.random_dec(),hasstreets=rnd.random_dec(),monochrome=rnd.random_dec(),contours=100,mountainlevel=rnd.random_num(sealevel+.15,.85),rivers=5,riverlength=120,gridpoints=[],gridvalues=[],landmass=[],rare=rnd.random_dec(),tortuga=0,typed="",col,ink=rnd.random_dec(),frame=rnd.random_dec(),bordersize=4*M,borderdistance=20*M,borderdistance2=22*M,outlines=rnd.random_dec(),nhigh,nlow,island=rnd.random_dec(),valley=rnd.random_dec(),noiseplus=rnd.random_num(-0.05,.12),latitude=rnd.random_num(-90,90),longitude=rnd.random_num(-180,180),lat,long,legend=rnd.random_dec(),terraincorrect=rnd.random_num(.4,1),colorstate,mintNumber=parseInt(tokenData.tokenId)%1e6,startTime=150493248e5,tidalCycle=894e5,highTide=447e5,currentTide,noiseMapFinal=[],xs=[],hintone=0,dragons=0,dragon=[],kidd,chest,dragonmap,binary=[],dawn,dusk,night,graphpadding,refreshing=0;const pairsArray=[];let label=1,run=0,bg,lin,sea,land,staincolor;function setup(){createCanvas(WIDTH,HEIGHT),colorMode(HSB),pixelDensity(2),noiseSeed(Seed),randomSeed(7469823750829584e9);for(var b=0;b<12;b++)dragon[b]=(b+1)*12;dragon.sort((a,b)=>a-b),dragon.includes(mintNumber)&&(dragonmap=1),binary[0]="01100001 01110010 01110010 01101111 01110111",binary[1]="01110100 01100101 01111000 01110100",binary[2]="01100001 01110101 01110100 01101000 01101111 01110010",binary[3]="01100010 01100001 01100100 01100111 01100101",binary[4]="01101110 01101111 01110011 01100101",binary[5]="01110100 01101001 01100011 01101011 01100101 01110100",binary[6]="01100010 01101111 01110010 01101001 01101110 01100111",binary[7]="01101001 01101110 01110011 01100101 01100011 01110100",binary[8]="01110000 01100001 01110010 01100101 01101110 01110100",binary[9]="01110000 01110010 01101001 01101110 01110100",binary[10]="0111011 10110000 10111001 101101000",binary[11]="0111001 10110010 10110000 101110100";let a=round(random(0,195));98==a&&(a+=1),dragon.includes(a)&&(a+=1),a==mintNumber&&(chest=1,island=1);let d=round(random(0,195));dragon.includes(d)&&(d+=1),mintNumber==d&&(tortuga=1,island=1),staincolor=color(0,0,0),distance=[];var e=new Date().getTime();let c=abs((e+startTime)%tidalCycle*(360/tidalCycle)-(longitude+180));c>180&&(c=180-(c-180)),sealevel=map(c,0,180,hightide,lowtide),level=rnd.random_num(sealevel+.1,.95),mountainlevel=rnd.random_num(sealevel+.15,.85),hour()>=19&&21>hour()?dawn=1:hour()>=5&&7>hour()?dusk=1:hour()>=21&&5>hour()?night=1:(dawn=0,night=0,dusk=0),offx=(width-2*padding)/W,offy=(height-2*padding)/H;let f=noiseMapper(island,valley);outlines>1&&(highlights=0,contours=2),nhigh=max(nvalues=f),nlow=min(nvalues),colorstate=colored,pickColors()}function draw(){if(1==refreshing?loop():translate(padding,padding),0==run){1==refreshing&&(translate(padding,padding),refreshing=0),noStroke();let f=0;for(var d=0;d<N;d++)nvalues[d]>sealevel&&(landmass[f]=d,f+=1);landmass.length>.7*N?outlines=0:landmass.length<.3*N&&(seadepth=1)}if(run<N-1){if(colored>.2){for(let a=run;a<W+run;a+=1){if(monochrome>1){if(nvalues[a]<sealevel){fill(lin),noStroke();for(let g=0;g<(1-nvalues[a])*(1-nvalues[a])*100*M;g++)ellipse(floor(a%W)*offx+2*gauss()*M,(a/W-1)*offy+2*gauss()*M,.7*M,.7*M)}else{fill(lin),noStroke();for(let h=0;h<(1-nvalues[a])*(1-nvalues[a])*(1-nvalues[a])*(1-nvalues[a])*800*M;h++)ellipse(floor(a%W)*offx+2*gauss()*M,(a/W-1)*offy+2*gauss()*M,1*M,1*M)}}else if(fillstyle>.8)nvalues[a]<sealevel?(fill(sea),sea.setAlpha(1),stroke(sea),strokeWeight((1-nvalues[a])*(1-nvalues[a])*3*M),line(floor(a%W)*offx,(a/W-1)*offy,a%W*offx+4*M,(a/W-1)*offy-4*M)):(stroke(land),strokeWeight(nvalues[a]*nvalues[a]*nvalues[a]*2*M),line(floor(a%W)*offx,(a/W-1)*offy,a%W*offx+4*M,(a/W-1)*offy-4*M));else if(fillstyle>.6){if(nvalues[a]<sealevel){fill(sea),stroke(bg),strokeWeight(.4*M),ellipse(floor(a%W)*offx,(a/W-1)*offy,.8*offx*M,.8*offy*M);for(let i=0;i<(1-nvalues[a])*(1-nvalues[a])*150*M;i++)ellipse(floor(a%W)*offx+2*gauss()*M,(a/W-1)*offy+2*gauss()*M,(1-nvalues[a])*M,(1-nvalues[a])*M)}else{fill(land),noStroke();for(let j=0;j<(1-nvalues[a])*(1-nvalues[a])*170*M;j++)ellipse(floor(a%W)*offx+2*gauss()*M,(a/W-1)*offy+7*gauss()*M,(1-nvalues[a])*1*M,(1-nvalues[a])*1*M)}}else if(fillstyle>.4){if(nvalues[a]<sealevel){sea.setAlpha(.02),fill(sea);for(let k=0;k<(1-nvalues[a])*(1-nvalues[a])*300*M;k++)ellipse(floor(a%W)*offx+(gauss()-1.5)*2*M,a/W*offy+(gauss()-.5)*2*M,(1-5*nvalues[a])*M,(1-5*nvalues[a])*M)}else{land.setAlpha(.02),fill(land),noStroke();for(let l=0;l<(1-nvalues[a])*(1-nvalues[a])*400*M;l++)ellipse(floor(a%W)*offx+(gauss()-1.5)*2*M,a/W*offy+(gauss()-.5)*2*M,(1-5*nvalues[a])*M,(1-5*nvalues[a])*M)}}else fillstyle>.2?nvalues[a]<sealevel?(fill(sea),stroke(bg),strokeWeight(.4*M),ellipse(floor(a%W)*offx,(a/W-1)*offy,nvalues[a]*offx*1,nvalues[a]*offy*1)):(fill(land),noStroke(),ellipse(floor(a%W)*offx,(a/W-1)*offy,(1-nvalues[a])*offx*1.1,(1-nvalues[a])*offy*1.1)):nvalues[a]<sealevel?(sea.setAlpha(nvalues[a]),stroke(sea),strokeWeight(1*M),line(floor(a%W-1)*offx,(a/W-1)*offy,floor(a%W-1)*offx+4*M,(a/W-1)*offy-4*M),noStroke()):(stroke(land),strokeWeight(1*M),line(floor(a%W-1)*offx,(a/W-1)*offy,floor(a%W-1)*offx+4*M,(a/W-1)*offy-4*M),noStroke());highlights>.75?nvalues[a]>level&&(fill(16,57,97),stroke(16,57,97),strokeWeight(1*M),line(floor(a%W-1)*offx,(a/W-1)*offy,floor(a%W-1)*offx+4*M,(a/W-1)*offy-4*M),noStroke()):highlights>.6&&nvalues[a]>level&&(fill(16,57,97),stroke(32,90,40),strokeWeight(1*M),line(floor(a%W-1)*offx,(a/W-1)*offy,floor(a%W-1)*offx+4*M,(a/W-1)*offy-4*M),noStroke())}run+=W}else run=N}if(run==N){if((c=new Contour(nvalues,contours,sealevel,contouroff)).display(),stroke(lin),noFill(),grid>.5){strokeWeight(.4*M);for(var b=0;b<(width-2*padding-gridstartx)/gridsize;b+=1)noFill(),line(gridstartx+b*gridsize,0,gridstartx+b*gridsize,height-2*padding);for(var c=0;c<(height-2*padding-gridstarty)/gridsize;c+=1)strokeWeight(.4*M),line(0,gridstarty+c*gridsize,width-2*padding,gridstarty+c*gridsize)}if(ruler>.7){noFill(),strokeWeight(1*M),line(0,-borderdistance2,width-2*padding,-borderdistance2),line(0,height-2*padding+borderdistance2,width-2*padding,height-2*padding+borderdistance2),line(-borderdistance2,0,-borderdistance2,height-2*padding),line(width-2*padding+borderdistance2,0,width-2*padding+borderdistance2,height-2*padding);for(var b=0;b<(width-2*padding-gridstartx)/gridsize;b+=1)line(gridstartx+b*gridsize,-borderdistance2,gridstartx+b*gridsize,-borderdistance2+bordersize),line(gridstartx+b*gridsize,height-2*padding+borderdistance2,gridstartx+b*gridsize,height-2*padding+borderdistance2-bordersize);for(var c=0;c<(height-2*padding-gridstarty)/gridsize;c+=1)line(-borderdistance2,gridstarty+c*gridsize,-borderdistance2+bordersize,gridstarty+c*gridsize),line(width-2*padding+borderdistance2,gridstarty+c*gridsize,width-2*padding+borderdistance2-bordersize,gridstarty+c*gridsize)}else if(ruler>.4){noFill(),strokeWeight(2*M),rect(0,-bordersize-borderdistance,gridstartx,bordersize),rect(0,height-2*padding+borderdistance,gridstartx,bordersize),rect(-bordersize-borderdistance,0,bordersize,gridstarty),rect(width-2*padding+borderdistance,0,bordersize,gridstarty);for(var b=0;b<(width-2*padding-gridstartx)/gridsize-1;b+=1)fill(lin),b%2!=0&&noFill(),rect(gridstartx+b*gridsize,-bordersize-borderdistance,gridsize,bordersize),rect(gridstartx+b*gridsize,height-2*padding+borderdistance,gridsize,bordersize),b>(width-2*padding-gridstartx)/gridsize-2&&((b-1)%2==0?fill(lin):noFill(),rect(gridstartx+(b+1)*gridsize,-bordersize-borderdistance,width-2*padding-(gridstartx+(b+1)*gridsize),bordersize),rect(gridstartx+(b+1)*gridsize,height-2*padding+borderdistance,width-2*padding-(gridstartx+(b+1)*gridsize),bordersize)),noFill();for(var c=0;c<(height-2*padding-gridstarty)/gridsize-1;c+=1)fill(lin),c%2!=0&&noFill(),rect(-bordersize-borderdistance,gridstarty+c*gridsize,bordersize,gridsize),rect(width-2*padding+borderdistance,gridstarty+c*gridsize,bordersize,gridsize),c==floor((height-2*padding-gridstarty)/gridsize-1)&&((c-1)%2==0?fill(lin):noFill(),rect(-bordersize-borderdistance,gridstarty+(c+1)*gridsize,bordersize,height-2*padding-(gridstarty+(c+1)*gridsize)),rect(width-2*padding+borderdistance,gridstarty+(c+1)*gridsize,bordersize,height-2*padding-(gridstarty+(c+1)*gridsize))),noFill()}if(frame>.3&&(strokeWeight(1.5*M),rect(-padding+7*M,-padding+7*M,width-14*M,height-14*M),strokeWeight(.8*M),rect(-padding+10*M,-padding+10*M,width-20*M,height-20*M)),border>.5&&(strokeWeight(2*M),rect(0,0,width-2*padding,height-2*padding)),run+=1,1==dragons){for(var e=0;e<12;e++)mintNumber==dragon[e]&&(binCode=binary[e]);lin.setAlpha(.8),fill(lin),noStroke(),textSize(960*M),textSize(210*M),textSize(60*M),textAlign(LEFT,TOP),textFont("Helvetica"),textStyle(BOLD),textAlign(CENTER,TOP),sealevel>=.62?text("HERE BE DRAGONS",350*M,525*M):(textAlign(CENTER,TOP),textSize(25*M),text(binCode,350*M,535*M))}else 2==dragons?(lin.setAlpha(.7),fill(lin),noStroke(),textSize(960*M),textSize(210*M),textSize(65*M),textAlign(LEFT,TOP),textFont("Helvetica"),textStyle(BOLD),textAlign(CENTER,TOP),text("FOLLOW THE KIDD",350*M,525*M),textAlign(LEFT,TOP)):3==dragons?(lin.setAlpha(.7),fill(lin),noStroke(),textSize(120*M),textAlign(LEFT,TOP),textFont("Helvetica"),textStyle(BOLD),text("307837443",45*M,10*M),text("243303937",45*M,115*M),text("463933323",45*M,220*M),text("636434335",45*M,325*M),text("666136624",45*M,430*M),text("261303637",45*M,535*M),text("423836344",45*M,640*M),text("162353566",45*M,745*M),text("334338376",45*M,850*M),text("132",45*M,955*M),textAlign(LEFT,TOP)):4==dragons?(lin.setAlpha(.85),fill(lin),noStroke(),textSize(960*M),textSize(210*M),textSize(65*M),textAlign(LEFT,TOP),textFont("Helvetica"),textStyle(BOLD),textAlign(CENTER,TOP),text("HOW MANY COINS",350*M,445*M),text("DOES THE CAPTAIN",350*M,525*M),text("KEEP?",350*M,605*M),textAlign(LEFT,TOP)):5==dragons?(lin.setAlpha(.85),fill(lin),noStroke(),textSize(960*M),textSize(210*M),textSize(65*M),textAlign(LEFT,TOP),textFont("Helvetica"),textStyle(BOLD),textAlign(CENTER,TOP),text("DRAGONS REVEAL",350*M,445*M),text("THEIR SECRETS",350*M,525*M),text("AT LOW TIDE",350*M,605*M),textAlign(LEFT,TOP)):6==dragons&&(lin.setAlpha(.85),fill(lin),noStroke(),textSize(960*M),textSize(210*M),textSize(65*M),textAlign(LEFT,TOP),textFont("Helvetica"),textStyle(BOLD),textAlign(CENTER,TOP),text("X MARKS THE SPOT",350*M,525*M),textAlign(LEFT,TOP))}run>N&&(1==label&&heightProfile(),noLoop(),setTimeout(function(){label=1,colored=colorstate,dragons=0,col=3,1==tortuga&&(colored=1,island=1),1==chest&&(island=1),refresh()},12e4))}class Contour{constructor(a,b,c,d){this.nvals=a,this.start=c,this.num=b,this.off=d}display(){for(let a=0;a<this.num;a++){let c=this.start+a*this.off,d=this.contour(c),e=0;strokeWeight((e=a%100==0?2:a%5==0?1.5:1.1)*M),stroke(lin),fill(0),beginShape(),d.forEach(function([b,c],d){if(a%5==3){if(d%2==0){if(ink>.8)strokeWeight(noise(.05*b.x,.05*b.y)*e*1.5*scale*M),line(b.x,b.y,c.x,c.y),lin.setAlpha(.15),stroke(lin),strokeWeight(noise(.05*b.x,.05*b.y)*e*4*scale*M),line(b.x,b.y,c.x,c.y),lin.setAlpha(.08),stroke(lin),strokeWeight(noise(.05*b.x,.05*b.y)*e*3*scale*gauss()*M),line(b.x,b.y,c.x,c.y),lin.setAlpha(1),stroke(lin);else if(ink>.5){let f=noise(.05*b.x,.05*b.y)*e*2.2*scale*M;strokeWeight(f-(.18*M+.1*gauss()*e*2*scale*M)),line(b.x,b.y,c.x,c.y)}else linestyle>.5?line(b.x,b.y,c.x,c.y):(noStroke(),fill(lin),ellipse(b.x,b.y,e*M,e*M),ellipse(c.x,c.y,e*M,e*M))}}else if(ink>.8)strokeWeight(noise(.05*b.x,.05*b.y)*e*1.5*scale*M),line(b.x,b.y,c.x,c.y),lin.setAlpha(.15),stroke(lin),strokeWeight(noise(.05*b.x,.05*b.y)*e*4*scale*M),line(b.x,b.y,c.x,c.y),lin.setAlpha(.08),stroke(lin),strokeWeight(noise(.05*b.x,.05*b.y)*e*3*scale*gauss()*M),line(b.x,b.y,c.x,c.y),lin.setAlpha(1),stroke(lin);else if(ink>.5){let g=noise(.05*b.x,.05*b.y)*e*2.2*scale*M;strokeWeight(g-(.18*M+.1*gauss()*e*2*scale*M)),line(b.x,b.y,c.x,c.y)}else linestyle>.5?line(b.x,b.y,c.x,c.y):(noStroke(),fill(lin),ellipse(b.x,b.y,e*M,e*M),ellipse(c.x,c.y,e*M,e*M))}),endShape()}if(seadepth>.7)for(let b=0;b<this.num;b++){let f=this.start-b*this.off,g=this.contour(f),h=0;strokeWeight((h=1.1)*M),lin.setAlpha(.7),stroke(lin),fill(0),beginShape(),g.forEach(function([a,c],d){b%5==3?d%2==0&&(linestyle>1?(strokeWeight((h=1*M)*M),line(a.x,a.y,c.x,c.y)):(noStroke(),fill(lin),ellipse(a.x,a.y,h*M,h*M))):linestyle>1?(strokeWeight((h=1)*M),lin.setAlpha(.7),stroke(lin),line(a.x,a.y,c.x,c.y)):(noStroke(),fill(lin),ellipse(a.x,a.y,h*M,h*M))}),endShape()}}contour(a){let e=[];for(let c=0;c<N;c++){if(c%W==W-1||floor(c/W)===H-1)continue;let[f,g]=[[],[]];for(let n of steps){let l=c+n;f.push(l),g.push(this.nvals[l])}let b=[];if(a>Math.min(...g)&&a<Math.max(...g))for(let[o,p]of pairs(path)){let[h,i]=[f[o],f[p]],[j,k]=[this.nvals[h],this.nvals[i]];if(a>j&&a<k||a>k&&a<j){let m=createVector(h%W*offx,floor(h/W)*offy),q=createVector(i%W*offx,floor(i/W)*offy),r=p5.Vector.sub(q,m).mult(norm(a,j,k)).add(m);b.push(r)}}if(b.length>0&&b.length%2==0){for(let d=0;d<b.length;d+=2)e.push([b[d],b[d+1]]);continue}for(let s of pairs(b))e.push(s)}return e}}function noiseMapper(e,f){scale<=0&&(scale=1e-4);for(let c=0;c<N;c++){let g=0;amplitude=1,frequency=1;for(let h=0;h<octaves;h++){let k=c%W/scale*frequency,l=floor(c/W)/scale*frequency,m=noise((k+noiseoffset)*F,(l+noiseoffset)*F);g+=m*amplitude,amplitude*=persistance,frequency*=lacunarity}noiseMap[c]=g}let n=max(noiseMap);for(let a=0;a<N;a++)if(noiseMapNorm[a]=map(noiseMap[a],0,n,-noiseplus,1+noiseplus),e>.55){let o=floor(a%W)*offx,p=floor(a/W)*offy,d=dist(o,p,400*M-padding,600*M-padding),b=map(d,0,width/2,.25,-0.25);e>.85?noiseMapNorm[a]+=b*terraincorrect:e>.7?noiseMapNorm[a]-=b*terraincorrect:(b=map(d,0,width/2.5,.25,0),noiseMapNorm[a]+=b*terraincorrect*3,d<width/3&&(b=map(d,0,width/3,.3,0),noiseMapNorm[a]-=b*terraincorrect*4))}else if(f>.7){let q=floor(a%W)*offx,i=floor(a/W)*offy,r=dist(q,i,400*M-padding,i),j=map(r,0,width/2,.2,-0.2);f>.85?noiseMapNorm[a]+=j*terraincorrect:noiseMapNorm[a]-=j*terraincorrect}return noiseMapNorm.length,noiseMapNorm}function areas(b){for(let a=0;a<N;a++)nvalues[a]>.6&&(fill(16,57,97),noStroke(),ellipse(floor(a%W)*offx,(a/W-1)*offy,offx,offy))}function drawHill(a){strokeWeight(2),noFill(),stroke(lin);let b=map(nvalues[a],mountainlevel,1,5,50);beginShape(),curveVertex(floor(a%W-1)*offx-b/2+(.2*gauss()-.5),(a/W-1)*offy+(.2*gauss()-.5)),curveVertex(floor(a%W-1)*offx-b/8*3+(.2*gauss()-.5),(a/W-1)*offy-b/8*3+(.2*gauss()-.5)),curveVertex(floor(a%W-1)*offx+(.2*gauss()-.5),(a/W-1)*offy-.7*b+(.2*gauss()-.5)),curveVertex(floor(a%W-1)*offx+b/8*3+(.2*gauss()-.5),(a/W-1)*offy-b/8*3+(.2*gauss()-.5)),curveVertex(floor(a%W-1)*offx+b/2+(.2*gauss()-.5),(a/W-1)*offy+(.2*gauss()-.5)),endShape()}function xmarksthespot(){let b=1;for(var c=0;c<N;c++)if(1==b){let a=rnd.random_int(0,N);nvalues[a]>sealevel&&nvalues[a]<mountainlevel&&(drawx(a),b=0)}}function drawx(a){stroke(10,100,80),strokeWeight(5),line(floor(a%W-1)*offx-5,(a/W-1)*offy+5,floor(a%W-1)*offx+5,(a/W-1)*offy-5),line(floor(a%W-1)*offx+5,(a/W-1)*offy+5,floor(a%W-1)*offx-5,(a/W-1)*offy-5)}function findland(){let b=0;for(var a=0;a<N;a++)nvalues[a]>sealevel&&(landmass[b]=a,b+=1)}function heightProfile(){stroke(lin),strokeWeight(1.8*M),fill(bg);let e=30*M,h=width/2-padding-2*e-100*M,a=110*M-2*e,f=(h-160*M)/40;if(translate(30*M,height-2*padding-120*M),noStroke(),fill(bg),rect(5*M,5*M,width-2*padding-70*M,95*M),stroke(lin),strokeWeight(1*M),rect(10*M,10*M,width-2*padding-80*M,85*M),translate(e,e),strokeWeight(1*M),noStroke(),lin.setAlpha(1),fill(lin),0==hintone){if(1==dragons){for(var b=0;b<12;b++)mintNumber==dragon[b]&&(binCode=binary[b]);textSize(20*M),textAlign(LEFT,TOP),textFont("Helvetica"),textStyle(BOLD),text("HERE BE DRAGONS",0*M,3*M),noStroke(),fill(lin),textStyle(ITALIC),textFont("Helvetica"),textSize(11*M),sealevel<.62&&text(binCode,0*M,33*M)}else{textSize(20*M),textAlign(LEFT,TOP),textFont("Helvetica"),textStyle(BOLD),text("AVALON",0*M,3*M),noStroke(),fill(lin),textStyle(ITALIC),textFont("Helvetica"),textSize(14*M),text("No. "+mintNumber,0*M,29*M),textStyle(NORMAL);let i=2e3/nhigh*M,n=floor((nhigh-sealevel)*i),o=floor(-(sealevel-nlow)*i);long=longitude>=0?abs(floor(longitude))+"\xb0 "+round((longitude-floor(longitude))*60)+"` E":abs(floor(longitude))+"\xb0 "+round((longitude-floor(longitude))*60)+"` W",lat=latitude>0?abs(floor(latitude))+"\xb0 "+round((latitude-floor(latitude))*60)+"` N":abs(floor(latitude))+"\xb0 "+round((latitude-floor(latitude))*60)+"` S",1==chest&&(long="72\xb0 6\u2032 W",lat="41\xb0 6\u2032 N"),1==tortuga&&(long="72\xb0 47\u2032 W",lat="20\xb0 2\u2032 N"),textAlign(LEFT,TOP),textFont("Helvetica"),textSize(10*M),text("LAT: "+lat,115*M,8*M),text("LONG: "+long,115*M,28*M),text("ELEVATION: "+n+"m",220*M,8*M),text("DEPTH: "+o+"m",220*M,28*M),stroke(lin),strokeWeight(1*M),line(566*M,0*M,566*M,a-5*M),line(563*M,0*M,569*M,0*M),line(563*M,a-5*M,569*M,a-5*M);let c=map(sealevel,.58,.75,a-10*M,0);noStroke(),fill(lin),beginShape(),vertex(566*M,c),vertex(572*M,c-2*M*M),vertex(572*M,c+2*M),vertex(566*M,c),vertex(560*M,c-2*M),vertex(560*M,c+2*M),vertex(566*M,c),endShape(),translate(343*M,-118*M);for(var b=0;b<40;b++){noStroke(),lin.setAlpha(1),fill(lin);let p=floor(b*(W/(g+1))),j=map(nvalues[H/2*W+p],nlow,nhigh,0,1)*a*M;rect(b*(f+2),a-j,f,j)}noFill(),stroke(lin),strokeWeight(2*M),beginShape();for(var d=0;d<40;d++){let q=floor(d*(W/(b+1))),k=map(nvalues[H/2*W+q],nlow,nhigh,0,1)*a;curveVertex(d*(f+4*M),a-k+110*M),(0==d||39==d)&&curveVertex(d*(f+4*M),a-k+110*M)}endShape();for(var g=0;g<40;g++){let r=floor(g*(W/(b+1))),l=map(nvalues[H/2*W+r],nlow,nhigh,0,1)*a;noStroke(),lin.setAlpha(.7),fill(lin),rect(g*(f+4*M)+2*M,a-l+110*M,f,l),noFill()}sea.setAlpha(1),stroke(lin),strokeWeight(1*M);let m=map(sealevel,nlow,nhigh,0,1)*a;line(0,a-m+110*M,h,a-m+110*M)}}else textSize(20*M),textAlign(CENTER,TOP),textFont("Helvetica"),textStyle(BOLD),text("HIC SUNT DRAGONES",width/2-padding-2*e,3*M),noStroke(),fill(lin),textStyle(ITALIC),textFont("Helvetica"),textSize(10*M),textAlign(CENTER,TOP),text("307839376638463739356245374535333942343835633436623432366436443263613145393465653863",width/2-padding-2*e,35*M)}function pairs(e,f=pair){let a=[],b,c=!1;for(let d of e)c&&a.push(f(b,d)),b=d,c=!0;return a}function pair(a,b){return[a,b]}function refresh(){clear(),typed="";var b=new Date().getTime();let a=abs((b+startTime)%tidalCycle*(360/tidalCycle)-(longitude+180));a>180&&(a=180-(a-180)),sealevel=map(a,0,180,hightide,lowtide),translate(-373*M,-height-2*padding-120*M+118*M),translate(-graphpadding,-graphpadding),run=0,refreshing=1,hour()>=19&&21>hour()?dawn=1:hour()>=5&&7>hour()?dusk=1:hour()>=21&&5>hour()?night=1:(dawn=0,night=0,dusk=0),pickColors()}function hint1(){col=1,colored=0,dragons=1,label=0,refresh()}function pickColors(){1==colorpicker?(bg=color(0,0,90),lin=color(0,0,20),sea=color(240,60,100),land=color(120,95,55)):2==colorpicker?(bg=color(8,4,86),lin=color(222,90,50),sea=color(188,56,50),land=color(121,50,65)):3==colorpicker?(bg=color(37,5,100),lin=color(4,52,55),sea=color(198,41,92),land=color(24,62,62)):4==colorpicker?(bg=color(49,20,94),lin=color(7,80,20),sea=color(164,60,31),land=color(76,80,45)):5==colorpicker?(bg=color(20,8,97),lin=color(213,65,43),sea=color(197,100,57),land=color(42,100,93)):6==colorpicker?(bg=color(51,5,98),lin=color(190,50,9),sea=color(177,100,27),land=color(16,57,97)):7==colorpicker?(bg=color(80,5,95),lin=color(180,40,30),sea=color(229,32,70),land=color(360,84,77)):8==colorpicker?(bg=color(58,22,90),lin=color(32,90,55),sea=color(161,96,28),land=color(153,100,51)):9==colorpicker?(bg=color(162,20,90),lin=color(124,17,45),sea=color(206,63,54),land=color(348,20,50)):10==colorpicker?(bg=color(37,18,76),lin=color(81,25,30),sea=color(158,29,56),land=color(347,40,50)):11==colorpicker?(bg=color(43,18,98),lin=color(74,18,30),sea=color(67,15,50),land=color(30,46,83)):12==colorpicker?(bg=color(51,22,92),lin=color(201,100,29),sea=color(31,100,97),land=color(40,71,99)):13==colorpicker?(bg=color(47,20,92),lin=color(5,76,50),sea=color(217,65,58),land=color(168,99,50),highlights=0):14==colorpicker?(bg=color(26,3,98),lin=color(160,30,25),sea=color(8,39,91),land=color(297,21,41)):15==colorpicker?(bg=color(190,22,80),lin=color(343,21,33),sea=color(180,13,96),land=color(193,11,62)):16==colorpicker?(bg=color(14,3,100),lin=color(213,96,45),sea=color(300,2,45),land=color(62,31,95)):17==colorpicker?(bg=color(42,33,88),lin=color(144,9,42),sea=color(349,53,55),land=color(8,61,75)):18==colorpicker?(bg=color(0,0,92),lin=color(24,80,50),sea=color(211,65,65),land=color(0,0,75)):19==colorpicker&&rare>.7?(bg=color(40,8,15),lin=color(46,5,100),sea=color(34,11,25),land=color(38,9,80)):(bg=color(0,0,92),lin=color(24,80,50),sea=color(211,65,65),land=color(0,0,75)),1==tortuga&&(bg=color(260,25,5),lin=color(340,1,94),sea=color(183,88,24),land=color(260,25,5),colored=1,island=1),1==chest&&(island=1),2==dragons||3==dragons?(bg=color(0,0,100),lin=color(0,0,0),sea=color(0,0,0),land=color(0,0,0),colored=0):1==dragons&&(bg=color(0,0,0),lin=color(0,0,100),sea=color(0,0,0),land=color(0,0,0),colored=0),background(bg),1==refreshing&&translate(padding,padding),draw()}function keyTyped(){"clue?"===(typed+=key)&&(1==tortuga&&(clear(),dragons=4,label=0,refresh()),98==mintNumber&&(clear(),colored=0,dragons=2,label=0,refresh()),1==dragonmap&&(clear(),dragons=5,label=0,refresh()),1==chest&&(clear(),dragons=6,label=0,refresh())),"13"===typed&&1==dragonmap&&(clear(),background(0,0,0),hint1()),"s"===key&&(save(Seed+".jpg"),typed=""),"i"===key&&(0==label?(label=1,heightProfile()):(label=0,refresh())),"r"===key&&(pixelDensity(3),label=1,colored=colorstate,dragons=0,col=3,1==tortuga&&(colored=1,island=1),refresh()),"h"===key&&(pixelDensity(10),refresh()),"m"===key&&(colored=colored>.2?0:1,refresh()),"x"===key&&1==chest&&(clear(),colored=0,dragons=3,label=0,refresh())}