Java - ascii drawing logic -
I am "drawing". I pulled it in 'scale 4', but now I'm trying to apply it So that users can type it (& gt; 2). My problem arises when I am trying to print under 'saucer', everything else is printed on the tower, but I am struggling to find an algorithm which can print it on scale is.
I have 'reverse equation' which will be in my program
((line * 2) -2) + scale
This will give me the following on scale 4:
|| || || || __ / || \ __ __ / :::: :::: __ __ / :::::::::::::: \ __ __ / ::::::::::::::::::: : \ __ "" "" "" "" "" "" "" "" "" | \ _ / \ / \ / \ / \ / / / / / / / / / / / / / / / / / / / / \ / \ / \ / _ / || || || || || %% || %% | | %% || %% | | %% || %% | | %% || %% | |% % || %% | | %% | %% | | %% | %% | | %% | %% | | %% | %% | | %% | %% | | %% | | %% | | %% || %% | | %% | %% | | %% | %% | | %% | %% | | %% || %% | __ / || \ __ __ / :::: :::: __ __ / :::::::::::::: \ __ __ / ::::::::::: :::::::: \ "__" "" "" "" "" "" "" "" "" "" | The symbols / patterns that I am struggling with are "\ /". As you can see, I have the following number of "\ /" 's:
line 1: 4
line 2: 6
line 3 : 8
Line 4: 10
The following will need a complete place for me:
Line 1: 10
Line 2: 8
Line 3: 6
Line 4: 5
Maybe I'm missing something very little, but I'm curious to see if There is no argument I can apply to fix it or to correct a simple statement.
Please tell me whether you want to post the entire code to me
Thank you in advance.
The end result:
|| || || || || || || || __ / || \ __ __ / :::: :::: __ __ / :::::::::::::: \ __ __ / ::::::::::::::::::: ::: \ __ __ / ::::::::::::::: :::::::::::: \ __ __ / :::::::: ::::: :::: ::::::::::::::::: \ __ __ / ::::::::::::::: :: :: :: :::::::::::::::::: \ _____ / :::::::::::::::::::::: :::::::: :::::::::::: "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "| \ _ / \ / \ / \ / \ / / / / / / / / / / / \ / \ / \ / \ / \ / \ / / / / / / / / / / / / / / / / / / / / / \ / \ / \ / \ / \ / \ / \ / \ \ / \ / \ / \ / \ / _ / \ / \ / \ / \ / \ / \ / \ / \ / / / / \ / \ / \ / \ / \ / \ / \ / \ / \ / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / / \ / \ / \ / \ / \ / _ / || || || || || || || %% || %% | | %% || %% | | %% || %% | | %% || %% | | %% || %% | | %% || %% | | %% || %% | | %% || %% | | %% || %% | | %% || %% | | %% || %% | | %% || %% | | %% || %% | | %% || %% | | %% || %% | | %% || %% | | %% || %% | | %% || %% | | %% || %% | | %% || %% | | %% || %% | | %% || %% | | %% || %% | | %% || %% | | %% || %% | | %% || %% | | %% || %% | | %% || %% | | %% || %% | | %% || %% | | %% || %% | | %% || %% | | %% || %% | | %% || %% | | %% || %% | | %% || %% | | %% || %% | | %% || %% | | %% || %% | | %% || %% | | %% || %% | | %% || %% | | %% || %% | | %% || %% | | %% || %% | | %% || %% | | %% || %% | | %% || %% | | %% || %% | | %% || %% | | %% || %% | | %% || %% | | %% || %% | | %% || %% | | %% || %% | | %% || %% | | %% || %% | | %% || %% | | %% || %% | | %% || %% | | %% || %% | | %% || %% | | %% || %% | | %% || %% | __ / || \ __ __ / :::: :::: __ __ / :::::::::::::: \ __ __ / ::::::::::::::::::: ::: \ __ __ / ::::::::::::::: :::::::::::: \ __ __ / :::::::: ::::: :::: ::::::::::::::::: \ __ __ / ::::::::::::::: :: :: :: :::::::::::::::::: \ _____ / :::::::::::::::::::::: :::::::: :::::::::::: "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "|
Kartik T told me in the right direction and I changed my formula ((scale - Line) * 2) + scale and it works!
Comments
Post a Comment