Settings

The page will reload to apply your changes.
Theme

ASCII Art Font

ASCII Art Menu

Original Usenet thread from rec.arts.ascii, started 7 Feb 1996.
 _   _                     _        _             _     _           
| | | |___  ___ _ __   ___| |_     / \   _ __ ___| |__ (_)_   _____ 
| | | / __|/ _ \ '_ \ / _ \ __|   / _ \ | '__/ __| '_ \| \ \ / / _ \
| |_| \__ \  __/ | | |  __/ |_   / ___ \| | | (__| | | | |\ V /  __/
 \___/|___/\___|_| |_|\___|\__| /_/   \_\_|  \___|_| |_|_| \_/ \___|
code-talk: sphere intersecting a plane

code-talk: sphere intersecting a plane

rec.arts.ascii · 2 messages · 7 Feb 1996 - 8 Feb 1996
Eli the bearded <bgr...@ic.sunysb.edu> ASCII art 7 Feb 1996 00:00 · permalink · report
My NEW obfuscated c code signature. This is not ascii-art
per say, but it does generate an ascii-art movie.

It's output is a sphere intersecting a plane. The image is
a little rough in places, and I am considering a different
shading, but overall I am quite happy. This program assumes
a vt100. It could be adapted to other terminals fairly
easily, if you know what to modify.

This was inspired by a guy with a piece of signature code to
generate a full screen ascii mandelbrot.

Elijah
------                                    /* cc -Dp=putchar signature.c -lm */
main(){int i,j,k,l;char m[]=" .,:;i!1I]fJYVOQZXHKNSWM";for(i=-12;i<13;i++){for
(k=0,l=7379124;k<6;k++)p((l&0xf)+(k?97:65)),l>>=4;for(j=-12;j<12;j++){for(k=(j
+12?-12:-6);k<12;k++)((l=i*i+j*j+k*k)<144)?p(m[l=sqrt(l+2)*2]):p((l<25)?39:32)
;(j!=11)?p('\n'):0;}p(27),p(91),p(72);}puts("Elijah:bgr...@ic.sunysb.edu");}

In article <4f9v79$dh...@miso.wwa.com> bgr...@ic.sunysb.edu
(Eli the bearded) wrote:

> It's output is a sphere intersecting a plane. The image is
> a little rough in places, and I am considering a different
> shading, but overall I am quite happy. This program assumes
> a vt100. It could be adapted to other terminals fairly
> easily, if you know what to modify.

I'm impressed. I'll have a look at it on a vt100 when I'm at work.

> This was inspired by a guy with a piece of signature code to
> generate a full screen ascii mandelbrot.

Something like this?

/* o._.o  (C) 1996 Andrew Garrard, flu...@fluppet.demon.co.uk  o~\_/~o */
/* ((^)) */main(c){float x,y=2,X,Y,Z;for(;(x=-2)<(y-=.1);puts(""/* (/\ /\) */
/* O)_(O */ ))for(;(X=x+=.05)<2;c=printf("%c","  .-:|O8M#"[c])) /* (\@o@/) */
/* O/ \O */for(Y=y;X*X+Y*Y<4&&c++<8;Z=x+X*X-Y*Y,Y=y+2*X*Y,X=Z);}/* ~~~ ~~~ */


>Elijah
>------                                    /* cc -Dp=putchar signature.c -lm */
>main(){int i,j,k,l;char m[]=" .,:;i!1I]fJYVOQZXHKNSWM";for(i=-12;i<13;i++){for
>(k=0,l=7379124;k<6;k++)p((l&0xf)+(k?97:65)),l>>=4;for(j=-12;j<12;j++){for(k=(j
>+12?-12:-6);k<12;k++)((l=i*i+j*j+k*k)<144)?p(m[l=sqrt(l+2)*2]):p((l<25)?39:32)
>;(j!=11)?p('\n'):0;}p(27),p(91),p(72);}puts("Elijah:bgr...@ic.sunysb.edu");}

I thoroughly approve. (gcc signature.c -lm, btw).

-- 
main(c){float x,y=1,s,f;for(;-1<(y-=.1);puts(""))for(x=-2;2>(x+=.05);printf(
"%c","@#MHX]:' "[9>2*(f=4+x*x+y*y)?c=(9+(y+x*2-12)/f*(3-sqrt(9-2*f)))/6.7*16
:y>-.5?8:3*((c=8+x/y)&1^1&(c=400/y))+(s=y*(x*8+y*6+48)+72,s*s/676>8+12*y+y*y
*f?3:4)]));puts("(C) 1996 Andrew Garrard, flu...@fluppet.demon.co.uk");}

Related ASCII art in the Gallery

Explore these categories from our collection of 11,000+ artworks:

About this thread. These messages were posted publicly to the newsgroup rec.arts.ascii in 1996 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