Settings

The page will reload to apply your changes.
Theme

ASCII Art Font

ASCII Art Menu

Original Usenet message from alt.ascii-art, 27 Nov 2004.
Re: =>Ascii Stereogram Movie<=

Re: =>Ascii Stereogram Movie<=

From col...@yahoo.com · alt.ascii-art · 27 Nov 2004 10:51 · View full thread · report
On Sat, 27 Nov 2004, Faux_Pseudo wrote:

>
>
> _.-In alt.ascii-art, col...@yahoo.com wrote the following -._
> > there is a bit of code in this message that will do a single pic
> >


>
> +-(faux@betrug)-(26/8)-(19:11:39:Fri Nov 26)-
> +-($:~)-
> gcc  stero.cc
it's plain c. rename it stero.c & tri it again [gcc looks at the extension
to decide if it's a c, c++, object, assembly etc. file.]


> > http://groups.google.com/groups?hl=en&lr=&th=4ecd77e32d94344d&rnum=2
It look like that's not the source I got it from - the version I have
saved it a bit different, but I'm pretty sure I got it off'n usenet.
here's my saved version if the renaming doesn't work. It works with
gcc-2.95.3 (Ok, what's up with that #if 1 in randasc()?):



#define DEPTH0  16
#define COLS    79

#include <stdio.h>

main()
    {
    long now;
    int col;
    char m[COLS+1],s[COLS+1];
    int i,e,c;

    /* seed random number generator */

    time (&now);
    srand (now);

    /* print fusion X's */

    for (col = 0; COLS - col >= DEPTH0; col += DEPTH0)
        {
        for (i = 0; i < DEPTH0-1; ++i)
            putchar (' ');
        putchar ('X');
        }
    putchar ('\n');

    /* process input image */

    while (memset(m,'\0',COLS+1),fgets (m, COLS+1, stdin))
        {
        e = 0;
        s[COLS] = 0;
        for(i=0; i<COLS; )
            {
            e = 0;
            while (i >= DEPTH0 && i < COLS &&

 (c = m[i - DEPTH0]) >= '0' && c <= '9')
                {
                e = 1;
                s[i] = s[i-DEPTH0+c-'0'];
                ++i;
                }
            s[i++] = (e || i < DEPTH0) ? randasc() : s[i-DEPTH0];
            }
        puts (s);
        }
    }

randasc()
    {
#if 1
    return ('!'+rand()%92);
#else
    return ('a'+rand()%26);
#endif
    }



  3ch
"Gallium arsinide. It's the technology of the future.
Always has been, always will be"

Original message headers
X-Google-Thread: f996b,ffa376e6ff68f010
X-Google-Attributes: gidf996b,public
X-Google-Language: ENGLISH,ASCII-7-bit
Path: g2news1.google.com!news4.google.com!news.glorb.com!news3.optonline.net!peer02.cox.net!cox.net!p02!okepread01.POSTED!53ab2750!not-for-mail
Newsgroups: alt.ascii-art
From: col...@yahoo.com
X-X-Sender: ro...@bunrab.ronnet.moc
Reply-To: col...@yahoo.com
Subject: Re: =>Ascii Stereogram Movie<=
In-Reply-To: <TGPpd.1211$gH3.147@lakeread05>
Message-ID: <200...@bunrab.ronnet.moc>
References: <419...@news.fhg.de> <D7zod.15751$D26.9954@lakeread03>
 <200...@bunrab.ronnet.moc> <TGPpd.1211$gH3.147@lakeread05>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Lines: 91
Date: Sat, 27 Nov 2004 10:51:08 +0000
NNTP-Posting-Host: 68.104.147.17
X-Complaints-To: abu...@cox.net
X-Trace: okepread01 1101580717 68.104.147.17 (Sat, 27 Nov 2004 13:38:37 EST)
NNTP-Posting-Date: Sat, 27 Nov 2004 13:38:37 EST
Organization: Cox Communications
Xref: g2news1.google.com alt.ascii-art:2110
About this message. This message was posted publicly to the newsgroup alt.ascii-art in 2004 and is mirrored here unchanged as part of the Historic Archives – only email addresses are masked. The artwork and text belong to their original authors: if you copy a piece, keep the artist's initials or signature intact and credit them where you can. Are you the author? Contact us to get your posts attributed, connected to your artist profile, or removed.

Report this message

Help us keep the archive clean and accurate. Reports are reviewed by a person – nothing is changed automatically.

Help classify this post