abstract to wallpaper

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

abstract to wallpaper

Post by LaT3x »

Modificate as you want :)

Code: Select all

startshape C

rule C 
{ 
  CIRCLE { s 2 }
  CIRCLE { s 1.9 b 1}
  B {  } 
  B {  r 180 } 
}

rule B
{
  SQUARE {}
  SQUARE {s .8 b 1}
  B { x 2 s .92 }
}

rule B .1
{
  B { r -45 }
  B { r 45 }
}

rule B .01
{
   A {s .2}
}

rule A
{
  CIRCLE { }
  A { x 2 r 1 s .9999 b .0001}
}
rule A .002
{
  CIRCLE { }
  A2 { r -90 s .9 b .0001}
}

rule A2
{
  CIRCLE { }
  A { x 2 r -1 s .9999 b .0001}
}
rule A2 .002
{
  CIRCLE { }
  A { r 90 s .9999 b .0001}
}

ehuber
Posts: 3
Joined: Sat Jul 09, 2005 10:36 pm

Post by ehuber »

Neat!

odinsdream
Posts: 12
Joined: Sat Jul 09, 2005 2:18 pm

Post by odinsdream »

I'm really interested in the shapes that are large spirals, but the line hops out of the spiral and starts making another spiral.

Can someone explain how that shape is being created?

User avatar
aaronstj
Posts: 66
Joined: Wed Jul 06, 2005 11:34 am
Location: Seattle

Post by aaronstj »

The spirals are fairly easy to explain. They're defined by the A and A2 rules (actually, it looks like there's a bug in LaT3x's code that makes a2 basically inconsequential, since both of the A2 rules jump immediately back into A). Here's the code reduced to just the spiral:

Code: Select all

startshape A

rule A
{
  CIRCLE { }
  A { x 2 r 1 s .9999 b .0001}
}
rule A .002
{
  CIRCLE { }
  A { r -90 s .9 b .0001}
}
The first rule is your basic spiral. It drops a circle and then calls itself, offset by a couple of units, rotated, and resized. However, when the second rule is called (which happens about once every 500th time), the spiral takes a 90 degree turn. Those 90 degree turns are where the line "jumps out" of the spiral and starts a new spiral.

odinsdream
Posts: 12
Joined: Sat Jul 09, 2005 2:18 pm

Post by odinsdream »

Thanks for the explanation! It's always great to learn how these work.

Post Reply