Created
August 4, 2019 07:13
-
-
Save tompng/4ee6c4019fc9796719fe419269efb2f4 to your computer and use it in GitHub Desktop.
haisai
This file contains 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
def haisai(x,y) | |
y2=(y<0?y+2.75:y) | |
ha=((x+y-0.5)**2+4**(8*x+8*y-4)+(y-14*x-25-2*(x+y-0.5)**2)**2-6)*((6*x+4*y-x*x-1)**4+4*(y-x-2)**2-3) | |
ii=(16*(x-y2+7/8.0+x*x/8)**2+8*(y2-15/8.0)**4-1)*(49*(x-1)**2+32*(y2-1)**8-1)-1 | |
sa=4/((x+1.25)**8+(16*y+16+(x+1.25)**2/4)**2/(1+(x+1.25)**2))+1/(4*(y+1)**8+(8*x+14)**2)+4/((y+4/3.0)**8+(16*x+12+(y+0.5)**4/2)**2)-1 | |
ha*ii*sa | |
end | |
n=48 | |
n.times{|y| | |
puts (2*n).times.map{|x| | |
'#." '[2.times.map{|z|haisai(2.6*(x-n)/n,2.6*(n-2*y-z)/n)<0?1<<z:0}.sum] | |
}.join | |
} |
This file contains 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
... | |
.. .##### | |
.###. .#####" | |
#####. .######" | |
###### .####### | |
.###### .. .#######" | |
####### ####. .#######" | |
.####### "##### .######### | |
####### ###### .############ | |
######## ######. .############## | |
######## ######. ######"" ###### | |
######## ######. """" ###### | |
.######## ######. ###### | |
########" ######. ###### | |
.########" "##### ###### | |
.#######"" "#### ###### | |
.######"" "" ###### | |
"""" ###### | |
"####" | |
"##" | |
. .. | |
.### ###. | |
#### .#### .#### | |
##### ##### ..##### | |
##### ##### .###### | |
##### ##### .######" | |
.###### .###### .#######" | |
..#######################################.. .#######" | |
.########################################### ######### | |
"##################"""""##################" .##########. | |
"###### "#####"" .#############. | |
"##### ##### .######"""###### | |
##### ##### ###""" ###### | |
##### .#### ###### | |
#### ##### ###### | |
"### ####" ###### | |
" ##### ###### | |
.#### ###### | |
.####" ###### | |
.#### ###### | |
.###" #### | |
.##" "" | |
"" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment