3 by 3 Pixel Patterns

If you have a design you're proud of, share the cfdg file here. It's also a good place to ask for feedback and collaborate.

Moderators: MtnViewJohn, chris, mtnviewmark

Post Reply
designmc
Posts: 3
Joined: Fri Jul 08, 2005 7:27 am

3 by 3 Pixel Patterns

Post by designmc »

Here's one that makes a surprising variety of shapes:

Code: Select all

startshape c_unit

rule c_unit {
	b_unit{}
	b_unit {x 6}
	b_unit {x 12}
	b_unit {x 18}
	b_unit {x 24}
}
rule c_unit 0.1 {}

rule b_unit {
	b_row {}
	b_row {y 1}
	b_row {y 2}
	b_row {y 3}
	b_row {y 4}
	b_row {y 5}
}

rule b_row {
	b_cell {}
	b_cell {x 1}
	b_cell {x 2}	   
	b_cell {x 3}
	b_cell {x 4}
	b_cell {x 5}
}

rule b_cell {
	a_unit {s 0.1}
}

// -------------------------

rule a_unit {
	a_row {}
	a_row {y+1}
	a_row {y+2}
}

rule a_row {
	a_cell {}
	a_cell {x+1}
	a_cell {x+2}	   
}

rule a_cell {
	//SQUARE {b 0.8}
}
rule a_cell {
	SQUARE {}
}
Be sure to post any variations. One tip: you can use the a_unit in your cfdg files instead of a pixel for some interesting results.

odinsdream
Posts: 12
Joined: Sat Jul 09, 2005 2:18 pm

Post by odinsdream »

I really like this code. Thanks!

Leech
Posts: 2
Joined: Tue Jul 12, 2005 1:59 pm
Location: Argentina
Contact:

Post by Leech »

great! i love this patterns, i did a little modifications for fun:

Code: Select all

startshape c_unit

rule c_unit {
   b_unit{}
   b_unit {x 6}
   b_unit {x 12}
   b_unit {x 18}
   b_unit {x 24}
}
rule c_unit 0.1 {}

rule b_unit {
   b_row {}
   b_row {y 1}
   b_row {y 2}
   b_row {y 3}
   b_row {y 4}
   b_row {y 5}
}

rule b_row {
   b_cell {}
   b_cell {x 1}
   b_cell {x 2}      
   b_cell {x 3}
   b_cell {x 4}
   b_cell {x 5}
}

rule b_cell {
   a_unit {s 0.3}
}

// -------------------------

rule a_unit {
   a_row {}
   a_row {y+1}
   a_row {y+2}
}

rule a_row {
   a_cell {}
   a_cell {x+1}
   a_cell {x+2}      
}

rule a_cell {
   //SQUARE {b 0.8}
}
rule a_cell {
   SQUARE {}
} 
and:

Code: Select all

startshape c_unit

rule c_unit {
   b_unit{}
   b_unit {x 6}
   b_unit {x 12}
   b_unit {x 18}
   b_unit {x 24}
}
rule c_unit 0.1 {}

rule b_unit {
   b_row {}
   b_row {y 1}
   b_row {y 2}
   b_row {y 3}
   b_row {y 4}
   b_row {y 5}
}

rule b_row {
   b_cell {}
   b_cell {x 1}
   b_cell {x 2}      
   b_cell {x 3}
   b_cell {x 4}
   b_cell {x 5}
}

rule b_cell {
   a_unit {s 0.5}
}

// -------------------------

rule a_unit {
   a_row {}
   a_row {y+1}
   a_row {y+2}
}

rule a_row {
   a_cell {}
   a_cell {x+1}
   a_cell {x+2}      
}

rule a_cell {
   //SQUARE {b 0.8}
}
rule a_cell {
   SQUARE {}
} 

Post Reply