6
1
Inspired by ecofont.
Given a string containing #
and , output it more eco-friendly by cutting out circles, while keeping it "recognizable" (defined later, in the Circles section).
#
represents black, and represents white. This program is supposed to do something like this:
Input:
####################
####################
####################
####################
####################
####################
####################
####################
####################
####################
####################
Sample output (rather bad score):
####################
#### ###############
## #############
## #### ########
# # ######
## ## ######
## # #####
#### #### ######
######### ######
########### ########
####################
Circles
These are the only valid circles (#
s indicating characters that would be cut out):
#
###
#####
###
#
#
#####
#####
#######
#####
#####
#
Every circle cut out must be of the same radius. By "recognizable", I mean that there must be a gap of at least one pixel / point between each circle, and each circle and the edge of the shape (outside of the #
region):
Again, #
indicates characters that would be cut out, not characters that would be left behind
# #
##### #####
##### #####
##############
##### #####
##### #####
# #
Is invalid, but:
#
#####
#####
####### #
##### #####
##### #####
# #######
#####
#####
#
Is valid. Note that corners are considered touching. That is, in
#
#
the two "pixels" are considered touching, thus circles cannot touch in that way.
Also, just to restate it, if we have a shape like:
########
########
########
########
########
########
########
########
Cutting circles like this is invalid (they both touch the edge of the figure):
#### #
###
#### #
## ## ##
# ####
###
# ####
## #####
Scoring
Your score is the total number of #
s left from the specified inputs. Lowest score wins.
Input #1:
##################################################
##################################################
##################################################
##################################################
##################################################
##################################################
##################################################
##################################################
##################################################
##################################################
##################################################
#################################################
#################################################
#################################################
#################################################
################################################
################################################
################################################
###############################################
###############################################
##############################################
##############################################
##############################################
#############################################
############################################
############################################
###########################################
###########################################
##########################################
#########################################
#########################################
########################################
#######################################
######################################
######################################
#####################################
####################################
###################################
##################################
################################
###############################
##############################
############################
###########################
#########################
#######################
######################
###################
#################
##############
Input #2:
#####################
#######################
#######################
#########################
#########################
###########################
############################
#############################
##############################
###############################
################################
#################################
##################################
####################################
################# ################
################# #################
################# ################
################# #################
################# ################
################# #################
################# #################
################# #################
################## #################
################# #################
################# #################
################# #################
################# #################
################# #################
################# #################
################## #################
################# ##################
################## #################
################# #################
################## #################
################# #################
################## #################
################# ##################
################## ##################
################# #################
###############################################################
################################################################
#################################################################
###################################################################
###################################################################
#####################################################################
######################################################################
######################################################################
########################################################################
########################################################################
##########################################################################
################## ###################
################### ##################
################## ###################
################### ##################
################## ###################
################### ##################
################### ###################
################### ##################
################### ###################
################### ###################
################### ###################
################### ##################
################### ###################
#################### ###################
################### ###################
#################### ###################
################### ###################
#################### ###################
################### ###################
#################### ###################
################### ###################
#################### ###################
#################### ###################
#################### ###################
################### ###################
Input #3:
##############
#####################
#########################
#############################
#################################
###################################
#####################################
####################################
##################################
################################
#############################
##########################
#######################
######################
##########################
#############################
###############################
##################################
####################################
#####################################
###################################
#################################
#############################
##########################
#####################
###############
Note: Tailoring specifically to the samples is not allowed.
1You either need to provide (examples of) correct output for the sample inputs, or explain the challenge in more detail, because as it stands I don't understand what the program is supposed to do, at all. – breadbox – 2014-02-11T06:34:44.997
@breadbox how is that? Also, note that since this is inspired by eco-font, that should help with understanding what this problem is. – Justin – 2014-02-11T06:41:13.050
4
"
– RobIII – 2014-02-11T09:38:13.137Inspired by ecofont
": If we need to visit that site and read up on what it is and then get back to your question to figure out the exact challenge than all I see is an attempt to "spam" ecofont. Your challenge should be clearly described here, period. "defined later, in the Circles section
": where? I don't see it. Tip: adding an image like this one will clarify a lot (something about a picture and 1000 words ;-) )2
I went to http://www.ecofont.com and I still have no idea what this challenge is asking for.
– Paul R – 2014-02-11T11:25:52.443