Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Painter AI?
#1
It's 0330AM, and I've been fiddling with my dot AI life simulator thingy for almost 4 hours now.

An hour ago I encountered a bug, which generated quite interessting results, really interessting.

I've spent the last hour just looking at this thing.

Here it is:
http://quickhost.qbtk.com/download.php?id=298


ESC to quit
n to CLS (creates a new "canvas")


WARNING: You might get stuck watching it draw image after image after image...


The dots follow some simple rules, like, find dots that look simillar to you, and hang with them, if the dots path is blocked, it marks the spot with it's colour, leaving a trail.

The effect is... amazing, atleast I think so =)
Reply
#2
woah that looks awesome. It's like each color group is it's own civilization. some color groups are so small they get surround and snuffed out fast. the middle colors expand the fastest. they seem to collect stray dots.



very cool >^-^<
[Image: sig.php]
Back by popular demand!
I will byte and nibble you bit by bit until nothing remains but crumbs.
Reply
#3
Thats awesome, Z!re. It produces very beautiful paintings, they remind me a lot of Van Gogh's Painting style.
Reply
#4
Sweet!!!
Great stuff!!!
y smiley is 24 bit.
[Image: anya2.jpg]

Genso's Junkyard:
http://rel.betterwebber.com/
Reply
#5
To Z!re:

My, I must honestly confess to you myself that after I ran your program and saw it in action, the dots *do* have an AI of their own indeed, in that they know without a doubt how to draw an abstract impressionist-like painting in a really impressive way, with your view portion of Mode-13h taking somewhere around or less than 5-7 minutes to fill. You know what, I love fascinating stuff like the program presented in your thread here, and I must truly congratulate you on a job well done. EXCELLENT WORK!! d=Big Grin=b !!

Thank you so much now, and I wish you well, man! :king:



[Image: AAPname.gif]
- Adigun Azikiwe Polack
One of the Founders of “Aura Flow”
Continuing Developer of “Frantic Journey”
Current Developer of “Star Angelic Slugger”
Webmaster of the “AAP Official Projects Squad”



______________________________________
[Image: AAPOfficialProjectSquad-468x80Weblinker.jpg]
Be sure to please pay a visit to it! While you are there, watch for new and exciting stuff to happen anytime and even regularly, too!! Big Grin !

Also, time for my original 7-line QB text-based screensaver challenge is rapidly running out fast, so SEIZE THE MOMENT and show me your hottest coding there!! Come on now. And, at least seven of my amazing 7-line original creations that I done so far in QB are found within there, too. Enjoy them and learn from them!! Wink=b
url=http://dhost.hopto.org/aapproj/][Image: file.php?id=194][/url]
Your *official* home of the FreeBasic GFX Demo Central, now holding over 150 FB graphics demos so far!!! Big Grin !
Reply
#6
thats some sweet stuff Z!re Big Grin
Reply
#7
OMG that's amazing! :o :o :o !!!

It's ipnotic... those thingies seems ALIVE!

Looks like Mcell, an artificial life program i got...

Very good job Z!re ! Can you give the .bas of this? Pleeeease!
othing to read...
Reply
#8
The bas has been modified =(

And no longer produce the nice paintings, but here it is anyways:
[syntax="QBASIC"]DEFINT A-Z
'$DYNAMIC
TYPE dottype
x AS SINGLE
y AS SINGLE
vx AS SINGLE
vy AS SINGLE
age AS SINGLE
sex AS INTEGER
str AS INTEGER
dxt AS INTEGER
vit AS INTEGER
END TYPE
DIM Dot(2048) AS dottype

CLS : SCREEN 13

RANDOMIZE TIMER

numDots = 127
FOR a = 0 TO numDots
Dot(a).x = 320 * RND
Dot(a).y = 200 * RND
Dot(a).vx = 0
Dot(a).vy = 0
Dot(a).age = 5 * RND
Dot(a).sex = CINT(RND)
Dot(a).str = 3 * RND
Dot(a).dxt = 3 * RND
Dot(a).vit = 3 * RND
NEXT

DO
LINE (20, 20)-(300, 180), 16, B
FOR a = 0 TO numDots
med1! = (Dot(a).str + Dot(a).dxt * 4 + Dot(a).vit * 16) / 10
Dot(a).vx = 0
Dot(a).vx = 0
FOR B = 0 TO numDots
IF B <> a THEN
med2! = (Dot(B).str + Dot(B).dxt * 4 + Dot(B).vit * 16) / 10
IF CINT(med1!) = CINT(med2!) THEN
IF Dot(a).x < Dot(B).x THEN Dot(a).vx = 1
IF Dot(a).x > Dot(B).x THEN Dot(a).vx = -1
IF Dot(a).y < Dot(B).y THEN Dot(a).vy = 1
IF Dot(a).y > Dot(B).y THEN Dot(a).vy = -1
'IF CINT(5 * RND) = 1 THEN EXIT FOR
END IF
END IF
NEXT

xb = 0: yb = 0
IF POINT(Dot(a).x + Dot(a).vx, Dot(a).y) = 0 THEN
PSET (Dot(a).x, Dot(a).y), 0
Dot(a).x = Dot(a).x + Dot(a).vx
ELSE
xb = 1
END IF
IF POINT(Dot(a).x, Dot(a).y + Dot(a).vy) = 0 THEN
PSET (Dot(a).x, Dot(a).y), 0
Dot(a).y = Dot(a).y + Dot(a).vy
ELSE
yb = 1
END IF
IF xb + yb = 2 THEN
IF POINT(Dot(a).x, Dot(a).y) <> 0 THEN
FOR f = 1 TO 200
l4 = POINT(Dot(a).x - f, Dot(a).y)
l7 = POINT(Dot(a).x - f, Dot(a).y - f)
l8 = POINT(Dot(a).x, Dot(a).y - f)
l9 = POINT(Dot(a).x + f, Dot(a).y - f)
l6 = POINT(Dot(a).x + f, Dot(a).y)
l3 = POINT(Dot(a).x + f, Dot(a).y + f)
l2 = POINT(Dot(a).x, Dot(a).y + f)
l1 = POINT(Dot(a).x - f, Dot(a).y + f)
dr = INT(8 * RND)
IF dr = 0 THEN
IF l4 = 0 THEN Dot(a).x = Dot(a).x - f: Dot(a).y = Dot(a).y: EXIT FOR
IF l7 = 0 THEN Dot(a).x = Dot(a).x - f: Dot(a).y = Dot(a).y - f: EXIT FOR
IF l8 = 0 THEN Dot(a).x = Dot(a).x: Dot(a).y = Dot(a).y - f: EXIT FOR
IF l9 = 0 THEN Dot(a).x = Dot(a).x + f: Dot(a).y = Dot(a).y - f: EXIT FOR
IF l6 = 0 THEN Dot(a).x = Dot(a).x + f: Dot(a).y = Dot(a).y: EXIT FOR
IF l3 = 0 THEN Dot(a).x = Dot(a).x + f: Dot(a).y = Dot(a).y + f: EXIT FOR
IF l2 = 0 THEN Dot(a).x = Dot(a).x: Dot(a).y = Dot(a).y + f: EXIT FOR
IF l1 = 0 THEN Dot(a).x = Dot(a).x - f: Dot(a).y = Dot(a).y + f: EXIT FOR
ELSEIF dr = 1 THEN
IF l7 = 0 THEN Dot(a).x = Dot(a).x - f: Dot(a).y = Dot(a).y - f: EXIT FOR
IF l8 = 0 THEN Dot(a).x = Dot(a).x: Dot(a).y = Dot(a).y - f: EXIT FOR
IF l9 = 0 THEN Dot(a).x = Dot(a).x + f: Dot(a).y = Dot(a).y - f: EXIT FOR
IF l6 = 0 THEN Dot(a).x = Dot(a).x + f: Dot(a).y = Dot(a).y: EXIT FOR
IF l3 = 0 THEN Dot(a).x = Dot(a).x + f: Dot(a).y = Dot(a).y + f: EXIT FOR
IF l2 = 0 THEN Dot(a).x = Dot(a).x: Dot(a).y = Dot(a).y + f: EXIT FOR
IF l1 = 0 THEN Dot(a).x = Dot(a).x - f: Dot(a).y = Dot(a).y + f: EXIT FOR
IF l4 = 0 THEN Dot(a).x = Dot(a).x - f: Dot(a).y = Dot(a).y: EXIT FOR
ELSEIF dr = 2 THEN
IF l8 = 0 THEN Dot(a).x = Dot(a).x: Dot(a).y = Dot(a).y - f: EXIT FOR
IF l9 = 0 THEN Dot(a).x = Dot(a).x + f: Dot(a).y = Dot(a).y - f: EXIT FOR
IF l6 = 0 THEN Dot(a).x = Dot(a).x + f: Dot(a).y = Dot(a).y: EXIT FOR
IF l3 = 0 THEN Dot(a).x = Dot(a).x + f: Dot(a).y = Dot(a).y + f: EXIT FOR
IF l2 = 0 THEN Dot(a).x = Dot(a).x: Dot(a).y = Dot(a).y + f: EXIT FOR
IF l1 = 0 THEN Dot(a).x = Dot(a).x - f: Dot(a).y = Dot(a).y + f: EXIT FOR
IF l4 = 0 THEN Dot(a).x = Dot(a).x - f: Dot(a).y = Dot(a).y: EXIT FOR
IF l7 = 0 THEN Dot(a).x = Dot(a).x - f: Dot(a).y = Dot(a).y - f: EXIT FOR
ELSEIF dr = 3 THEN
IF l9 = 0 THEN Dot(a).x = Dot(a).x + f: Dot(a).y = Dot(a).y - f: EXIT FOR
IF l6 = 0 THEN Dot(a).x = Dot(a).x + f: Dot(a).y = Dot(a).y: EXIT FOR
IF l3 = 0 THEN Dot(a).x = Dot(a).x + f: Dot(a).y = Dot(a).y + f: EXIT FOR
IF l2 = 0 THEN Dot(a).x = Dot(a).x: Dot(a).y = Dot(a).y + f: EXIT FOR
IF l1 = 0 THEN Dot(a).x = Dot(a).x - f: Dot(a).y = Dot(a).y + f: EXIT FOR
IF l4 = 0 THEN Dot(a).x = Dot(a).x - f: Dot(a).y = Dot(a).y: EXIT FOR
IF l7 = 0 THEN Dot(a).x = Dot(a).x - f: Dot(a).y = Dot(a).y - f: EXIT FOR
IF l8 = 0 THEN Dot(a).x = Dot(a).x: Dot(a).y = Dot(a).y - f: EXIT FOR
ELSEIF dr = 4 THEN
IF l6 = 0 THEN Dot(a).x = Dot(a).x + f: Dot(a).y = Dot(a).y: EXIT FOR
IF l3 = 0 THEN Dot(a).x = Dot(a).x + f: Dot(a).y = Dot(a).y + f: EXIT FOR
IF l2 = 0 THEN Dot(a).x = Dot(a).x: Dot(a).y = Dot(a).y + f: EXIT FOR
IF l1 = 0 THEN Dot(a).x = Dot(a).x - f: Dot(a).y = Dot(a).y + f: EXIT FOR
IF l4 = 0 THEN Dot(a).x = Dot(a).x - f: Dot(a).y = Dot(a).y: EXIT FOR
IF l7 = 0 THEN Dot(a).x = Dot(a).x - f: Dot(a).y = Dot(a).y - f: EXIT FOR
IF l8 = 0 THEN Dot(a).x = Dot(a).x: Dot(a).y = Dot(a).y - f: EXIT FOR
IF l9 = 0 THEN Dot(a).x = Dot(a).x + f: Dot(a).y = Dot(a).y - f: EXIT FOR
ELSEIF dr = 5 THEN
IF l3 = 0 THEN Dot(a).x = Dot(a).x + f: Dot(a).y = Dot(a).y + f: EXIT FOR
IF l2 = 0 THEN Dot(a).x = Dot(a).x: Dot(a).y = Dot(a).y + f: EXIT FOR
IF l1 = 0 THEN Dot(a).x = Dot(a).x - f: Dot(a).y = Dot(a).y + f: EXIT FOR
IF l4 = 0 THEN Dot(a).x = Dot(a).x - f: Dot(a).y = Dot(a).y: EXIT FOR
IF l7 = 0 THEN Dot(a).x = Dot(a).x - f: Dot(a).y = Dot(a).y - f: EXIT FOR
IF l8 = 0 THEN Dot(a).x = Dot(a).x: Dot(a).y = Dot(a).y - f: EXIT FOR
IF l9 = 0 THEN Dot(a).x = Dot(a).x + f: Dot(a).y = Dot(a).y - f: EXIT FOR
IF l6 = 0 THEN Dot(a).x = Dot(a).x + f: Dot(a).y = Dot(a).y: EXIT FOR
ELSEIF dr = 6 THEN
IF l2 = 0 THEN Dot(a).x = Dot(a).x: Dot(a).y = Dot(a).y + f: EXIT FOR
IF l1 = 0 THEN Dot(a).x = Dot(a).x - f: Dot(a).y = Dot(a).y + f: EXIT FOR
IF l4 = 0 THEN Dot(a).x = Dot(a).x - f: Dot(a).y = Dot(a).y: EXIT FOR
IF l7 = 0 THEN Dot(a).x = Dot(a).x - f: Dot(a).y = Dot(a).y - f: EXIT FOR
IF l8 = 0 THEN Dot(a).x = Dot(a).x: Dot(a).y = Dot(a).y - f: EXIT FOR
IF l9 = 0 THEN Dot(a).x = Dot(a).x + f: Dot(a).y = Dot(a).y - f: EXIT FOR
IF l6 = 0 THEN Dot(a).x = Dot(a).x + f: Dot(a).y = Dot(a).y: EXIT FOR
IF l3 = 0 THEN Dot(a).x = Dot(a).x + f: Dot(a).y = Dot(a).y + f: EXIT FOR
ELSEIF dr = 7 THEN
IF l1 = 0 THEN Dot(a).x = Dot(a).x - f: Dot(a).y = Dot(a).y + f: EXIT FOR
IF l4 = 0 THEN Dot(a).x = Dot(a).x - f: Dot(a).y = Dot(a).y: EXIT FOR
IF l7 = 0 THEN Dot(a).x = Dot(a).x - f: Dot(a).y = Dot(a).y - f: EXIT FOR
IF l8 = 0 THEN Dot(a).x = Dot(a).x: Dot(a).y = Dot(a).y - f: EXIT FOR
IF l9 = 0 THEN Dot(a).x = Dot(a).x + f: Dot(a).y = Dot(a).y - f: EXIT FOR
IF l6 = 0 THEN Dot(a).x = Dot(a).x + f: Dot(a).y = Dot(a).y: EXIT FOR
IF l3 = 0 THEN Dot(a).x = Dot(a).x + f: Dot(a).y = Dot(a).y + f: EXIT FOR
IF l2 = 0 THEN Dot(a).x = Dot(a).x: Dot(a).y = Dot(a).y + f: EXIT FOR
END IF

NEXT
ELSE
'numDots = numDots + 1
END IF
END IF

IF Dot(a).x <= 20 OR Dot(a).x >= 300 THEN Dot(a).vx = 0: outx = -1 ELSE outx = 0
IF Dot(a).y <= 20 OR Dot(a).y >= 180 THEN Dot(a).vy = 0: outy = -1 ELSE outy = 0
IF Dot(a).x < 20 THEN Dot(a).x = 20
IF Dot(a).x > 300 THEN Dot(a).x = 300
IF Dot(a).y < 20 THEN Dot(a).y = 20
IF Dot(a).y > 180 THEN Dot(a).y = 180

IF outx OR outy THEN dout = dout + 1

PSET (Dot(a).x, Dot(a).y), Dot(a).str + Dot(a).dxt * 4 + Dot(a).vit * 16
NEXT

k$ = INKEY$
IF k$ = "n" THEN CLS
IF dout >= numDots / 1.05 THEN dnew = dnew + 1
IF dnew = 3 THEN
LINE (20, 20)-(300, 180), 16, B
t! = TIMER + 3: DO: k$ = INKEY$: LOOP UNTIL TIMER >= t! OR k$ <> ""
CLS : dnew = 0
END IF
dout = 0
LOOP UNTIL k$ = CHR$(27)[/syntax]


It's a mess, most of it has just been added for fun, when I found the painting bug, which is located where it checks if sides are blocked or not.

This version is a bit different, a bit faster, and it auto clears if the "canvas" is filled.
Reply
#9
Ok, no worry. Tanks a lot Z!re

Only a question... How you can write all that color coded text?
It will be nice to use it for prog. A color for command, another one for numeric values... Got it?

Tnx again...
othing to read...
Reply
#10
Color coded text on this forum? Wink
Code:
[syntax="QBASIC"]Type your code here[/syntax]
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)