Sierpinski 29bytes
[nfo]
|
||||||||
---|---|---|---|---|---|---|---|---|
|
||||||||
|
popularity : 59% |
|||||||
alltime top: #11947 |
|
|||||||
added on the 2002-01-08 11:22:49 by Optimus |
popularity helper
comments
I decided to add this, since several people asked for it. I don't know which is the coder of this tiny thing. I had a smaller 21bytes version somewhere, but I lost it. I would love to have it from someone out there!
rulez added on the 2002-01-08 11:25:02 by Optimus
I think it was ryg^fr who did it.
really a nice thingie indeed :)
really a nice thingie indeed :)
nope, my version is a lot smaller :)
i'll post it once i get home...
i'll post it once i get home...
way 1: buf[y*pitch+x]=(x&y)==0;
way 2: t[rnd%3]+=size,plot(t[0]>>=1,t[1]>>=1);
aint this pretty trivial stuff?
way 2: t[rnd%3]+=size,plot(t[0]>>=1,t[1]>>=1);
aint this pretty trivial stuff?
great!
_216_: yes it is, but doing it in less 32bytes isn't
_216_: yes it is, but doing it in less 32bytes isn't
way 3: vm[320*199+160]=1,vm[i]=vm[i+321]^vm[i+319].
gosh. i'm impressed.
these algos, like, sound so much more than 5-10 instructions.
gosh. i'm impressed.
these algos, like, sound so much more than 5-10 instructions.
way #3 seems really short ( and clever ) !!
I'll try that tonight
I'll try that tonight
Here is a 22 bytes version. It's not the same sierpinski. It does not return to textmode. I suck. ;-)
org 100h
lds bp,[bx]
mov al,13h
int 10h
mov si,2080
again: xor al,[si]
mov [si+319],al
dec si
lodsw
jns again
int 16h
ret
org 100h
lds bp,[bx]
mov al,13h
int 10h
mov si,2080
again: xor al,[si]
mov [si+319],al
dec si
lodsw
jns again
int 16h
ret
21 bytes version. Replace "lds bp,[bx]" by "push word 0A3E2h pop ds" and drop "mov si,2080".
I've got this on my TI-86, it takes over half an hour to draw it on the calc :)
then the author seemingly used an IFS :)
cool :)
Best Sierpinski.
Smallest Sierpinski (in comments).
.
submit changes
if this prod is a fake, some info is false or the download link is broken,
do not post about it in the comments, it will get lost.
instead, click here !