sl <- function( bin=0.1 ) { upper <- NULL upper[1] <- " (@@) ( ) (@) ( ) @@ () @ O @ O @ ( ) (@@@@) ( ) (@@@)" upper[2] <- " ( ) (@@) ( ) (@) () @@ O @ O @ O (@@@) ( ) (@@@@) ( )" middle <- " ==== ________ ___________ _D _| |_______/ \\__I_I_____===__|_________| |(_)--- | H\\________/ | | =|___ ___| _________________ / | | H | | | | ||_| |_|| _| \\_____A | | | H |__--------------------| [___] | =| | | ________|___H__/__|_____/[][]~\\_______| | -| | |/ | |-----------I_____I [][] [] D |=======|____|________________________|_ " lower <- NULL lower[1] <- "__/ =| o |=-O=====O=====O=====O \\ ____Y___________|__|__________________________|_ |/-=|___|= || || || |_____/~\\___/ |_D__D__D_| |_D__D__D_| \\_/ \\__/ \\__/ \\__/ \\__/ \\_/ \\_/ \\_/ \\_/ \\_/ " lower[2] <- "__/ =| o |=-~~\\ /~~\\ /~~\\ /~~\\ ____Y___________|__|__________________________|_ |/-=|___|=O=====O=====O=====O |_____/~\\___/ |_D__D__D_| |_D__D__D_| \\_/ \\__/ \\__/ \\__/ \\__/ \\_/ \\_/ \\_/ \\_/ \\_/ " lower[3] <- "__/ =| o |=-~~\\ /~~\\ /~~\\ /~~\\ ____Y___________|__|__________________________|_ |/-=|___|= || || || |_____/~\\___/ |_D__D__D_| |_D__D__D_| \\_/ \\O=====O=====O=====O_/ \\_/ \\_/ \\_/ \\_/ \\_/ " lower[4] <- "__/ =| o |=-~~\\ /~~\\ /~~\\ /~~\\ ____Y___________|__|__________________________|_ |/-=|___|= || || || |_____/~\\___/ |_D__D__D_| |_D__D__D_| \\_/ \\_O=====O=====O=====O/ \\_/ \\_/ \\_/ \\_/ \\_/ " lower[5] <- "__/ =| o |=-~~\\ /~~\\ /~~\\ /~~\\ ____Y___________|__|__________________________|_ |/-=|___|= O=====O=====O=====O|_____/~\\___/ |_D__D__D_| |_D__D__D_| \\_/ \\__/ \\__/ \\__/ \\__/ \\_/ \\_/ \\_/ \\_/ \\_/ " lower[6] <- "__/ =| o |=-~O=====O=====O=====O\\ ____Y___________|__|__________________________|_ |/-=|___|= || || || |_____/~\\___/ |_D__D__D_| |_D__D__D_| \\_/ \\__/ \\__/ \\__/ \\__/ \\_/ \\_/ \\_/ \\_/ \\_/ " SL <- NULL SL[1] <- paste(upper[1], middle, lower[1], "\n", sep="\n") SL[2] <- paste(upper[2], middle, lower[2], "\n", sep="\n") SL[3] <- paste(upper[1], middle, lower[3], "\n", sep="\n") SL[4] <- paste(upper[2], middle, lower[4], "\n", sep="\n") SL[5] <- paste(upper[1], middle, lower[5], "\n", sep="\n") SL[6] <- paste(upper[2], middle, lower[6], "\n", sep="\n") slwindow <- function() { x11(width=600/96, height=300/96) par(mar=c(0,0,0,0), cex=0.8, adj=0, family="mono", bg="black") plot(0, 0, type="n", xlim=c(-1,1), ylim=c(-1,1), xaxt="n", yaxt="n", xlab="", ylab="", xaxs="i", yaxs="i", bty="n") return( dev.cur() ) } winhandle <- slwindow() xs <- seq(from=1.1, to=-3.5, by=-0.05) for(i in seq(along=xs)) { if(dev.cur()!=winhandle) { winhandle <- slwindow() } rect(-2, -2, 2, 2, col="black", border=NA) text(xs[i], 0, SL[(i%%6)+1], col="white") Sys.sleep(bin) } dev.off(winhandle) invisible() } class(sl) <- "sl" print.sl <- function(...) { sl() } comment(sl) <- c( "sl - Do not return the names of the objects in the environment.", "", "SYNOPSIS", " sl(bin)", "INPUT", " bin : length of the time bin.", " Set much larger value (e.g. 1.0) when you get fed up with programming.", " (This will give you 1.5 min break to think about your life.)", "OUTPUT", " NULL.", "", "See http://www7b.biglobe.ne.jp/~homunculus/r/sl.html for detailed instruction in Japanese.", "Also visit http://creazy.net/2008/02/sl_js.html to see the JavaScript version of .", "The SL illustration used in the sl.R was taken from the JS code in that web site.", "ver.1.00, written by MOCHI, 2009." )