Collision Detection

Let the developers know what you think of the software and what can be done to either improve the CFDG language or the Context Free program.

Moderators: MtnViewJohn, chris, mtnviewmark

Post Reply
User avatar
TheRandomDude
Posts: 12
Joined: Thu Nov 02, 2006 11:12 am
Contact:

Collision Detection

Post by TheRandomDude »

this is an interesting idea that came out of trying to make a CFDG that looked like a circuit board. When i tried to render it, it came out looking more like a grid of dots jumbled in the center and only looked somewhat like what I wanted, but mostly on the edges. I tried to overlay white blocks to make it look better but it came out more messy.

So, what i want to request is a simple boolean parameter that checks if a shape is already drawn at a point. If this was implemented, it would allow extremely complex patterns from getting bunched up togeather in the center and make more intelligent designs. One great example of something that could be made if this was implemented would be randomly generated mazes, and even extremely complex architecture.

Please tell me how possible it would be to implement such an idea in the existing code, i'm really quite interested in the possiblities.

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

Post by MtnViewJohn »

It isn't really possible and even if it was we wouldn't want to for philosophical reasons. The technical problem is that producing an image from a cfdg file happens in two steps: the cfdg grammar is converted into a string of squares, circles, and triangles; and then these shapes are drawn on a bitmap. Your boolean parameter needs to be known during interpretation of the grammar in the cfdg file, but it depends on the bitmap that doesn't exist yet. We could get around this by drawing to a bitmap as we run the grammar (which is how progressive updates are done).

The philosophy of Context Free is that the program interprets context free grammars. Having grammar rules that are dependent on already-drawn shapes is not context free, it is context sensitive. Chris (the original author of Context Free) is now toying with context sensitive grammars. Your rule test for existing drawn shapes might be something he would be interested in.

User avatar
TheRandomDude
Posts: 12
Joined: Thu Nov 02, 2006 11:12 am
Contact:

Post by TheRandomDude »

You have no idea how long it took me to word that right haha, thanks for the answer. The only thought I wanted to plant before I quit hassling you about the whole thing was the dependence that a CFDG already has on itself.

Each shape is an offshoot of another shape starting at a point, and each shape is dependent on the previous shape's size, dimensions, and color along with the coding bounds we restrict it to. Philosophically, a CFDG is an organism that is already dependent on itself and it's created shapes. I wouldn't be afraid of the implication of adding such a feature because a CFDG only has itself to use as a context (and of course nothing more).

Other than that, i do understand that it would be quite a chore and I don't want to turn your beast against you so to speak, but think about the possibilities. Honestly, I would love to write a maze generating program but I'm just a fledgeling art-student without a coding language.

Post Reply