[Question]
  [
A cannonball is fired so that in the first eyeblink of its flight it ascends by `N` treetops, during the second eyeblink by `N-1` treetops, etc until it reaches the highest point of its trajectory. Then it starts falling by 1, 2, etc treetops per eyeblink until it hits the ground. At the same time the cannonball is moving horizontally with a constant velocity of 1 treetop/eyeblink.
Your task is to draw the trajectory with consecutive letters from the English alphabet. If you run out of letters, start again from `'A'`. Write a function or a program. The input is an integer `N` (`1≤N≤15`). The output can be a character matrix in any reasonable form, for instance a newline-separated string or a list of strings. Letters can be all lowercase or all uppercase. Extra leading and trailing spaces are allowed. Standard loopholes are forbidden. Shorter code is better.
```
in:
5
out:
    OP
   N  Q
   M  R
  L    S
  K    T
  J    U
 I      V
 H      W
 G      X
 F      Y
E        Z
D        A
C        B
B        C
A        D
in:
1
out:
AB
```
  
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E), ~~33~~ ~~32~~ ~~29~~ 28 bytes
```
>*As∍2ä`R)ζRIL£vyε`N·úJ])˜.c
```
[Try it online!](https://tio.run/##ATAAz/8wNWFiMWX//z4qQXPiiI0yw6RgUinOtlJJTMKjdnnOtWBOwrfDukpdKcucLmP//zU "05AB1E – Try It Online")
**Explanation**
```
>*                             # push input*(input+1)
  As∍                          # take that many characters from the alphabet (with wrap)
     2ä                        # split in 2 parts
       `R)                     # reverse the second part
          ζ                    # zip (gives a list of pairs)
           R                   # reverse
            IL£                # split into parts of sizes equal to [1,2...]
               vy              # for each (part y, index N)
                 ε             # for each pair in that part
                  `N·úJ        # insert N*2 spaces between the characters
                       ]       # end loops
                        )˜     # wrap in a flattened list
                          .c   # format as lines padded to equal length
```
[Answer]
# [Stax](https://github.com/tomtheisen/stax), 29 24 [bytes](https://github.com/tomtheisen/stax/blob/master/docs/packed.md#packed-stax)
```
╦'♫ΓqπL⌂δ@╚n>DI∙Q┴òkεwö╔
```
[Run and debug it online](https://staxlang.xyz/#c=%E2%95%A6%27%E2%99%AB%CE%93q%CF%80L%E2%8C%82%CE%B4%40%E2%95%9An%3EDI%E2%88%99Q%E2%94%B4%C3%B2k%CE%B5w%C3%B6%E2%95%94&i=5%0A1%0A8&a=1&m=2)
The corresponding ascii representation of the same program is this.
```
VA*xRr:m|/xH({rix/|1*_%:T)mMm
VA*                             repeat alphabet input times
   xRr:m                        [x ... 1, 1 ... x] where x=input
        |/xH(                   get consecutive substrings of specified sizes
             {           m      map substrings using block
              ix<|1*            reverse string if index<x
                    _%:T)       left-pad to appropriate triangular number
                          Mm    transpose and output
```
[Answer]
# R, ~~169~~ ~~163~~ ~~161~~ ~~153~~ ~~150~~ ~~110~~ 109 bytes
This approach fills in a matrix and then prints the matrix.
**Golfed**
```
function(n)write(`[<-`(matrix(" ",M<-2*n,k<-sum(1:n)),cbind(rep(1:M,c(n:1,1:n)),c(k:1,1:k)),LETTERS),1,M,,"")
```
Thanks @Giuseppe for 153. 
Thanks @JDL for 150.
See @Giuseppe's comment for 112, and some edits for 110 now 109. Rip original code.
```
function(n){a=matrix(" ",M<-2*n,k<-sum(1:n))
Map(function(x,y,z)a[x,y]<<-z,rep(1:M,c(n:1,1:n)),c(k:1,1:k),head(LETTERS,2*k))
cat(rbind(a,"
"),sep="")}
```
If plotting a valid output then 73 bytes
```
function(n,k=sum(1:n))plot(rep(1:(2*n),c(n:1,1:n)),c(1:k,k:1),pc=LETTERS)
```
[![enter image description here](https://i.stack.imgur.com/BLY8f.png)](https://i.stack.imgur.com/BLY8f.png)
[Answer]
# [Python 2](https://docs.python.org/2/), ~~140~~ ~~135~~ 133 bytes
```
lambda n:[' '*(n-j)+chr(~-i%26+65)+'  '*j+chr((n*-~n-i)%26+65)for i,j in zip(range(n*-~n/2,0,-1),sum([-~i*[i]for i in range(n)],[]))]
```
[Try it online!](https://tio.run/##XcpNDoIwEEDhvaeYjWmHtiokEoPxJKUL/EGmkYFUXOiCq1dFVm7f@/rn0HScxfpQxlvVHs8VcGEFiESy8ahOTZCjoWWWq3yLSsDn@KlKTszIhnB@dReAtAdieFEvQ8XXy8@sM73RJkV9f7TSmpESS27iXzxDdNo6RBf/Rqp3WCygD8QDiJLFynfEspaEuJ9qfAM "Python 2 – Try It Online")
[Answer]
# [MATL](https://github.com/lmendo/MATL), 29 bytes
```
,G:tPY"tf1Y2y@?tn+P])Z?]Pv1X!
```
[Try it online!](https://tio.run/##y00syfn/X8fdqiQgUqkkzTDSqNLBviRPOyBWM8o@NqDMMELx/39TAA "MATL – Try It Online")
### How it works
```
,        % Do twice
  G:     %   Push [1 2 ... n], where n is the input
  tP     %   Duplicate, flip: pushes [n n-1 ... 1]
  Y"     %   Run-length decoding: gives vector with n ones, n-1 twos ... (*)
  tf     %   Duplicate, find: gives [1 2 3 ... n*(n-1)/2] (**)
  1Y2    %   Push string 'ABC...Z'
  y      %   Duplicate from below: pushes [1 2 3 ... n*(n-1)/2]  again
  @?     %   If we are in the second iteration
    tn   %     Duplicate, length: pushes n*(n-1)/2
    +    %     Add: gives [n*(n-1)/2+1 n*(n-1)/2+2 ... n*(n-1)*2] 
    P    %     Flip: gives [n*(n-1)/2 n*(n-1)/2-1 ... n*(n-1)/2+1]
  ]      %   End if
  )      %   Index (1-based, modular) into the string. Gives a substring
         %   with the letters of one half of the parabola (***)
  Z?     %   Sparse: creates a char matrix with the substring (***) written
         %   at specified row (*) and column (**) positions. The remaining
         %   positions contain char(0), which will be displayed as space
]        % End do twice. We now have the two halves of the parabola, but
         % oriented horizontally instead of vertically
P        % Flip the second half of the parabola vertically, so that the
         % vertex matches in the two halves
v        % Concatenate the two halves vertically
1X!      % Rotate 90 degrees, so that the parabola is oriented vertically.
         % Implicitly display
```
[Answer]
# C, 184 bytes
```
i,j,k,l,m,h,o;f(n){char L[o=n*n][n*3];for(i=o;i--;)for(L[i][j=n*2]=h=k=0;j--;)L[i][j]=32;for(m=n;!h|~i;m-=1-h*2)for(h+(l=m)?++j:++h;l--;)L[h?i--:++i][j]=65+k++%26;for(;o--;)puts(L+o);}
```
[Try it online!](https://tio.run/##JY5LDoIwEIb3nKIuTFqmTRQjC8eJF@AGpAtDoi3QqfGx8nF1LGV28/2P/J25dt00ed3rQY86aKcjXiSrd@fOd9G0kbhk23K5s3iJd@kpojcG1fw0rbdtnxyVJUcDbbCfpQVb2lU5Eohx5T4/j8HQ1riyymEHcqSgTgD9AcDhuETdKdUnsFTUexgA1lWdmzDOntvr@ZANRIXfyfNThLNnqYp3IdIlm5Az5bRG8HGPKvOsSQBWWHynPw)
**Unrolled:**
```
i, j, k, l, m, h, o;
f(n)
{
    char L[o=n*n][n*3];
    for (i=o; i--;)
        for (L[i][j=n*2]=h=k=0; j--;)
            L[i][j] = 32;
    for (m=n; !h|~i; m-=1-h*2)
        for (h+(l=m)?++j:++h; l--;)
            L[h?i--:++i][j] = 65 + k++%26;
    for (; o--;)
        puts(L+o);
}
```
[Answer]
# [Java (OpenJDK 8)](http://openjdk.java.net/), 121 bytes
```
n->{for(int l=n*++n/2,r=l,i=1,j=0;l>0;j=j-->0?j:i++)System.out.printf("%"+(n-i)+"c%"+(2*i-1)+"c%n",--l%26+65,r++%26+65);}
```
[Try it online!](https://tio.run/##bY8xb4MwEIX3/IoTEhLEmCZIyQAiHTp16JQxyuAaEp1rzsiYVBXit1OTpKrUZjjd83un@85KXAQ3bU2q@piwaY11oLyX9g51uiwW/7xTT9KhoTmUWnQdvAmkYQHQ9u8aJXROON8uBitofBTtnUU6H44g7LmLYR4FeCX3Yqjrm9qCFESGoJyI74aTsRGSA13SkjF6yhJb6gTLdaLKVaF3q0KVivPd6lnlyFi8/@pc3aSmd2nrOe4UBWHAIuIYs0DOMlsiX18fFCSc6zDbsu0msYzdVFyMU3E9yrPhCqccqP4ELw/HYZPAevy5G@ABECkPKaxC8mY@U4Di4j5@@1wqpKxbF/36f9doiu7ZuJhrnL4B "Java (OpenJDK 8) – Try It Online")
## Explanation
```
n->{                             // int-accepting consumer
 for(                            //  loop
   int l=n*++n/2,                //    declare l (left) is the first character to print.
                                 //              Oh, and n is increased to reduce byte count later.
       r=l,                      //            r (right) is the second character to print.
       i=1,                      //            i is the "outer-loop" index
       j=0;                      //            j is the "inner-loop" index
   l>0;                          //    while there are characters to print        
   j=j-->0?j:i++)                //    simulate two loops in one,
                                 //      where j starts from 0 and always decreases until it reaches 0
                                 //      at which point j is reset to i and i is increased
  System.out.printf(             //   Print...
   "%"+(n-i)+"c%"+(2*i-1)+"c%n", //    2 characters
                                 //    - the first with n-i-1 whitespaces (remember, n was increased)
                                 //    - the second characters with 2*i-2 whitespaces
   --l%26+65,                    //    the first character to print is the left one, we decrease it.
   r++%26+65                     //    the second character to print is the right one, we increase it.
  );                             //   
                                 //  end loop
}                                // end consumer
```
[Answer]
# Clojure, 417 319 bytes
```
(defn cannon[n](let[a(map #(char(+ 65 %))(iterate #(if(> % 24)0(inc %))0))m1(reverse(reduce #(concat %(repeat %2(- n %2)))[](range 0(inc n))))p1(map-indexed #(str(apply str(repeat %2 " "))(nth a %))m1)m2(reverse(reduce #(concat %(repeat %2(-(* 2 %2)2)))[](reverse(range 0(inc n)))))p2(reverse(map-indexed #(str(apply str (repeat %2 " "))(nth a(+(count p1)%)))m2))](doseq[x(reverse(map #(str % %2)p1 p2))](println x))))
```
At some point I got tangled up in `reverse` calls and gave up on the idea to make it as short as possible. I just wanted to have a working solution. Here you go...
### Sort of ungolfed
```
(defn cannon [n]
  (let [a (map #(char (+ 65 %)) (iterate #(if (> % 24) 0 (inc %)) 0))
        m1 (reverse (reduce #(concat % (repeat %2 (- n %2))) [] (range 0 (inc n))))
        p1 (map-indexed #(str (apply str (repeat %2 " ")) (nth a %)) m1)
        m2 (reverse (reduce #(concat % (repeat %2 (- (* 2 %2) 2))) [] (reverse (range 0 (inc n)))))
        p2 (reverse (map-indexed #(str (apply str (repeat %2 " ")) (nth a (+ (count p1) %))) m2))]
    (doseq [x (reverse (map #(str % %2) p1 p2))] (println x))))
```
## Update
Motivated by Olivier's comment, I managed to cut multiple `reverse` calls and apply some general golfing tricks to cut characters. Also I created aliases for `reverse`, `map-indexed`, `concat`, `repeat` and `str` because I used them multiple times each.
```
(defn c[n](let[a(map #(char(+ 65 %))(iterate #(if(> % 24)0(inc %))0))k #(reduce %[](range 0(inc n)))r #(apply str(repeat % " "))rv reverse m map-indexed c concat t repeat s str p(m #(s(r %2)(nth a %))(rv(k #(c %(t %2(- n %2))))))](rv(map #(s % %2)p(rv(m #(s(r %2)(nth a(+(count p)%)))(k #(c %(t %2(-(* 2 %2)2))))))))))
```
### Ungolfed
```
(defn c [n]
  (let [a (map
           #(char (+ 65 %))
           (iterate
            #(if (> % 24) 0 (inc %))
            0))
        k #(reduce
            %
            []
            (range 0 (inc n)))
        r #(apply str (repeat % " "))
        rv reverse
        m map-indexed
        c concat
        t repeat
        s str
        p (m
           #(s
             (r %2)
             (nth a %))
           (rv (k #(c % (t %2 (- n %2))))))]
    (rv
     (map
      #(s % %2)
      p
      (rv
       (m
        #(s
          (r %2)
          (nth a (+ (count p) %)))
        (k #(c % (t %2 (- (* 2 %2) 2))))))))))
```
Creates the function `c` which accepts the value n and returns a list of lines.
[Answer]
# [Charcoal](https://github.com/somebody1234/Charcoal), ~~33~~ 31 bytes
```
≔⁰ηＦ…±Ｎ⊕θ«¿ι→↓Ｆ↔ι«Ｐ§αη≦⊕η¿›ι⁰↓↑
```
[Try it online!](https://tio.run/##TY69CoMwFEbn@BQZ7wULLl3aSSgUBx2EPkDUqwZiYmO0heKzp/4Nrh@c75yyFbY0QnkfD4NsNEQhb/Ee1MZyyIVuCDJqhCNIdD@6bOwKsoAY8kSXljrSjip4IyL/BUzWHCTy1EwEt1w2rUNOaqBjeZiPXr7Zdh4Xg1Hjcix3lqWjcrK3UjuIXaIr@oJYY1aCpaI/Ak/ePZVt2qelpdKCDHmEeBaeC179CszB7P3VXyb1Bw "Charcoal – Try It Online") Link is to verbose version of code. Edit: Saved 2 bytes thanks to @ASCII-only. Explanation:
```
≔⁰η
```
Initialise the current letter as an index into the uppercase alphabet to 0.
```
Ｆ…±Ｎ⊕θ«
```
Make a loop from the negation of the input to the input inclusive.
```
¿ι→↓
```
Normally each column is to the right of the previous. However, there is no column for zero. Instead, a correction is needed to ensure that the left and right sides align.
```
Ｆ↔ι«
```
Loop for each letter in the column.
```
Ｐ§αη
```
Print the current letter.
```
≦⊕η
```
Increment the letter index.
```
¿›ι⁰↓↑
```
Move up or down depending on which side of the trajectory we're on.
[Answer]
# [Perl 5](https://www.perl.org/), -n ~~112~~ ~~92~~ ~~90~~ 88 bytes
For once the terribly long `printf` seems to win.
```
#!/usr/bin/perl -n
$p=$q=$_*($%=$_+1)/2;map{printf"%$%c%$.c
",--$p%26+65,$q++%26+65for--$%..$';$.+=2}//..$_
```
[Try it online!](https://tio.run/##JYhLCoMwEED3PUWRGVqNmWggbkLOIkUUhDYZo10Vr95poKv34Tk/nbz3@eqo76jzAhxgCzA2d8AC1dfG@teDP5zXeCwVAk4INF2qVmtgtIMaXAubUn9dUi4fieDmgVSwpzElRhH3TXysKe6i4w8 "Perl 5 – Try It Online")
[Answer]
# Python3 + numpy, ~~124~~ 115
```
from pylab import*
def i(N):
 x=zeros((N,2*N),'U');x[r_[N-1:-1:-1,0:N],r_[:2*N]]=map(chr,r_[0:2*N]%26+65)
 return x
```
This creates an appropriately sized array, finds the indices for the trajectory and assigns the appropriate character to them.
~~The most complex part is generating the characters A-Z, which relies on a very hackish cast of numbers to a string type.~~
The returned object is a unicode array.
**Edit**: Saved 9 bytes replacing numpy code that generated the characters A-Z (`(r_[0:2*N]%26+65).view('U1')[::2]`) with `map`, as suggested [here](https://codegolf.stackexchange.com/a/25836/77481).
[Answer]
# [Python 3](https://docs.python.org/3/), ~~139~~ 136 bytes
```
f=lambda n,o=0:n and'\n'.join([f(n-1,o+n).replace('\n','\n ')]+[chr(65+(n+o+~i)%26)+'  '*~-n+chr(65+(n*n+o+i)%26)for i in range(n)])or''
```
[Try it online!](https://tio.run/##XckxDoJAEEDR3lNMY2aGASIaKEg4CVKswMoanCUbGhuuvkpMLGx@8d/yWievlxhtM5vnbTCgqW9OtYLRAa@K@cM7pdaSZkXqRTkP4zKbfqRd008AuZO2nwJVpZCKl83x8VyxIAAmW6byw2Tnr1ofwIFTCEbvIyl37ANi/PtFyfUBYAlOV7LkmOMb "Python 3 – Try It Online")
Generates each layer recursively, given the size and offset.
-3 bytes thanks to Jo King
[Answer]
# [J](http://jsoftware.com/), ~~78~~ 75 bytes
```
(26{.65|.a.)($~#)`(;/@])`(' '$~1+{:@])}i.@+:(,.~(|.,])@i.@-:@#)@#~1+i.@-,i.
```
[Try it online!](https://tio.run/##y/qvpKeepmBrpaCuoKNgoGAFxLp6Cs5BPm7/NYzMqvXMTGv0EvU0NVTqlDUTNKz1HWKBlLqCukqdoXa1FZBXm6nnoG2loaNXp1GjpxOr6QDk61o5KGs6KAOVgDg6mXr/Nbm4UpMz8hXSFIwgDHV1mIDpfwA "J – Try It Online")
*-3 thanks to ngn*
[Answer]
# [Python 2](https://docs.python.org/2/), 182 bytes
```
I=input()
S=list('ZYXWVUTSRQPONMLKJIHGFEDCBA'*I)
R=range
print zip(*[(' '*(sum(R(abs(i))))+eval('S.pop()+'*abs(i)+"''")[::[-1,1][i>0]]).ljust(sum(range(I+1)))for i in R(-I,I+1)if i])
```
[Try it online!](https://tio.run/##Jc1JC8IwFATge39F8JKXbljBi1DB3bibupceKrg8qWnoIuifr63OcQa@Ue/sHstGUXAXpcozYJrnRphmQE/Hw3633XhivVou5rPphI9Hw0G/1@1QnTNNuEkobxdNJSgz8kEFug@UUB3S/AkCwnMKyMoYl1cYAfVsFStgBtX/i1GjtMb8Vsu3HNMJfGzXg4DZ0SMvzyvixwM3nNK4xglBgpIIsLhZdXglGLCiaH4B)
Returns list of lists of chars.
[Primitive verification here](https://tio.run/##lc7LCgIhFIDhvU9xdo4wtGgZtJhL93t2j7aRLXSQgejpbcJgGlPMzQ/Hcz6weJY3wdtKUejCOcKAYzCzeGdpWQAmMfyYeXNc/WNmzXHtMVPrZ6pQt5m4zMZtxi6ztZqR67zOzjRDv9mbZuA3B9P0/eb4ZXr@8zonbfIQk2iThZhUmzTEZNokISbH5ILQVUiQ4gGMA@0gKCTjJWDcugvGo2pBPm9IqRc)
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), 35 bytes
```
ṪṚṭ
r1m0RØAṁs⁸U2¦Ç⁶ṁ$;¥\€ÇzZ¥€⁶ẎUZY
```
[Try it online!](https://tio.run/##y0rNyan8///hzlUPd856uHMtV5FhrkHQ4RmOD3c2Fj9q3BFqdGjZ4fZHjduAfBXrQ0tjHjWtOdxeFXVoKZABEt7VFxoV@f//f1MA "Jelly – Try It Online")
[Answer]
# [Yabasic](http://www.yabasic.de), 125 bytes
An [basic](/questions/tagged/basic "show questions tagged 'basic'") solution that uses graphics mode to print the characters at the correct column and row of the screen.
```
Input""n
Clear Screen
For i=-n To n
For j=1To Abs(i)
k=i>0
?@(i+n-k,(i^2-i)/2+j-2*j^(!k)+k)Chr$(c+65)
c=Mod(c+1,26)
Next
Next
```
Because this solution uses graphics mode, it cannot be executed on TIO.
### Output
*Below is the output for input `7`*
[![Program Output (n=7)](https://i.stack.imgur.com/N7eo7.png)](https://i.stack.imgur.com/N7eo7.png)
[Answer]
# [Ruby](https://www.ruby-lang.org/), ~~106~~ 103 bytes
```
->n,f=2*s=-~n*n/2-1{l=*?A..?Z;(1..n).map{|i|i.times{puts' '*(n-i)+l[(f-s)%26]+' '*~-i*2+l[(s+=1)%26]}}}
```
[Try it online!](https://tio.run/##HchLCoMwEADQq3RTzKczJYF2U6biNSouWmggoIM4uigxXj1i3/JNy@dXAhV48iWQN0KwseGrB5d6MnWDWL8eyiGyxuE9pjWuEec4fCWNyyzVqTKKIWrbtyqA6LO/d/bYDaLxx4ol9@@ccwntrSs7 "Ruby – Try It Online")
[Answer]
# [QBasic 1.1](https://archive.org/details/msdos_qbasic_megapack), 124 bytes
Takes input and shoots a cannon. Due to screen size limitations, \$n\$ must be \$\leq 6\$.
```
INPUT n
CLS
FOR i=-n TO n
FOR j=1TO ABS(i)
k=i>0
LOCATE(i^2-i)/2+j-2*j^-(k=0)-k+1,i+n+k+1
?CHR$(c+65)
c=(c+1)MOD 26
NEXT j,i
```
[Answer]
# [Python 3](https://docs.python.org/3/), 190 bytes
```
j,r,c,s=int(input()),range,[],[];a=(j+1)*j;b=a//2
for i in r(j):k=i+1;c.extend([j-k]*k)
for i in r(a):s+=chr(ord('A')+(i%26))
for i in r(b):print(' '*c[i]+s[b-i-1]+' '*(2*(j-c[i]-1))+s[b+i])
```
[Try it online!](https://tio.run/##VY69DoIwFEZ3n6KL4d7@SMDoAOngc5AOpaDckhRSMNGnr3bT5JvOd4azvvdpCeeUvIzSyU1T2IHC@twBUUYbHqPszHet1eBFhdy3vbZlWR/uS2TEKLAIHptZk6hadxpf@xgG6LyaDZ/x17LYbEK7KcISByhuBQqgY33FP6vHZo25omAFdx0ZsXW9IlUZkQnUHLzKXFWI@RNkMKXLBw "Python 3 – Try It Online")
I tried my best. Let me know if any optimisations are possible.
[Answer]
# k4, ~~76~~ 71 bytes
```
{+|:'p$(-k,|k:+\l)$(x#b),|:'x_b:(i:-1_0,+\l,|l)_a:(2*p:+/l:|1+!x)#.Q.a}
```
some rearranging+assignments to save 5 bytes
---
```
{+|:'(+/l)$(-k,|k:+\l)$(x#i_a),|:'((-x)#i:-1_0,+\l,|l)_a:(2*+/l:|1+!x)#.Q.a}
```
half-hour effort with some effort to shave off a few bytes, but there's probably much more that can be done here. will come back to it. fun challenge!
]