Atlantis Cafe Illusion

Difference between version 14 and 18 - Previous - Next
[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].

[WikiDbImage atlantis.gif]

See also [Bulging Line Illusion] [Arrow Illusion].

This application allows you to control some of the parameters of the tiling.

[PT]: You can now see the actual site in Google street view now that they have driven around Bristol. See [http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=Bristol,+UK+(Bristol,+England)&sll=37.0625,-95.677068&sspn=41.682395,61.523437&ie=UTF8&ll=51.458606,-2.599704&spn=0.008035,0.01502&t=h&z=16&iwloc=addr&layer=c&cbll=51.457037,-2.597771&panoid=G3p4akg0KuobytturvrcGQ&cbp=12,160.98307828774233,,0,5]

The relative luminance of the mortar should be midway between the brightness of the light & dark tiles for the illusion to occur most strongly; this toyol (half way between a toy and a tool) could allow you to experiment with the degree of illusion.

{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.
[KJN] 2008-10-17 remove some corrupted text----
[Jeff Smith] 2020-09-01 : Below is an online demo using [CloudTk]. This demo runs "Atlantis Cafe Illusion" in an Alpine Linux Docker Container. It is a 27.4MB image which is made up of Alpine Linux + tclkit + Atlantis-Cafe-Illusion.kit + libx11 + libxft + fontconfig + ttf-linux-libertine. It is run under a user account in the Container. The Container is restrictive with permissions for "Other" removed for "execute" and "read" for certain directories. 

<<inlinehtml>>

<iframe height="340" width="240" src="https://cloudtk-app.tcl-lang.org/cloudtk/VNC?session=new&Tk=Atlantis-Cafe-Illusion" allowfullscreen></iframe>

<<inlinehtml>>

----
======
 # 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
 }
 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
======

<<categories>> Graphics | Application | Optical Illusion