Jump to content

Photo

Optical illusions

XB

56 replies to this topic

#51 sometimes99er OFFLINE  

sometimes99er

    River Patroller

  • Topic Starter
  • 3,959 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

  • 647 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

  • 369 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

  • 369 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,386 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

  • 369 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,386 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.]







Also tagged with one or more of these keywords: XB

0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users