Last active
December 14, 2015 03:09
-
-
Save Ram-N/5019066 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# R-Rows C-cols in the center | |
seedAreaCenter <- function(r, c){ | |
for(x in as.integer((areaW-c)/2): as.integer((areaW + c)/2)){ | |
for(y in as.integer((areaH-r)/2): as.integer((areaH + r)/2)){ | |
area_df[x,y] <<- 1 | |
} | |
} | |
} | |
#Seed a central area and let it grow | |
seedAreaCenter(7,7) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment