Map generator

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
LaT3x
Posts: 68
Joined: Wed Jul 06, 2005 3:11 pm
Location: Madrid, Spain

Map generator

Post by LaT3x »

Code: Select all

startshape A

rule A
{
  SQUARE { x 5 s 10 1}
  A {x 9.5 r -45}
}

rule A
{
  SQUARE { x 5 s 10 1}
  A {x 9.5 r 45 }
}

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

Post by MtnViewJohn »

Try it with 60, 90, or 120 degree rotations! Very cool.

User avatar
LaT3x
Posts: 68
Joined: Wed Jul 06, 2005 3:11 pm
Location: Madrid, Spain

Post by LaT3x »

I try with this angles (different combanitos... It was really cool :))
Anyway... I don't understand why the recursivity isn't infinite (there aren't scale down into recursivity). Why the proccess stop?

megaduck0
Posts: 13
Joined: Wed Jul 06, 2005 3:36 pm

Post by megaduck0 »

I'm guessing an overflow in the x/y coord space?

Notice that

Code: Select all

startshape A 

rule A 
{ 
  SQUARE { x 5 s 10 1} 
  A {x 3 r -0.1}
} 
will draw about 1/3 circle before bailing, but

Code: Select all

startshape A 

rule A 
{ 
  SQUARE { x 5 s 10 1} 
  A {x 2 r -0.1}
} 
will draw forever... Only the x offset amount in A changes.

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

Post by MtnViewJohn »

They are shrinking. The stopping rule is based on shape area in pixels. As the map gets bigger the individual line sehments get smaller. Eventually they shrink below the stopping limit and rule expansion stops.

Post Reply