Settings

The page will reload to apply your changes.
Theme

ASCII Art Font

ASCII Art Menu

Original Usenet thread from rec.arts.ascii, started 13 Oct 1994.
 _   _                     _        _             _     _           
| | | |___  ___ _ __   ___| |_     / \   _ __ ___| |__ (_)_   _____ 
| | | / __|/ _ \ '_ \ / _ \ __|   / _ \ | '__/ __| '_ \| \ \ / / _ \
| |_| \__ \  __/ | | |  __/ |_   / ___ \| | | (__| | | | |\ V /  __/
 \___/|___/\___|_| |_|\___|\__| /_/   \_\_|  \___|_| |_|_| \_/ \___|
Info: 3D-program; Request: improve it

Info: 3D-program; Request: improve it

rec.arts.ascii · 1 message · 13 Oct 1994
Matti Hegerlund <mat...@ki.ericsson.se> ASCII art 13 Oct 1994 21:05 · raw headers · report
Greetings!

I have some problems with the edges in the 3D picture this simple program
generates. I'd appriciate if someone could give some hints how to make
them better!

	/Matti

#include <stdlib.h>
 
const int s_length = 97;
 
void main(void)
{
  char s[100];
  int j, i, e, repeat;
 
  for(e = 0; e < 7; e++)
    printf("X%15s", "");
  puts("");
 
  j = 30;
  while(j >= 0)
  {
    e = s[s_length] = i = 0;
    while(i < s_length)
    {
      if( (j < 4) || (j > 25) )
        repeat = 13;
      else
        if( (((i >= 3*repeat) && (i <= 5*repeat)) && ((j > 8) && (j < 20))) )
          repeat = 11;
        else
          if( (i < 2*repeat) || (i > 6*repeat) )
            repeat = 13;
          else
            repeat = 12;
      
      if(i < repeat)
        s[i++] = '!' + random() % 92;
      else
        s[i++] = s[i - repeat];
    }
    s[i] = '\0';
    puts(s);
    j--;
  }
}

About this thread. These messages were posted publicly to the newsgroup rec.arts.ascii in 1994 and are 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 one of the authors? 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