[GWM] The Atlantis Cafe was a greasy spoon Cafe in Bristol. Professor Richard Gregory published a paper based on the illusion created by the tiles on the front of the cafe [http://www.richardgregory.org/papers/cafe_wall/cafe-wall.doc]. [http://mini.net/files/atlantis.gif] See also [Bulging Line Illusion]. This application allows you to control some of the parameters of the tiling; since the Cafe has changed hands and the tiles removed this page is in memory of it. The relative luminance of the mortar should be midway between the brightness of the light & dark tiles for the illusion to occur most strongly. ( [PT] 28-Oct-2004 - Just to point out that the tiles still exist on the wall of this building. It's no longer a cafe though. Well - unless they went in the last few weeks that is. ) {Copy this code into Wish console and run it. 2 scale controls control the offset of the tiles and the lightness of the grouting.} [GWM] 26.10.04 Minor change to remove some unused variables. # Atlantis Cafe effect - first reported by Prof Richard Gregory # see http://www.richardgregory.org/papers/cafe_wall/cafe-wall.doc # then at Bristol University, UK. The Atlantis Cafe was at the bottom of St Michael's Hill # but has now changed hands and lost the tiles. So, here they are again! # The luminance of the mortar between tiles affects the degree of illusion, as does # placing the tiles at the bottom of the screen and looking at the top of screen (peripheral vision). # The degree of overlap of the tiles also affects the degree of illusion. proc makerow {rowdata length height repeat colmort coldark collight} { ;# make an image data set # of bricks/tiles length by height, repeating every repeat along length. # colmort etc are 3 colours for mortar, dark tile light tile set tilelen [expr $repeat/2] for {set j 0} {$j<$height} { incr j} { ;# rows of picture set pix [list] for {set i 0} {$i<$length} { incr i } { if {$j<2} { lappend pix $colmort } else { if {[expr $i%$repeat<$tilelen-1]} { lappend pix $coldark } elseif {[expr $i%$repeat>($tilelen+1) && $i%$repeat<$repeat-2]} { lappend pix $collight } else { lappend pix $colmort } } } $rowdata put [list $pix] -to 0 $j } } proc mortar {ht size lumfrac} { ;# set mortar colour set colmo [format %02x [expr int($lumfrac*2.55)] ] makerow tilerow $size $ht 60 \#$colmo$colmo$colmo \#000000 \#ffffff } proc movetiles {ht frac} { ;# slide rows of tiles across the canvas catch [destroy .frm] {} ;# delete it. Same as clear. set frm [canvas .frm -width [expr 8*$ht] -height [expr 8*$ht] ] for {set j 0} {$j<8} { incr j} { ;# rows of tiles if {[expr $j%2]} {set dx $frac } else { set dx 0} label $frm.row$j -image tilerow -bd 0 -relief raised place $frm.row$j -x $dx -y [expr $j*$ht] } pack .frm update } proc setup {size} { catch [destroy .dt] {} ;# delete it. Same as clear. catch [destroy .dlum] {} ;# delete it. Same as clear. wm title . "Atlantis Cafe" set ht [expr $size/16] scale .dt -variable frac -orient horizontal -label "fraction" -command "movetiles $ht" scale .dlum -variable lumf -orient horizontal -label "mortar luminance" -command "mortar $ht $size" image create photo tilerow -height $ht -width $size pack .dt .dlum -side top } global frac lumf set frac 10 set lumf 50 setup 450 ---- [Category Graphics] | [Category Application]