Settings

The page will reload to apply your changes.
Theme

ASCII Art Font

ASCII Art Menu

Original Usenet message from alt.ascii-art, 14 Aug 2007.
Re: ASCII Stereogram Software Help -- $15/hour, work at home

Re: ASCII Stereogram Software Help -- $15/hour, work at home.

From col...@yahoo.com · alt.ascii-art · 14 Aug 2007 19:48 · View full thread
On Tue, 31 Jul 2007, col...@yahoo.com wrote:

>
>
> On Wed, 1 Aug 2007, Faux_Pseudo wrote:
>
>> _.-In alt.ascii-art, mel...@sbcglobal.net wrote the following -._
>>> I'm looking for a computer savvy person to develop a couple of ASCII
>>> stereograms for me. If you're not familiar with the concept, see
>>> below:
>> 
>> You posted this a few months ago.  Did you get any response then?
> Also, code to generate ascii stereograms has been posed to the group (A while 
> back, but not pre-google(dejanews) anyway).
>
>  3ch
>
>

Found it! (it were harder than I expected) You can have several levels (up 
to 16 (DEPTH0 16?) by using 1, 2 3 etc. and the COLS 79 contols the width. 
In the input picture. iirc it worked fine w/ gcc and the AIX cersion of c 
but not TurboC but it might have been the DOS fonts that didn't work for 
me, not TurboC at all. That'll be $3.75 for the 15 minutes of work :-)



--------All that follows is quoted w/o > for ease of cf and paste: --------



This is the C progam that I have (I didn't write it - just got it off an
alt.3d FAQ). It makes the ascii stereograms.....

--------------------------------------------------------

#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()
{
    /* large set of random characters */
    return ('!'+rand()%92);

    /* lowercase random letters */
    /* return ('a'+rand()%26); */

}

---------------------------------------------------

here's an example input file...

                22222222               222222222
             22222222222222         222222222222222
           222222      222222      222222      222222
          22222         222222    222222        222222
         22222                                  22222
         22222     22222222222        22222222222222
         22222     22222222222        22222222222222
          22222          22222                  22222
           222222       222222    222222        222222
             2222222222222222      22222222222222222
               22222222222           22222222222222

the numbers correspond to the `level' in the output stereogram.

mark.
-- 
       .---------------------------------------------------------------.
       |   Mark Jervis ....................... m.j...@bristol.ac.uk  |
       |   Room G3, University of Bristol, Department of Mathematics,  |
       |   University Walk, Bristol. BS8 1TW ...... tel: 303030 x3215  |
       `---------------------------------------------------------------'

Original message headers
X-Google-Thread: f996b,9fe6248ca27206b
X-Google-Attributes: gidf996b,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
Path: g2news2.google.com!news4.google.com!out01b.usenetserver.com!news.usenetserver.com!in02.usenetserver.com!news.usenetserver.com!in03.usenetserver.com!news.usenetserver.com!hwmnpeer01.phx!news.highwinds-media.com!hw-filter.phx!newsfe10.phx.POSTED!53ab2750!not-for-mail
Newsgroups: alt.ascii-art
From: col...@yahoo.com
X-X-Sender: ro...@nonsuch.ronnet.moc
Subject: Re: ASCII Stereogram Software Help -- $15/hour, work at home.
In-Reply-To: <200...@nonsuch.ronnet.moc>
Message-ID: <200...@nonsuch.ronnet.moc>
References: <118...@x35g2000prf.googlegroups.com>
 <1NRri.9318$Uz4...@newsfe19.lga> <200...@nonsuch.ronnet.moc>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
Lines: 118
Date: Tue, 14 Aug 2007 12:48:43 -0700
NNTP-Posting-Host: 68.109.164.40
X-Complaints-To: adm...@cox.net
X-Trace: newsfe10.phx 1187120793 68.109.164.40 (Tue, 14 Aug 2007 12:46:33 MST)
NNTP-Posting-Date: Tue, 14 Aug 2007 12:46:33 MST
Organization: Cox
Xref: g2news2.google.com alt.ascii-art:225
About this message. This message was posted publicly to the newsgroup alt.ascii-art in 2007 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.