SIRTS (Single Image Random TEXT Stereogram).

What are they?

They are images that appear at first glance to be composed of totally random dots but when you look at them more carefully, a 3D image appears out of the 2D image. There are two kinds of such images: SIRDS (Single Image Random Dot Stereogram) and SIRTS (Single Image Random Text Stereogram).

As their names imply, SIRDS are composed of dots while SIRTS are composed of text characters.

How do we view these images?

The basic idea is that you need to focus your eyes on a point that is slightly further that the actual image. What you need to do is cross your eyes slightly to bring the image out of focus until you start seeing the 3D image. I really don't know how to properly explain to you how to see it if you don't already know. If you have trouble viewing the image, please search google for SIRDS.

How do we create our own SIRTS?

Using this program. It takes as input a file that is the height map of the object. For example:
000000000000000000000000
000000000000000000000000
000011111111111111110000
000011111111111111110000
000011111111111111110000
000011111111111111110000
000011111111111111110000
000000000000000000000000
000000000000000000000000
should create a rectangle that is closer to you (at depth 1) than the background (at depth 0).

You feed this data to the program and it gives you the 3d SIRTS:

g810![IJ'`h1F7zbg810![IJ'`h1F7zbg810![IJ'`h1F7zbg810![IJ'`h huNM:W'YlyFWn<b,huNM:W'YlyFWn<b,huNM:W'YlyFWn<b,huNM:W'YlyF (o>PK+W2[r#ui$JL(o>K+W2[r#ui$JL(o>K%+W2[r#ui$JL(o>K%+W2[r#u -XV!C]{WM3H$\UoQ-XVC]{WM3H$\UoQ-XVCG]{WM3H$\UoQ-XVCG]{WM3H$ DDI40{lk$0fl"?(9DDI0{lk$0fl"?(9DDI0){lk$0fl"?(9DDI0){lk$0fl oJI?lc".cCYbx4HZoJIlc".cCYbx4HZoJIlic".cCYbx4HZoJIlic".cCYb f0*I.&%_l/h~S*`;f0*.&%_l/h~S*`;f0*.M&%_l/h~S*`;f0*.M&%_l/h~ 1|$0zRW{7:4gbN{P1|$0zRW{7:4gbN{P1|$0zRW{7:4gbN{P1|$0zRW{7:4 }yG]D(FqinGWb,'#}yG]D(FqinGWb,'#}yG]D(FqinGWb,'#}yG]D(FqinG
The rectangle should appear on the left side of the image.

Is it complicated to create such a thing?

Not at all if you know how to ;)

Where can I get more information?

http://www.tnt.uni-hannover.de/soft/compgraph/sird/sirdsfaq.txt or search google again for more information.

Ok, where is the program?

#!/usr/bin/perl -nw # generate ascii 3-d for an input height field # input contains tabs(ts=8), spaces(h=0) or numbers 0..9 # 0 is the furthest and 9 is the closest. # Copyright 2001 -- Abdulaziz Ghuloum chomp; s/\t/' 'x8/eg; # replace tabs $_|=' 'x72; # normalize width s/ /0/g; # default depth s/(\d)/$1$1/g; # double each letter s/.//; # remove first chop; # and last my $p = rs(16); # pick a random string print $p; $p=reverse$p; s[(\d)(\d)][ # for each step if($2>$1){chop($p) for 1..$2-$1} # remove chars if going up elsif($2<$1){$p .= rs($1-$2)}; # add chars if going down $p =~ s/(.*)(.)/$2$1/; # rotate chars $2 # and substitute ]eg; print "$_\n"; sub rs{ my @chars = map chr, 33..126; # all printable chars my $p; $p .= $chars[rand @chars] for 1 .. shift; $p or ''; }

And I want to see the camel in 3d

Click d/l code to see it.

Hope you all like it

Aziz,,,

__DATA__ 5ETtY?.ARZJ;xtN[5ETtY?.ARZJ;xtN[5ETtY?.ARZJ;xtN[5ETtY?.ARZJ;xtN[5ETtY? +.ARZJ;xtN[5ETtY?. TI_R_SpgIPIzEpF=TI_R_SpgIPIzEpF=TI_R_SpgIPIzEpF=TI_R_SpgIPIzEpF=TI_R_S +pgIPIzEpF=TI_R_Sp Y@ft]c'O#-gslvMaY@ft]c'O#-gslvMaY@ft]c'O#-gslvMaY@ft]c'O#-gslvMaY@ft]c +'O#-gslvMaY@ft]c' N`Otq8pNY|u;Kt9<N`Otq8pNY|u;Kt9<N`Otq8pNY|u;Kt9<N`Otq8pNY|uKt9<N`+Otq8 +pNY|uKt9<N`+Otq8p GNB;|N<R,I>?YgdtGNB;|N<R,I>?YgdtGNB;|N<R,I>?YgdtGNB;|N<,I>?YgdtGNB;|eN +<,I>?YgdtGNB;|eN< o<6k/w}n>N^-1*Dmo<6k/w}n>N^1*Dmo<o6k/w}n>N^1*Dmo<o6/w}n>N^1*Dmo<o6/w}* +n>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S8 qG~C=1f_:6mCBYL:qG~C=1f_:6mCBYL:qGC=1f_:6GmCBYL:qGC=1f_:6GmCBYL:qGC=1f +_6GmCBYL:)qGC=1f_ H0sK(eTR1zixaG=UH0sK(eTR1zixaG=U0sK(eTR1izixaG=U0sK(eTR1izixaG=U0sK(eT +R1zixaG=>U0sK(eTR !hUCWvci*qOWP~4[!hUCWvci*qOWP~[!hUCWvci*8qOWP~[!hUCWvci*8qOWP~[!hUCWvc +i*8qOWP~[!hUCWvci .Q&K@9mCK?I&Ffke.Q&K@9mCK?I&Ffke.Q&K@9mCK?I&Ffke.Q&K@9mCK?I&Ffke.Q&K@9 +mCK?I&Ffke.Q&K@9m }Fi$r(_eOy+g!9k9}Fi$r(_eOy+g!9k9}Fi$r(_eOy+g!9k9}Fi$r(_eOy+g!9k9}Fi$r( +_eOy+g!9k9}Fi$r(_ ?$cB~]?94~yL?9[z?$cB~]?94~yL?9[z?$cB~]?94~yL?9[z?$cB~]?94~yL?9[z?$cB~] +?94~yL?9[z?$cB~]?

Replies are listed 'Best First'.
Re: ASCII Stereograms (SIRTS)
by hossman (Prior) on Dec 25, 2001 at 12:00 UTC
    Many SIRDS come with two dots below them to make it easier to see the Image -- you relax your eyes andlet the two dots blur into four dots, and when the middle two get closer together, you try to "focus them" so that they become one clear dot (at which point the image appove will magically reveal itself to you).

    You can add this to the bottom of abstrats's code to generate those "dots" and make it a little easier to see the images...

    END { print "\n",' 'x35,'X',' 'x15,'X',' 'x35,"\n"; }
      I have a fair amount of experience with viewing stereograms of molecules but this ASCII image is impossible for me to focus on.

      Still it's a cool hack. Do you have a web page with some more examples?

      metadoktor

      "The doktor is in."

Re: ASCII Stereograms (SIRTS)
by hossman (Prior) on Dec 25, 2001 at 13:26 UTC
    One other thing I noticed:
    Because of the way random letters are used to make these SIRTS (some are made with fixed sets of letters) you'll occasionaly see SIRTS generated that don't "step down" properly (ie: go from a high number to a lower number).

    This can happen becuase the rs method has (unfortunately) just happened to pick some random characters that are allready part of the pattern for the current line. (In fact, I think the camel SIRTS that was posted has this problem with the legs).

    You can prevent ths from happening by making two minor changes:

    • make $p global (ie: delete the "my")
    • replace the rs method with this one...
      sub rs{ my @chars = map chr, 33..126; # all printable chars if (defined $p) { # don't use anything allready in our pattern @chars = grep index($p,$_)==-1, @chars; } my $r; $r .= $chars[rand @chars] for 1 .. shift; $r or ''; }
      Hello,

      Thanks for the suggestion, however, there is a bug in the above code. While the code correctly extracts non-repeated characters, it can use any of these characters randomly which may result in repeated characters in the line:

      $r .= $chars[rand @chars] for 1 .. shift;
      Here is the correct version of the program:
      #!/usr/bin/perl -nw # generate ascii 3-d for an input height field # input contains tabs(ts=8), spaces(h=0) or numbers 0..9 # 0 is the furthest and 9 is the closest. # Copyright 2001 -- Abdulaziz Ghuloum chomp; s/\t/' 'x8/eg; # replace tabs $_|=' 'x72; # normalize width s/ /0/g; # default depth s/(\d)/$1$1/g; # double each letter s/.//; # remove first chop; # and last $p=rs('',16); # pick a random string print $p; $p=reverse$p; s[(\d)(\d)][ # for each step if($2>$1){chop($p) for 1..$2-$1} # remove chars if going up elsif($2<$1){$p=rs($p,$1-$2)}; # add chars if going down $p =~ s/(.*)(.)/$2$1/; # rotate chars $2 # and substitute ]eg; print "$_\n"; sub rs{ my ($p,$n) = @_; return $p unless $n; my @chars = map chr, 33..126; # all printable chars @chars = grep index($p,$_)==-1, @chars if defined $p; $p .= $chars[rand@chars]; rs($p,$n-1); }