#rs
tats
;librar
y(sp);lib
rary(gglog
o);windows
Fonts(Times=w
indowsFont("Times
New Roman"));poly<-createPolygons("\ua729",font="Times");text<-readChar(sys.frame(1
)$ofile,1e5);c hars<-unlist(str
split(text,"")); chars[chars=="
\n"]<-";";char s<-chars[chars!
="\r"];Nx<-10 0;Ny<-40;d<-ex
pand.grid(x=1 :Nx,y=Ny:1);##
THE CODE I S THE ART 3 #
#;d$inpoly<-a s.logical(point.i
n.polygon(d$ x/Nx,(d$y)/Ny,p
oly$x,poly$y) );rles<-by(d,-d
$y,function(d )rle(d$inpoly)$le
ngths);vals<- by(d,-d$y,functi
on(d)rle(d$in poly)$values);#quine;
cumsums<-fu nction(chars)cumsum
(strwidth(cha rs,units="inche
s"));scale=su m(d$inpoly)/m
ax(cumsums( chars))*1.0
19;#rtistry;sp width<-strw
idth(" ", units= "inc hes")scale
.9;chars<-c(chars,rep(" ",10 0));getW<-fu
nction(chars,w)which(cu msums(char
s)>w/scale)[1];fo r(r in seq_alo
ng(rles)){;for(i
in seq_along
(rles[[r]])){;if(v
als[[r]][i]==FAL
SE) cat(paste0(
rep(" ",rles[[r]][i]/spwidt
h),collaps e=""));if(vals[[r]][i]==T
RUE){j=getW(chars,rles[[r]][i]);cat(paste0(ch
ars[1:j],collapse=""));chars<-chars[-(1:j
)]}};cat("\n")};