Settings

The page will reload to apply your changes.
Theme

ASCII Art Font

ASCII Art Menu

Original Usenet message from rec.arts.ascii, 13 Oct 1994.
Info: 3D-program; Request: improve it

Info: 3D-program; Request: improve it

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--;
  }
}

Original message headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fbb9d,4227eb4afd337a0f,start
X-Google-Attributes: gidfbb9d,public
X-Google-ArrivalTime: 1994-10-13 17:03:19 PST
Path: bga.com!news.sprintlink.net!sashimi.wwa.com!not-for-mail
From: mat...@ki.ericsson.se (Matti Hegerlund)
Newsgroups: rec.arts.ascii
Subject: Info: 3D-program; Request: improve it
Date: 13 Oct 1994 16:05:04 -0500
Organization: Ericcsson Radio Systems
Lines: 50
Sender: bob...@wwa.com
Approved: bob...@wwa.com
Message-ID: <37k7e0$a0...@sashimi.wwa.com>
Reply-To: mat...@ki.ericsson.se
NNTP-Posting-Host: sashimi.wwa.com
About this message. This message was posted publicly to the newsgroup rec.arts.ascii in 1994 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