Peano

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
User avatar
lagroue
Posts: 114
Joined: Wed Jul 06, 2005 11:33 pm
Location: Paris, France
Contact:

Peano

Post by lagroue »

Didn't manage to build a real peano maze, but these rules are close to :

Image

Code: Select all

startshape peano

rule peano 0.5 {
	peano_base { }
}
rule peano {
	peano_sub { }
}

rule peano_sub {
	peano { s 0.333 r 90 x 0.333}
	peano { s 0.333 x 0.666}
	peano { s 0.333 x 0.666 y 0.666}
	peano { s 0.333 r -90 y 1}
	line { x 0.333 s 0.333 }
	line { x 0.666 y 0.333 r 90 s 0.333}
	line { x 0.333 y 1 s 0.333 }
}

rule peano_base {
	line { }
	line { x 1 r 90}
	line { y 1 }
}

rule line {
	SQUARE { s 0.1}
	SQUARE { x 0.1 s 0.1}
	SQUARE { x 0.2 s 0.1}
	SQUARE { x 0.3 s 0.1}
	SQUARE { x 0.4 s 0.1}
	SQUARE { x 0.5 s 0.1}
	SQUARE { x 0.6 s 0.1}
	SQUARE { x 0.7 s 0.1}
	SQUARE { x 0.8 s 0.1}
	SQUARE { x 0.9 s 0.1}
	SQUARE { x 1 s 0.1}
}

Post Reply