title: Isometric ascii cube with python
body: <p>(sorry for my broken language)</p>
  
  <p>I'm a beginner in Python, but I have no choice, I need it for a project, and for this one I have to create ascii isometric cube by programming.
  I don't know really how to do it, so I began with the idea to find coordinates of "corners" (not the right word but...) to draw a tile</p>
  
  <pre><code>#what I expect really :
  - for a 2 wide 
          .-⁻``⁻-.
      .-⁻`        `⁻-.
      |              |
      |              |
      `⁻-.        .-⁻`
          `⁻-..-⁻`    
  - for 3 wide
              .-⁻``⁻-.
          .-⁻`        `⁻-.
      .-⁻`                `⁻-.
      |                      |
      |                      |
      `⁻-.                .-⁻`
          `⁻-.        .-⁻`
              `⁻-..-⁻`
  
  # what I except for the beginning
  - 2 wide
          .-⁻``⁻-.
      .-⁻`        `⁻-.
      `⁻-.        .-⁻`
          `⁻-..-⁻`
  
  - 3 wide (,etc.)
              .-⁻``⁻-.
          .-⁻`        `⁻-.
      .-⁻`                `⁻-.
      `⁻-.                .-⁻`
          `⁻-.        .-⁻`
              `⁻-..-⁻`
  </code></pre>
  
  <p>What I began to do</p>
  
  <pre><code>#! /usr/bin/env python
  import numpy as np
  x = 2 // number of tiles
  y = 2 // idem
  z = 2 // elevation, not used yet.
  w = 4 // wideness of a tile (.-⁻` ---&gt; 4 characters)
  s = range ( x * y ) // just to apply a number to a corner
  c = 0 // counter
  
  def makeMatrix ( x, y ):
     matrix = np.full ( y*2*h+z, x*2*w), '.', dtype=str )
     return matrix
  
  def getOut ():
     global x, y, w, h, c
     for i in range ( int(x) ):
        for j in range ( int(y) ):
           cx = ( j - i ) * w
           cy = ( j + i )
           dec = w
           cx += dec
           matrix[cy][cx] = str ( s[c] )
           c += 1
     return matrix
  
  matrix = makeMatrix ( x, y )
  print ( getOut () )
  </code></pre>
  
  <p>I find some coordonates, but they are wrong in a sense. I'm a bit confused.
  I already work with tiles but I don't really know how to do it this time...
  Any idea ?</p>