Inverse Koch

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
maxro
Posts: 2
Joined: Tue Dec 09, 2008 4:06 pm
Contact:

Inverse Koch

Post by maxro »

This is my first real experiment with Context Free. I think it came out pretty well. The idea is a triangle with smaller triangles removed, not added: an inverse Koch Snowflake.
This uses recursive alpha increase to draw basic outlines in early steps and then actually appear to be a line.

Code: Select all

startshape startseg

rule startseg {
	seg1 { a -1 flip 180}
	seg1 { a -1 r 60 }
	seg1 { a -1 x 7.5 y 12.99 r 300}
}
rule seg1 {
	line {}
	seg2 {x 5 r 300}
	seg1 {a +.05 s .333}
}
rule seg2 {
	line {}
	seg3 {x 5 r 120}
	seg1 {s .333 a +.05}
}
rule seg3 {
	line {}
	seg4 {x 5 r 300}
	seg1 {s .333 a +.05}
}
rule seg4 {
	line {}
	seg1 {s .333 a +.05}
}
rule line {
	endpoint {}
	point {x .5}
	point {x 1.5}
	point {x 2.5}
	point {x 3.5}
	point {x 4.5}
	endpoint {}
}
rule point {
	SQUARE {}
}
rule endpoint {
	CIRCLE {}
}
[/code]

User avatar
TorfusPolymorphus
Posts: 27
Joined: Sun Dec 28, 2008 2:16 pm
Contact:

Post by TorfusPolymorphus »

I like it!

User avatar
askiopop
Posts: 12
Joined: Wed Mar 04, 2009 7:07 pm
Location: Guess

Post by askiopop »

pretty.... :o
thank you

Post Reply