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: matti@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: boba@wwa.com Approved: boba@wwa.com Message-ID: <37k7e0$a0b@sashimi.wwa.com> Reply-To: matti@ki.ericsson.se NNTP-Posting-Host: sashimi.wwa.com 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 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--; } }