Help to make my tree code not pixelate.

If you're having trouble using Context Free or don't understand the language, ask for help here.

Moderators: MtnViewJohn, chris, mtnviewmark

Post Reply
personaV
Posts: 1
Joined: Tue Sep 16, 2008 2:04 pm

Help to make my tree code not pixelate.

Post by personaV »

Hi,

Fantastic program. I'm learning with the 'full moon in the midnight forest' photoshop tutorial. Anyway, here's my code to make spooky trees, but they are pixelated, how would i fix this? (I tried searching, but i think its broken)

Code: Select all

startshape FOREST

rule FOREST {
     SEED {} 
}

rule SEED {BRANCH {}}
rule SEED {BRANCH {rotate 1}}
rule SEED {BRANCH {rotate -1}}
rule SEED {BRANCH {rotate 2}}
rule SEED {BRANCH {rotate -2}}
rule SEED {FORK {}}

rule BRANCH {LEFTBRANCH {flip 90}}
rule BRANCH {LEFTBRANCH {}}

rule LEFTBRANCH 4 {BLOCK {} LEFTBRANCH {y .01 rotate 1 size .99}}
rule LEFTBRANCH 4 {BLOCK {} LEFTBRANCH {y .5 rotate 6 size .989}}
rule LEFTBRANCH {BLOCK {} LEFTBRANCH {y 0.885 rotate 4 size 0.99}}
rule LEFTBRANCH {BLOCK {} FORK {}}


rule BLOCK {
     SQUARE {rotate 1}
     SQUARE {rotate -1}
     SQUARE {}
}

rule FORK {
     BRANCH { }
     BRANCH {size 0.5 rotate 40}
}
rule FORK {
     BRANCH { }
     BRANCH {size 0.5 rotate -40}
}
rule FORK {
     BRANCH {size 0.5 rotate -20}
     BRANCH { }
}
rule FORK {
     BRANCH {size 0.7 y 0.1 rotate 20}
     BRANCH {size 0.7 y 0.1 rotate -20}
}
[/code]

User avatar
Guigui
Posts: 50
Joined: Sat Aug 05, 2006 5:28 pm
Location: Annecy, France

Post by Guigui »

It is not pixelation. As your basic shapes are square (in rule BLOCK), you can see the angles of the squares bulk the paths. It's because they're not enough close to each other to merge. You can see it more clearly if you proceed a hugh size rendering.
8^)

Post Reply