Tag Info

New answers tagged

11

L-Systems, from what I can tell*, are a set of grammar-like substitution rules that you can apply recursively to get interesting, "organic" results. Plants are where L-Systems are often used, as they show a lot of recursive growth (i.e. branch splits off into more branches). For a simple example, I'll show a "lollipop" tree generated using an L-System: ...


1

For the exact problem (how to create a polygon from tiles forming some area) you basically: Flood fill the area to limit the number of tiles you check and avoid situations alike checkerboard pattern (where edge node can have 4 neighbour edge nodes) Pick up a node on the edge of the area Look for the nodes that are connected to it, that lay on the edge too ...


0

The normal for a vertex is generated by taking the mean of the normals for each face that contains that vertex. As such if a mesh contains two (or more) triangles that share vertices they will be displayed with a smoothed edge. If you use separate vertices (they can have identical positions) then they will be displayed with a hard edge. There is some ...


1

Use the first approach. pick a random place on the board an add a threesome by pushing all the elements in these spots in the three columns, one row up. At a certain rare %, add a seven-some. This will allow you to add random pearls everywhere. You can guarantee multiple solutions by adding threesomes that are not codependent. breaking threesomes "bad" will ...


4

Both of those pieces of code appear to pick a random location (xx,yy in the first example and x,y in the second), then try to change grass to something else near that location. There are lots of other algorithms, although most are more complicated than the ones you posted. I can't answer whether they're over your head; I don't know what's in your head ;-) ...


-2

I would say to check if there is a tile in that spot already if not place a tile and put that in a for loop for how big your x and y are.



Top 50 recent answers are included