Jump to content

Photo

Optical illusions

XB

59 replies to this topic

#51 sometimes99er OFFLINE  

sometimes99er

    River Patroller

  • Topic Starter
  • 4,067 posts
  • Location:Denmark

Posted Tue Oct 31, 2017 1:42 AM

Two rectangular prongs at the top transform into three cylindrical prongs.
 

100 call clear::call char(48,"01020408102040808040201008040201808080808080808080C0A09088848281")
110 call char(52,"814224181020408003020408F",54,"E01008040402020201020408081010101008080403")
120 for l=5 to 19::read c,s$::display at(l,c):s$; ::next l::for l=0 to 9^9::next l
130 data 17,01,16,0  1,15,0 03 1,14,0 0 21 1,13,0 0 010 02,12,0 0 0 0 0 2,11,0 0 0 0 0 0,10
140 data 0 0 0 0 0 0,9,0 0 0 0 0 0,8,760 0 0 0 0,8,85 0 0 0 0,10,760 0 0,10,85 0 0,12,760,12,85
run




#52 digdugnate OFFLINE  

digdugnate

    Dragonstomper

  • 928 posts
  • Location:SW Missouri

Posted Tue Oct 31, 2017 2:56 AM

 

Two rectangular prongs at the top transform into three cylindrical prongs.
 

100 call clear::call char(48,"01020408102040808040201008040201808080808080808080C0A09088848281")
110 call char(52,"814224181020408003020408F",54,"E01008040402020201020408081010101008080403")
120 for l=5 to 19::read c,s$::display at(l,c):s$; ::next l::for l=0 to 9^9::next l
130 data 17,01,16,0  1,15,0 03 1,14,0 0 21 1,13,0 0 010 02,12,0 0 0 0 0 2,11,0 0 0 0 0 0,10
140 data 0 0 0 0 0 0,9,0 0 0 0 0 0,8,760 0 0 0 0,8,85 0 0 0 0,10,760 0 0,10,85 0 0,12,760,12,85
run


A classic, and very cool :)  I loaded up in js99er to see what it'd look like.  

 

i need to print some of these out to type in on my TI!



#53 TheBF OFFLINE  

TheBF

    Moonsweeper

  • 458 posts
  • Location:The Great White North

Posted Wed Nov 1, 2017 9:02 AM

 

Two rectangular prongs at the top transform into three cylindrical prongs.
 

100 call clear::call char(48,"01020408102040808040201008040201808080808080808080C0A09088848281")
110 call char(52,"814224181020408003020408F",54,"E01008040402020201020408081010101008080403")
120 for l=5 to 19::read c,s$::display at(l,c):s$; ::next l::for l=0 to 9^9::next l
130 data 17,01,16,0  1,15,0 03 1,14,0 0 21 1,13,0 0 010 02,12,0 0 0 0 0 2,11,0 0 0 0 0 0,10
140 data 0 0 0 0 0 0,9,0 0 0 0 0 0,8,760 0 0 0 0,8,85 0 0 0 0,10,760 0 0,10,85 0 0,12,760,12,85
run


 

That is really cool. Now I have to figure out how you did it!



#54 TheBF OFFLINE  

TheBF

    Moonsweeper

  • 458 posts
  • Location:The Great White North

Posted Wed Nov 1, 2017 10:33 AM

 Here is how I rendered it in Camel99 Forth

\ classic pipe & bar illusion by sometimes99er on Atariage
GRAPHICS
HEX
CREATE SHAPES
       0102 , 0408 , 1020 , 4080 ,
       8040 , 2010 , 0804 , 0201 ,
       8080 , 8080 , 8080 , 8080 ,
       80C0 , A090 , 8884 , 8281 ,
       8142 , 2418 , 1020 , 4080 ,
       0302 , 0408 , F000 , 0000 ,
       E010 , 0804 , 0402 , 0202 ,
       0102 , 0408 , 0810 , 1010 ,
       1008 , 0804 , 0300 , 0000 ,

\ write character definitions to VDP RAM all at once
: CHARACTERS ( 'pattern ascii# char-cnt   -- ) 8* SWAP ]PDT SWAP VWRITE ;

DECIMAL
SHAPES  CHAR 0   9 CHARACTERS

: RUN  PAGE
       CR ."                01"
       CR ."               0  1"
       CR ."              0 03 1"
       CR ."             0 0 21 1"
       CR ."            0 0 010 02"
       CR ."           0 0 0 0 0 2"
       CR ."          0 0 0 0 0 0"
       CR ."         0 0 0 0 0 0"
       CR ."        0 0 0 0 0 0"
       CR ."       760 0 0 0 0 "
       CR ."       85 0 0 0 0"
       CR ."         760 0 0"
       CR ."         85 0 0"
       CR ."           760"
       CR ."           85"
       BEGIN KEY? UNTIL ;


#55 Lee Stewart OFFLINE  

Lee Stewart

    River Patroller

  • 3,513 posts
  • Location:Silver Run, Maryland

Posted Wed Nov 1, 2017 11:49 AM

...and here it is in fbForth 2.0 with slightly modified logistics:

\ fbForth 2.0 port of Camel99 Forth version
\ of classic pipe & bar illusion by sometimes99er on Atariage
BASE @  \ current radix to stack
HEX
: SHAPES  ( --- addr cell-cnt )
      DATA[
         0102 0408 1020 4080
         8040 2010 0804 0201
         8080 8080 8080 8080
         80C0 A090 8884 8281
         8142 2418 1020 4080
         0302 0408 F000 0000
         E010 0804 0402 0202
         0102 0408 0810 1010
         1008 0804 0300 0000
      ]DATA  ;
BASE !   \ restore radix

: RUN  ( --- )
      VDPMDE @       \ save current graphics mode to stack
      GRAPHICS
      SHAPES ASCII 0 DCHAR    \ redefine characters '0'..'8'
      PAGE
      CR ."                01"
      CR ."               0  1"
      CR ."              0 03 1"
      CR ."             0 0 21 1"
      CR ."            0 0 010 02"
      CR ."           0 0 0 0 0 2"
      CR ."          0 0 0 0 0 0"
      CR ."         0 0 0 0 0 0"
      CR ."        0 0 0 0 0 0"
      CR ."       760 0 0 0 0 "
      CR ."       85 0 0 0 0"
      CR ."         760 0 0"
      CR ."         85 0 0"
      CR ."           760"
      CR ."           85"
      BEGIN ?KEY UNTIL
      VMODE  ;       \ restore graphics mode 

...lee



#56 TheBF OFFLINE  

TheBF

    Moonsweeper

  • 458 posts
  • Location:The Great White North

Posted Wed Nov 1, 2017 3:07 PM

Hey Lee,

 

When you post Forth code, what language do you select to make the colors look like that?



#57 Lee Stewart OFFLINE  

Lee Stewart

    River Patroller

  • 3,513 posts
  • Location:Silver Run, Maryland

Posted Wed Nov 1, 2017 3:14 PM

Hey Lee,

 

When you post Forth code, what language do you select to make the colors look like that?

 

That is done by the code (<>) button in the editor.

 

I often indent a block of text in the “Courier New” font and bold/color it how I like.  That procedure is more trouble and has greater line-spacing than the code button.  I put long stretches of code formatted that way into spoilers.

 

...lee

 

[EDIT:  OOPS!  I misread your question!  I don't choose any language.]



#58 PeteE OFFLINE  

PeteE

    Chopper Commander

  • 107 posts
  • Location:Beaverton, OR

Posted Sun Dec 10, 2017 8:34 PM

Curvature Blindness - all the curves are exactly the same shape. Source

100 call clear::call screen(3)::call color(1,1,1,2,1,1,3,1,1,4,1,1,5,1,1,6,1,1,7,1,1,8,1,1)::call magnify(3)
110 c$="00000000C038070000000000031CE000000738C000000000"::d$="000738C00000000000E01C030000000000000000C0380700"
120 call char(32,"00000000000000000103070F1F3F7FFFFFFFFFFFFFFFFFFF",48,c$,56,c$,64,c$,72,d$,80,d$,88,d$)
130 call char(40,"0000000000000000FFFEFCF8F0E0C080")::e$=rpt$(" ",max(0,11))&"!"&rpt$("""",22)&")"&rpt$("(",14)
140 a$=rpt$("2IJ1",7)&rpt$("HI01",7)::b$=rpt$(":QR9",7)&rpt$("PQ89",7)::c$=rpt$("BYZA",7)&rpt$("XY@A",7)
150 for i=0 to 7::read x,y,z::j=1+28*(i and 1)::d$=seg$(a$,j,x)&seg$(b$,x+j,y)&seg$(c$,x+y+j,z)
160 display at(i*3+1,1):d$;::display at(i*3+2,1):d$;::display at(i*3+3,1):seg$(e$,i*3+1,28);::next i
170 for i=0 to 7::read c$::call char(i*4+96,c$)::next i
180 for i=0 to 4::call sprite(#i+1,96+(i and 3)*4,3,i*24+1,113-i*24)
190 call sprite(#i+6,112+(i and 3)*4,3,i*24+73,225-i*24)::next i
200 call color(1,3,16,2,3,2,3,4,16,4,4,3,5,4,2,6,13,16,7,13,3,8,13,2)::call screen(16)::for i=0 to 9^9::next i
210 data 14,14,0, 11,17,0, 8,20,0, 5,21,2, 2,21,5, 0,20,8, 0,17,11, 0,14,14
220 data "00000000000000000100070F1F3F7FFF0103030C1F3F7FFFFF1FE3FCFFFFFFFF"
230 data "00000000000000000103030C1F3F7FFF0103070F1F0778FFFFFFFFFF3FC7F8FF"
240 data "00000000000000000103070F1F0778FF0103070F1C231FFFFFFFFFFFFCE31FFF"
250 data "00000000000000000103070F1C231FFF0100070F1F3F7FFFFFF8C73FFFFFFFFF"
260 data "FFFFFFFF3FC7F8FFFFFEFCF830C0C080FFFEFCF8F0E000800000000000000000"
270 data "FFFFFFFFFCE31FFFFFFEFCF8F0E00080FFF8C438F0E0C0800000000000000000"
280 data "FFF8C73FFFFFFFFFFFF8C438F0E0C080FF1EE0F8F0E0C0800000000000000000"
290 data "FF1FE3FCFFFFFFFFFF1EE0F8F0E0C080FFFEFCF830C0C0800000000000000000"
run


#59 Retrospect OFFLINE  

Retrospect

    Dragonstomper

  • 895 posts
  • Location:Wakefield, England

Posted Mon Dec 11, 2017 1:16 PM

 

Two rectangular prongs at the top transform into three cylindrical prongs.
 

100 call clear::call char(48,"01020408102040808040201008040201808080808080808080C0A09088848281")
110 call char(52,"814224181020408003020408F",54,"E01008040402020201020408081010101008080403")
120 for l=5 to 19::read c,s$::display at(l,c):s$; ::next l::for l=0 to 9^9::next l
130 data 17,01,16,0  1,15,0 03 1,14,0 0 21 1,13,0 0 010 02,12,0 0 0 0 0 2,11,0 0 0 0 0 0,10
140 data 0 0 0 0 0 0,9,0 0 0 0 0 0,8,760 0 0 0 0,8,85 0 0 0 0,10,760 0 0,10,85 0 0,12,760,12,85
run


MY EYES!!!!



#60 sometimes99er OFFLINE  

sometimes99er

    River Patroller

  • Topic Starter
  • 4,067 posts
  • Location:Denmark

Posted Wed Dec 20, 2017 12:57 AM

The boxes seem to tilt.
 
100 call clear::call screen(6)::call char(33,"30C0030C30C0030C0C03C0300C03C03")
110 call box(4,9,29,11,33)::call box(10,13,23,18,34)::for i=0 to 9^9::next i
120 sub box(x1,y1,x2,y2,c)::for y=y1 to y2::call hchar(y,x1,c,x2-x1+1)::next y::subend
run
 
 






Also tagged with one or more of these keywords: XB

0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users