Out There In 1974 a coded message was sent into space from the Arecibo radio telescope in Puerto Rico. The message consisted of 1,679 ones and zeros. If received, it was hoped that an alien intelligence would decode the message to see the special image hidden within. 1,679 is the product of two prime numbers: 23 and 79. By arranging the code into 79 rows of 23 bits (or pixels), a picture is revealed:

The 'Out There' application allows students to create their own 'Arecibo' designs and to decode the images constructed by others.

1

Decoding Data files created and read by the application are simple text files that can be opened by any text editor. For example, the Arecibo file looks like this:

By looking at the properties of a message file, we can see its actual length:

The 'Size' is shown as 1,679 bytes. (Note that each “1” and “0” is saved as an ASCII character, not as a true bit.)

2

A simple factorising utility is included with the application:

Use the 2 prime factors to create the correct frame size for the image...

… oops, that's not right. 3

BB4W - Factorising code: REM Prevent resize SYS "GetWindowLong", @hwnd%, -16 TO ws% SYS "SetWindowLong", @hwnd%, -16, ws% AND NOT &40000 AND NOT &10000 VDU 23,22,400;320;16,16,16,0:REM User-defined Mode COLOUR 143:CLS:COLOUR 0 *ESC OFF *FONT Arial,16 REPEAT INPUT "Number to factorise : "n PROCfactorise(n):PRINT UNTIL 0 END DEF PROCfactorise(n) LOCAL a a=2 WHILE n>1 WHILE (n MOD a)=0 n=n DIV a PRINT a ENDWHILE a+=1 ENDWHILE ENDPROC

4

BB4W – 'Out There' code: REM Prevent resize SYS "GetWindowLong", @hwnd%, -16 TO ws% SYS "SetWindowLong", @hwnd%, -16, ws% AND NOT &40000 AND NOT &10000 VDU 23,22,640;640;16,16,16,0:REM User-defined Mode OFF COLOUR 143:CLS:COLOUR 0 REM *ESC OFF *FONT Arial,16 click=FALSE ON MOUSE:click=TRUE:RETURN ON ERROR:PROCerror:END REM File handling DIM Of% 75,filetype% 40,Fn% 255 !Of%=76:Of%!4=@hwnd%:Of%!28=Fn%:Of%!32=256:Of%!52=6:Of%!12=filetype% $filetype%="Text files"+CHR$0+"*.txt"+CHR$0 MAXprime=17 DIM prime(MAXprime):PROCsieve iw=0:ih=0:REM Pointers to prime(), image dimensions ir=12:REM Pixel size file$="":REM Image file name image$="":REM Binary image "1"s and "0"s ORIGIN 640,640 status=0 REPEAT TIME=0 MOUSE mx,my,mb key$=INKEY$(0) CASE status OF REM Initial menu WHEN 0 : PROCmenu(0):file$="":image$="":status=1 REM Animate rectangle WHEN 1 : PROClimits:IF click AND mb>0 click=FALSE:status=2 REM Show initial options (load or design) WHEN 2 : PROCmenu(1):status=3 REM Choose option WHEN 3 IF key$="1" THEN PROCloadimage IF file$<>"" PROCmenu(2):PROCshowimage:status=4 ENDIF IF key$="2" PROCmenu(3):image$=STRING$(prime(iw)*prime(ih),"0"):status=5 REM Choose to update or restart 5

WHEN 4 IF key$="1" status=0 IF key$="2" PROCmenu(3):PROCshowimage:status=5 REM Designing/updating image WHEN 5 IF key$="1" status=0 IF key$="2" PROCsaveimage PROCmakepattern ENDCASE WAIT 4-TIME UNTIL 0 END DEF PROCmakepattern LOCAL c,x,y,px,py,pb IF mb=0 ENDPROC IF (mb AND 4)=4 c=1:GCOL 0,0 ELSE c=0:GCOL 0,15 ORIGIN 640-prime(iw)/2*ir,640-prime(ih)/2*ir MOUSE px,py,pb:REM Obtain mouse co-ordinates relative to new origin x=px DIV ir:y=py DIV ir IF x>=0 AND x=0 AND y"" n$=" ("+file$+")" ELSE n$="" CASE a OF WHEN 0 PROCcentre(0,-500,"Use the mouse to select an image size") WHEN 1 PROCcentre(0,-500,"1. Load an image") PROCcentre(0,-580,"2. Design an image") WHEN 2 PROCcentre(0,-500,"1. Restart") PROCcentre(0,-580,"2. Update"+n$+" design") WHEN 3 PROCcentre(0,-500,"1. Restart") PROCcentre(0,-580,"2. Save"+n$+" image") PROCcentre(0,580,"Create a design using the mouse") PROCcentre(0,500,"Left button to plot, right button to clear") ENDCASE ENDPROC

6

DEF PROCshowimage LOCAL x,y,a,over IF image$="" ENDPROC ORIGIN 640-prime(iw)/2*ir,640-prime(ih)/2*ir y=prime(ih)-1:over=FALSE:a=1 REPEAT x=0 REPEAT IF a>LEN(image$) over=TRUE:GCOL 0,6 ELSE GCOL 0,0 IF over OR MID$(image$,a,1)="1" RECTANGLEFILL x*ir,y*ir,ir x+=1:a+=1 UNTIL x>=prime(iw) y-=1 UNTIL y<0 ORIGIN 640,640 ENDPROC DEF PROCloadimage LOCAL R%,T%,X $Fn%=""+CHR$(0) SYS "GetOpenFileName",Of% TO R% T%=Fn%:WHILE ?T%<>0 T%+=1:ENDWHILE:?T%=13 IF R%=0 THEN ENDPROC IF INSTR($Fn%,".")=0 $Fn%+=".txt" file$=FNfilename X=OPENIN$Fn%:IF X=0 THEN ENDPROC image$="" REPEAT image$+=CHR$(BGET#X) UNTIL EOF#X CLOSE#X ENDPROC DEF PROCsaveimage LOCAL R%,T%,X,a $Fn%=file$+".txt"+CHR$(0) SYS "GetSaveFileName",Of% TO R% T%=Fn%:WHILE ?T%<>0 T%+=1:ENDWHILE:?T%=13 IF R%=0 THEN ENDPROC IF INSTR($Fn%,".")=0 $Fn%+=".txt" file$=FNfilename X=OPENOUT($Fn%) FOR a=1 TO LEN(image$) BPUT#X,ASC(MID$(image$,a,1)) NEXT CLOSE#X ENDPROC DEF FNfilename LOCAL i:i=LEN($Fn%) 7

WHILE MID$($Fn%,i,1)<>"\":i-=1:ENDWHILE =MID$($Fn%,i+1,LEN($Fn%)-i-4) REM Temp routine DEF PROCfill LOCAL x,y ORIGIN 640-prime(iw)/2*ir,640-prime(ih)/2*ir FOR y=0 TO prime(ih)-1 FOR x=0 TO prime(iw)-1 GCOL 0,RND(7)-1 RECTANGLEFILL x*ir,y*ir,ir NEXT NEXT ENDPROC REM Use mouse to select image dimensions DEF PROClimits LOCAL x,y,a,b x=ABS(mx DIV ir)*2 y=ABS(my DIV ir)*2 a=FNnearestprime(x) b=FNnearestprime(y) IF a<>iw OR b<>ih THEN PROCeor:iw=a:ih=b:PROCeor ENDIF ENDPROC REM Use EOR graphics to animate image bounds DEF PROCeor GCOL 3,3 RECTANGLE prime(iw)/2*ir,2+prime(ih)/2*ir,prime(iw)*-ir-2,prime(ih)*-ir-2 PRINTTAB(0,0);"Size: ";prime(iw);",";prime(ih);" " ENDPROC REM Find the nearest prime number to mouse x or y DEF FNnearestprime(n) LOCAL a,dist,p,d dist=9999:p=-1 FOR a=0 TO MAXprime d=ABS(prime(a)-n) IF d
r=INT(SQR(n)) a=2 WHILE okay AND a<=r IF (n MOD a)=0 okay=FALSE a+=1 ENDWHILE IF okay prime(aptr)=n:aptr+=1 n+=1 UNTIL aptr>MAXprime ENDPROC DEF PROCcentre(x,y,t$) LOCAL w,h:PROCstrpix(t$,w,h):VDU 5:MOVE x-w,y+h:PRINT t$:VDU 4 ENDPROC DEF PROCstrpix(T$,RETURN w,RETURN h) LOCAL size{}:DIM size{w%,h%} SYS "GetTextExtentPoint32",@memhdc%,T$,LEN(T$),size{} w=size.w%:h=size.h% ENDPROC DEF PROCerror CLS REPORT PRINT''"You've broken me." PRINT '"Type RUN and press ENTER, or close the window to quit." ENDPROC

9

Out There.pdf

Whoops! There was a problem loading more pages. Out There.pdf. Out There.pdf. Open. Extract. Open with. Sign In. Main menu. Displaying Out There.pdf.

636KB Sizes 3 Downloads 121 Views

Recommend Documents

Out Out Essay.pdf
Directions: Below you'll find the poem, “Out, Out—“ by American poet, Robert Frost, and the selection from. Macbeth that both inspired the poem and gave Frost ...

Davis Magnet Dine Out
Date: Wednesday, March 26, 2014. Time: 11:00 a.m. to 8:00 p.m.. Jerry's Wood-Fired Dogs,. 1510 Adams Ave. Suite B, Costa Mesa, CA 92626. Davis Magnet ...

DROP OUT
(19) United States. (12) Reissued Patent. Iazikov et a1. (10) Patent Number: (45) Date of Reissued Patent: USO0RE43226E. US RE43,226 E. Mar. 6, 2012 .... 2009-2014. Dec. 1993. Deri et al., “Quantitative Analysis of Integrated Optic Waveguide. Spect

FARH-OUT
Mini-FARH 2008 being hosted by Lynn. We hope you all have ... To remove yourself from our mailing list, email [email protected]. Questions or comments? E-mail us ... Service Program- “Relay for Life Fundraising” presented by Kathe

Try Out WOOP!
[ effective action ]. Hold it in your mind. Take a moment to really imagine it. Hold it in your mind. Take a moment to really imagine it. Name: Date:

Shout out examples.pdf
Sign in. Page. 1. /. 10. Loading… Page 1 of 10. Page 1 of 10. Page 2 of 10. VULKANEUM SCHOTTEN. PROJEKTFORTSCHRITT „MUSEOGRAFIE“. September 2014 Wettbewerbskonzept. Dezember 2014 / Januar 2015 Vorentwurf. Februar bis April 2015 Entwurf. Page 2

Flat-Out Love.pdf
Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. Flat-Out Love.pdf. Flat-Out Love.pdf. Open. Extract. Open with.

out of magic.pdf
Cell out cell phone fromcard joker. magic card tricks ... in the magic kingdomby cory doctorow reviews. Dollar bill ... improved magic motion remote cnet. New cco ...

Thinking out of the matchbox
Jul 7, 2006 - It's a disaster. This is a sector that is alive with design potential. Yet, from a design point of view, our housing fails on several counts. Here are a few to think about. First .... No matter how fast we crank the stuff out, the deman

Shout out examples.pdf
Blog : masjidillah.wordpress.com. Whoops! There was a problem loading this page. Retrying... Whoops! There was a problem previewing this document. Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. Shout o

out(2).pdf
using the “OpenEpi” version 2.2 software (Developer: ... using SPSS software- version 17 (Chicago, IL), and. Microsoft Excel ... Displaying out(2).pdf. Page 1 of 9.

Eat Out Night.pdf
There was a problem previewing this document. Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. Eat Out Night.

flat out repack.pdf
There was a problem loading more pages. flat out repack.pdf. flat out repack.pdf. Open. Extract. Open with. Sign In. Main menu. Displaying flat out repack.pdf.

Shake-Out-English.pdf
CalEMA's programs and responsibilities at www.calema.ca.gov. Page 2 of 2. Shake-Out-English.pdf. Shake-Out-English.pdf. Open. Extract. Open with. Sign In.

Shake-Out-English.pdf
... government agencies,. community groups, and other organizations are all invited to register. Register now at www.ShakeOut.org. California is earthquake ...

Thinking Out Loud.pdf
Page 1 of 2. Stand 02/ 2000 MULTITESTER I Seite 1. RANGE MAX/MIN VoltSensor HOLD. MM 1-3. V. V. OFF. Hz A. A. °C. °F. Hz. A. MAX. 10A. FUSED.

50-out-en.pdf
Monastery Latrun from Beginning. MachsomWatch by Led. March the to Contribute and Register 00:17 at. 00:20 Event Main. Page 1 of 1. Main menu. Displaying ...