Starfield Generation

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
t3knomanser
Posts: 21
Joined: Wed Jul 06, 2005 4:53 pm

Starfield Generation

Post by t3knomanser »

It's an inverse starfield- I tried drawing a black square first and drawing white stars on that, but it never worked out that well. There's plenty of room for modification here, allowing for a larger variety of sizes, and movement rules.

Code: Select all

startshape STARFIELD

rule STARFIELD {
	STAR{}
	STAR{x 15 r -45}
	STAR{y -30 r 66.6}
}

rule STAR .1 {
	CIRCLE{s 2}
}

rule STAR {
	CIRCLE{s 2}
	STAR{}
}

rule STAR {
	CIRCLE{s 5}
	STAR{}
}

rule STAR {
	CIRCLE{s 3}
	STAR{}
}

rule STAR {
	STAR{x 10}
}

rule STAR {
	STAR {x -10 y 45}
}

rule STAR {
	CIRCLE{s 2}
	STAR {r 45}
}

rule STAR {
	STAR{r -31.5}
}

rule STAR {
	STAR{x -30 y -15}
}

Post Reply