Biography

generative art
definitions


DOWNLOAD YOUR
GREETINGS CARD

 

Home

SLOVENSKO
ABOUT ME
Biography
Statement

 History
see more on google
Contact
Submit comment
Read comments
DOWNLOADS
download GA programs
GALLERIES
ga31    ga32    ga33
ga28    ga29    ga30
ga25    ga26    ga27
ga22    ga23    ga24
ga19    ga20    ga21
ga16    ga17    ga18
ga13    ga14    ga15
ga10    ga11    ga12
ga07    ga08    ga09
ga04    ga05    ga06
ga01    ga02    ga03
LINKS
GA Conferences
more GA links
other links
banner's page
 
list of GA artists
HOW TO BUY
buying artworks  
acquisto quadri
 
VISITORS
You are visitor
 number:  154503
since oct/2002
 
   
 
 
 
 

SYMMETRIC IMAGE 01 - program symmetry05

        

Image properties: Picture box Picture1, Cartesian plain: x from –3 to +3; y from –3 to +3; dimension: width 500 pixels, height 500 pixels, command button for nex image

Result description: symmetrical image, curve-irregular shapes, iridescent colors
 
Basic concept: polar coordinates (radius r and angle fi) of the current pixel and some cycle-related random values used as the only variables to define the pixel color. Image forms and shapes are the consequence of color distribution (algorithmic programming approach).

Algorithm description: At the beginning a defined number of random values are generated which are later used as auxiliary constants. Then the program calculates polar coordinates for each pixel and uses them together with previous generated constants to calculate the RGB color components. There are two types of GRB components used: random defined in the beginning of each cycle (k1, k2, k3) and mathematically calculated (re, gr, bl). Image area is processing by columns from left to right.

Download and run exe version

Visual Basic source code

Private Sub Command1_Click()
    Call draw
End Sub

Private Sub Form_Load()
    Form1.Show: Randomize Timer
    Call draw
End Sub

Private Sub draw()
    Randomize Timer
    On Error Resume Next: Cls
    n1 = 5 + Rnd * 5: n2 = 5 + Rnd * 5: n3 = 5 + Rnd * 5
    f1 = Int(2 + Rnd * 10): f2 = Int(2 + Rnd * 10): f3 = Int(2 + Rnd * 10)
    k1 = Rnd * 256: k2 = Rnd * 256: k3 = Rnd * 256
    typ = Int(1 + Rnd * 7)
    For i = 0 To 500: For j = 0 To 500
    x = (i - 500 / 2) / (500 / 6): y = (500 / 2 - j) / (500 / 6)
    r = Sqr(x * x + y * y): fi = Atn(y / x)
    re = k1 * ((n1 + Sin(n1 * r)) + (n2 + Cos(2 * f1 * fi))) Mod 256
    gr = k2 * ((n2 + Cos(n2 * r)) + (n3 + Sin(2 * f2 * fi))) Mod 256
    bl = k3 * ((n3 + Sin(n3 * r)) + (n1 + Cos(2 * f3 * fi))) Mod 256
    If typ = 1 Then Picture1.PSet (i, j), RGB(re, gr, bl)
    If typ = 2 Then Picture1.PSet (i, j), RGB(k1, gr, bl)
    If typ = 3 Then Picture1.PSet (i, j), RGB(re, k2, bl)
    If typ = 4 Then Picture1.PSet (i, j), RGB(re, gr, k3)
    If typ = 5 Then Picture1.PSet (i, j), RGB(k1, k2, bl)
    If typ = 6 Then Picture1.PSet (i, j), RGB(re, k2, k3)
    If typ = 7 Then Picture1.PSet (i, j), RGB(k1, gr, k3)
    Next j: Next i
End Sub