X/Y Mirroring

If you're having trouble using Context Free or don't understand the language, ask for help here.

Moderators: MtnViewJohn, chris, mtnviewmark

Post Reply
loadus
Posts: 1
Joined: Thu Aug 27, 2009 2:05 am

X/Y Mirroring

Post by loadus »

Helloes to CF creators and users!

I've been working on a Crop Circle Generator, but I can't make anything _insane_ because I have no idea how to do mirroring.

I wish to create a mad circle-with-in-a-circle mess, then mirror it on X or Y so it would look symmetrical. So far I've made it using objects that are symmetrical:

Code: Select all

startshape CROPCIRCLE

background { a -1 }

rule CROPCIRCLE {

			MUTATE{}
}

rule MUTATE {
	
			CONSTRUCT {}
			CONSTRUCT { y -1 }
			CONSTRUCT { b 0 y 2 }
			CONSTRUCT { b 0 y 1 }
}

//----------------- CONSTRUCT ----------------------------

rule CREATECIRCLE 50 {}

rule CREATECIRCLE {

			BASIC {}
}

rule CREATECIRCLE {

			BASIC { x -2.66 }
			BASIC { x 2.66 }


}

rule CREATECIRCLE {

			BASIC { s 1.5 y -2 }

}

rule CREATECIRCLE {

			BASIC { s 2 y 2 }

}

rule CREATECIRCLE {

			BASIC { s 0.5 }
}

rule CREATECIRCLE {

			BASIC { s 0.5 x -1 }
			BASIC { s 0.5 x 1 }


}

rule CREATECIRCLE {

			BASIC { s 0.5 y -1 }
			BASIC { s 0.5 y 1 }

}

rule CREATECIRCLE {

			BASIC { s 0.5 y -1 }

}

rule CREATECIRCLE {

			BASIC { s 0.5 y 1 }

}

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

rule CREATECIRCLE 20{

			BASIC {}
			CIRCLE {s 1 y -1}
}

rule CREATECIRCLE {

			BASIC { s 2 x -2.66 }
			BASIC { s 2 x 2.66 }
			CIRCLE {s 4 y -2}
			CIRCLE {s 4 y 2}


}

rule CREATECIRCLE {

			BASIC { y -2 }
			CIRCLE {s 4 y -1}

}

rule CREATECIRCLE {

			BASIC { y 2 }
			CIRCLE {s 5 y -3}

}

rule CREATECIRCLE {

			CIRCLE {s 4 y -2}
			BASIC { s 0.5 }
}

rule CREATECIRCLE {

			BASIC { s 0.5 x -1 }
			BASIC { s 0.5 x 1 }
			CIRCLE {s 3 y -1}


}

rule CREATECIRCLE {

			BASIC { s 0.5 y -1 }
			BASIC { s 0.5 y 1 }
			CIRCLE {s 4 y 3}
			CIRCLE {s 4 y -3}

}

rule CREATECIRCLE {

			BASIC { s 0.5 y -1 }
			CIRCLE {s 2 y 1}

}

rule CREATECIRCLE {

			BASIC { s 0.5 y 1 }
			CIRCLE {s 1 y -1}

}

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

rule CONSTRUCT {

			CREATECIRCLE {}
			CREATECIRCLE {s 2}

}

rule CONSTRUCT {

			CREATECIRCLE {y -2}
			CREATECIRCLE {y -1}
			CREATECIRCLE {}
			CREATECIRCLE {y 1}

}

//----------------- BASIC SHAPES -------------------------

rule BASIC {

			CIRCLE { s 2 }
			CIRCLE { s 1.5 b 1 }
			ADDOTS {}
}

//----------------- ADD DETAILS TO SHAPES ----------------

rule ADDOTS {

			CIRCLE { s 0.25 y -1.33 }
			CIRCLE { s 0.25 y 1.33 }
			CIRCLE { s 0.25 x -1.33 }
			CIRCLE { s 0.25 x 1.33 }
 
}
I've tried flip and rotate in the main shape, but it only adds more layers of objects (ie. I'm doing it wrong). If anyone can help me out with this, I'd appreciate it. My plan is to add all kinds of whacky formations to this, not just circles. ^^

mycelium
Posts: 29
Joined: Tue Aug 28, 2007 4:21 am
Location: Italy
Contact:

symmetry

Post by mycelium »

Since now the only way to get symmetry is using symmetrical shapes.
I wish there will be a SYMMETRY directive in next version to create a Rorschach test of any CFDG design!

User avatar
MtnViewJohn
Site Admin
Posts: 882
Joined: Fri May 06, 2005 2:26 pm
Location: Mountain View, California
Contact:

Re: symmetry

Post by MtnViewJohn »

mycelium wrote:Since now the only way to get symmetry is using symmetrical shapes.
I wish there will be a SYMMETRY directive in next version to create a Rorschach test of any CFDG design!
There is a proposal to do that in version 3. The tile directive does translation symmetry. The idea to support all of the other one and two-dimensional forms of symmetry as well.

Post Reply