ep7 style generative art + source code | xltronic messageboard
 
You are not logged in!

F.A.Q
Log in

Register
  
 
  
 
Now online (1)
big
...and 609 guests

Last 5 registered
Oplandisks
nothingstar
N_loop
yipe
foxtrotromeo

Browse members...
  
 
Members 8025
Messages 2614128
Today 0
Topics 127542
  
 
Messageboard index
ep7 style generative art + source code
 

offline jkd from Twitch City (Canada) on 2006-12-15 12:43 [#02017779]
Points: 1138 Status: Lurker



Generative Art

Making pretty pictures with code is fun. Try refreshing for
a different picture every time.

I've thought about trying to make some generative music, but
it's a bit trickier to do. I made a little tune out of a
strange attractor once that was pretty neat, but it just
generated midi notes which is pretty limiting.

Has anyone else here experimented with generative graphics
or music?



 

offline Taxidermist from Black Grass on 2006-12-15 12:46 [#02017781]
Points: 9958 Status: Lurker



Its devils music!!!

Proof:


 

offline Taxidermist from Black Grass on 2006-12-15 12:47 [#02017782]
Points: 9958 Status: Lurker



>ahem<

Proof:


Attached picture

 

offline jkd from Twitch City (Canada) on 2006-12-15 12:48 [#02017784]
Points: 1138 Status: Lurker | Followup to Taxidermist: #02017781



Sorry, what?



 

offline jkd from Twitch City (Canada) on 2006-12-15 12:48 [#02017785]
Points: 1138 Status: Lurker | Followup to Taxidermist: #02017782



Oooh. Nice!


 

offline cygnus from nowhere and everyplace on 2006-12-15 12:54 [#02017788]
Points: 11920 Status: Regular



its rare that you can get one that's comparable to ep7s
cover but yeah when you do it's pretty ill, yeah. thanks for
the link



 

offline jkd from Twitch City (Canada) on 2006-12-15 12:57 [#02017789]
Points: 1138 Status: Lurker | Followup to cygnus: #02017788



Thanks, yeah, I think I came somewhat close. The code isn't
too crazy either. That's the cool thing about generative
art: pretty simple rules can produce pretty rad results.



 

offline cygnus from nowhere and everyplace on 2006-12-15 13:00 [#02017790]
Points: 11920 Status: Regular | Followup to jkd: #02017789



would it be possible to modify the code so that the output
was higher rez?


 

offline cygnus from nowhere and everyplace on 2006-12-15 13:09 [#02017792]
Points: 11920 Status: Regular



yeah the main one (album covr) is menacing -- like some
weird fucked up layer of trees or some kind of nebula, i
love some of these random ones. i think it relates to the
music, as far as , making curves out of straight lines, 3d
shapes out of 1d shapes,


 

offline jkd from Twitch City (Canada) on 2006-12-15 13:10 [#02017793]
Points: 1138 Status: Lurker



The applet is just using the built-in Java line drawing
functions. I'm guessing if you want it higher res, that you
want the lines to be thicker and anti-aliased, right? I'm
not sure if there is a way to do nice-looking thick lines in
Java without coding your own.

Probably the best way to make a high-res version would be to
rewrite it in ActionScript in Flash, using the nice
vector-based lines. I don't know AS myself, and I don't have
Flash, so I can't help you out. Feel free to use my java
source however you like, though.



 

offline w M w from London (United Kingdom) on 2006-12-15 13:13 [#02017794]
Points: 21454 Status: Regular



You made this right? It's very cool (refreshing ep7 one so
far). You used Java right (I had to install missing java
plugins for it to work).

(basic algorithm = start at random spot (in the general
center) and write a line in a random direction for random
lengths, randomly changing direction slightly?) Is it fixed
how many times its done, like 100 random ziggy lines per
each?

I'm a novice, right now I'm trying to make something like
this (using text characters as pseudo geometric output):

\\\
\-\
|||

////
/--/
|--|
\\\\

(keeps outputting squares like that, only each next square
varies in length and height (independently and out of
phase), and also each next line alternates from /|\|
characters at a decreasing/increasing rate, and possibly
wall thickness of squares could change somehow too.) = gay


 

offline w M w from London (United Kingdom) on 2006-12-15 13:24 [#02017803]
Points: 21454 Status: Regular



sketch is cooler. Seems the same but more frequent random
direction changing, with forks, and more random number of
total lines created per program.

Randomness like this definately needs to be a much larger
part of videogames I think.


 

offline jkd from Twitch City (Canada) on 2006-12-15 13:44 [#02017813]
Points: 1138 Status: Lurker



# merry xmas w M w
# h0h 0h0

$DIR_LEFT=0;
$DIR_STRAIGHT1=1;
$DIR_RIGHT=2;
$DIR_STRAIGHT2=3;
$DIR_COUNT=4;

$dir = $DIR_LEFT;
$lineCount = 0;
$numLinesBeforeDirectionChange = 3;

sub RandomBetween($$)
{
my $min = shift;
my $max = shift;
return int(rand($max - $min + 1)) + $min;
}

sub PrintBar()
{
if ($dir == $DIR_LEFT)
{
print "/";
}
elsif ($dir == $DIR_RIGHT)
{
print "\\";
}
else
{
print "|";
}
}

sub IncLine()
{
$lineCount++;
if ($lineCount >= $numLinesBeforeDirectionChange)
{
$dir = ($dir + 1) % $DIR_COUNT;
$lineCount = 0;
}
}

sub MakeSquare()
{
my $width = RandomBetween(3, 10);
my $height = RandomBetween(3, 8);
$numLinesBeforeDirectionChange = RandomBetween(1, 5);

# top line
for (my $i = 0; $i < $width; $i++)
{
PrintBar();
}
print "\n";
IncLine();

# middle lines
for (my $j = 0; $j < $height - 2; $j++)
{
PrintBar();
for (my $i = 0; $i < $width - 2; $i++)
{
print "-";
}
PrintBar();
print "\n";
IncLine();
}

# bottom line
for (my $i = 0; $i < $width; $i++)
{
PrintBar();
}
IncLine();
print "\n";
print "\n";
}

my $numBoxes = RandomBetween(5, 10);
for (my $i = 0; $i < $numBoxes; $i++)
{
MakeSquare();
}



 

offline jkd from Twitch City (Canada) on 2006-12-15 13:48 [#02017814]
Points: 1138 Status: Lurker



Indenting got fucked. Download here:
wmwsq.pl


 

offline mappatazee from ¨y¨z¨| (Burkina Faso) on 2006-12-15 13:48 [#02017815]
Points: 14294 Status: Lurker



There used to be an applet on warprecords.com for the ep7
art, maybe it's still there but I don't know where it was.


 

offline mappatazee from ¨y¨z¨| (Burkina Faso) on 2006-12-15 13:53 [#02017817]
Points: 14294 Status: Lurker



oh yeah
http://www.warprecords.com/ography/release.php?cat=WAPEP7
Click on 'microsite'

Controls are
1-2-3-4-5 changes zoom
arrow keys move around.


 

offline w M w from London (United Kingdom) on 2006-12-15 13:55 [#02017818]
Points: 21454 Status: Regular | Followup to jkd: #02017813



I'm sorry, I forgot to say I use python. Is this java code
or something? Hopefully making that for me didn't take too
much time.

Whatever it is, it seems like you can just control pixels
with code right off the bat. With python as far as I know,
you have to import some 'pygame' or similar library and all
this shit. (but chances are good that I'm too stupid to
figure it out otherwise)


 

offline w M w from London (United Kingdom) on 2006-12-15 14:00 [#02017820]
Points: 21454 Status: Regular | Followup to jkd: #02017813



wait.. is this for the square program i just described or
your ep7 one?
i can read most of it, if it's mine can you somehow make it
a program I can see like the ep7 one?


 

offline w M w from London (United Kingdom) on 2006-12-15 14:01 [#02017821]
Points: 21454 Status: Regular | Followup to mappatazee: #02017817



For me it says (but chances are good it's my own shit system
at fault):

Could't execute query:

select distinct mc_master_cat_no from master_cats where
mc_sort_order < and mc_sort_label = 'warp' and mc_sort_type
= '' order by mc_sort_order desc limit 0,1.

1064: You have an error in your SQL syntax. Check the manual
that corresponds to your MySQL server version for the right
syntax to use near 'and mc_sort_label = 'warp' and
mc_sort_type = '' order by mc



 

offline jkd from Twitch City (Canada) on 2006-12-15 14:08 [#02017825]
Points: 1138 Status: Lurker | Followup to w M w: #02017820



It's perl code. You need to have perl installed and (from
the command line) do this:

C:\wmwsq> perl wmwsq.pl



 

offline jkd from Twitch City (Canada) on 2006-12-15 14:28 [#02017836]
Points: 1138 Status: Lurker | Followup to w M w: #02017820



I converted it to Python : wmwsq.py

Let me know if you have any questions about how it works, or
problems running it.



 

offline Ezkerraldean from the lowest common denominator (United Kingdom) on 2006-12-15 14:30 [#02017838]
Points: 5733 Status: Addict



lush, innit. i love ae art.


 

offline jkd from Twitch City (Canada) on 2006-12-15 14:32 [#02017841]
Points: 1138 Status: Lurker | Followup to mappatazee: #02017817



Fixed link to ep7 (click microsite in the top right)

LAZY_TITLE



 

offline w M w from London (United Kingdom) on 2006-12-15 14:37 [#02017843]
Points: 21454 Status: Regular



Ha ha, cool. I envy your ability to create stuff so quickly
and easily and on multiple platforms to boot. I was going to
have it run forever and be less chunky/random. So it'd be
more like pseudoanimation as it spits out each line
(gradually gets longer/less long, and gradually gets
taller/shorer (both out of phase)). Pretty wack but just
arbitrary thing I made up to practice since I suck. Plus the
'animation' of tallness wouldn't work well (length would
because it spits out fast output as horizontal lines)

///
/-/
/-/
|-|
|-|
|-|
\\\

\\\\\\\\\
\-------\
\-------\
\-------\
|-------|
|||||||||

||||||
|----|
|----|
/----/
/----/
//////

//////////
|--------|
|--------|
|--------|
\--------\
\\\\\\\\\\

\\\\\\\
|-----|
///////

|||||||||
|-------|
|-------|
\-------\
\\\\\\\\\

\\\\\\
|----|
|----|
|----|
/----/
//////


 

offline obara from Utrecht on 2006-12-15 14:38 [#02017844]
Points: 19377 Status: Regular



fav+


 

offline w M w from London (United Kingdom) on 2006-12-15 14:43 [#02017849]
Points: 21454 Status: Regular | Followup to jkd: #02017841



This sounds exactly like a listed item that would apear in a
readme of a new program version. 'fixed bug here'
Programmers put their programming paradigm into stuff they
write all the time, like one of the essays here:
http://www.paulgraham.com
forget which, he said something like 'the set of all' in a
way it wouldn't normally be used by non programming english
speakers, bla bla bla


 

offline jkd from Twitch City (Canada) on 2006-12-15 14:49 [#02017851]
Points: 1138 Status: Lurker | Followup to w M w: #02017843



Yeah, well I've been programming for 16 years or so. It can
be pretty slow and painful, but it's awesome to have the
power to create pretty much anything you can imagine by
typing in cryptic nonsense into a computer.

Python is a good language to start with. Try playing around
with some text output for a while, and you'll learn a lot.

Then I'd suggest maybe learning ActionScript (which is the
scripting language in Flash) if you want to create
programmatic animations.

My friend tells me you can use MTASC to compile
ActionScript, and you don't even need the expensive Flash
editor. (Of course, the editor would be nice if you want to
do some hand-made animations as well.) I don't have any
experience with this myself, but I'm planning on having a
look at some point.



 

offline w M w from London (United Kingdom) on 2006-12-15 14:58 [#02017855]
Points: 21454 Status: Regular



hmm, actionscript sounds interesting, thanks.


 

offline jkd from Twitch City (Canada) on 2006-12-15 15:49 [#02017883]
Points: 1138 Status: Lurker



Update:

I learned a bit of ActionScript by porting my ep7 applet to
Flash:

genart

Cygnus: the Flash version is higher res.



 

offline w M w from London (United Kingdom) on 2006-12-15 16:14 [#02017888]
Points: 21454 Status: Regular | Followup to jkd: #02017883



ha ha, not quite the same ported (it spins around more, but
is actually better looking that way).

Definitions/functions mess me up in python. It's hard for me
to intuitively make them from scratch so they'll work with
eachother and I know what's happening.
If you happen to have more fairly simple programs in python
lying around, NOT object oriented, I might be able to study
it.


 

offline futureimage from buy FIR from Juno (United Kingdom) on 2006-12-16 02:16 [#02018032]
Points: 6427 Status: Lurker



hehe, nice.


 

offline Ranjiv from Nor Cal (United States) on 2006-12-16 20:43 [#02018372]
Points: 68 Status: Lurker



SCv.1


 


Messageboard index