# [R], 270 bytes <!-- language-all: lang-r --> function(s){n=nchar(s) s=el(strsplit(s,'')) p=matrix(,2,n^2) while(T<=n){a=4*F+1 p[,T+1:a-1]=rbind(c(F:-F,(-F:F)[-1]),1:a-2*F-1) a=a+2 p[,T+a+1:a-3]=rbind(F+1,(b=2*F+1):-b) T=T+2*a-2 F=F+1} p=p[,1:n] p=p-min(p)+1 m=matrix(" ",b<-max(p),b) m[t(p)]=s n=apply(m,1,cat," ")} [Try it online!][TIO-kele8pls] [R]: https://www.r-project.org/ [TIO-kele8pls]: https://tio.run/##PZDBbsIwEETv/ooqF7yJfUjaU8Re/QW5RVRyQgBT23FtU6CIb6ebVvQ2mtEbjSY@cjTa7@2Ej93Jj9nMnie4efTjQUeSLOFkecoxBWsyT2K1AmABnSbywkUj/HsD7HwwduLdGj3cNL6VqqpZ6EVX1a2W9QbjYPyWj1y1UgkuVaugJx/EkjelkjUwjbpq/ij9y70@OWoTfMBmqYVWDsA67KqmJJQpJPNOiwisW79ZlHTG8wC0wT2HFi@FGNbS6QsFghpcn0ltMDGPOgR75U7UYtRZFKyA@/8xvMiH6fNkxo8hzme/my/Hkwtp/poiBVZ/X7fzvoDHDw "R – Try It Online"