draw_utils.py
def project25dAlt(wx, wy, wz, win_width, win_height, worldScale = 1.0):
    """ Project 3d coords into 2d plane (screen)
    """    
    ## I used the idea and the algorythm at: 
    ##   http://www.inversereality.org/tutorials/graphics%20programming/3dprojection.html    
    if wz == 0:
        OneOverZ = 0
    else:
        OneOverZ = 1.0 / float(wz)    
    
    sx = (wx * worldScale * OneOverZ) + win_width / 2
    sy = (wy * worldScale * OneOverZ) + win_height / 2
    
    return int(sx), int(sy)
 Project 3d coords into 2d plane (screen)
    
Project 3d coords into 2d plane (screen)
Project 3d coords into 2d plane ( screen )
def project25dAlt(wx, wy, wz, win_width, win_height, worldScale = 1.0):
    if wz == 0:
        OneOverZ = 0
    else:
        OneOverZ = 1.0 / float(wz)    
    sx = (wx * worldScale * OneOverZ) + win_width / 2
    sy = (wy * worldScale * OneOverZ) + win_height / 2
    return int(sx), int(sy)
def project25dAlt ( wx , wy , wz , win_width , win_height , worldScale = 1.0 ) : if wz == 0 : OneOverZ = 0 else : OneOverZ = 1.0 / float ( wz ) sx = ( wx * worldScale * OneOverZ ) + win_width / 2 sy = ( wy * worldScale * OneOverZ ) + win_height / 2 return int ( sx ) , int ( sy )
Project 3d coords into 2d plane (screen)
Project 3d coords into 2d plane ( screen )
""" Project 3d coords into 2d plane (screen)
    """ ## I used the idea and the algorythm at: 
 ##   http://www.inversereality.org/tutorials/graphics%20programming/3dprojection.html    

wx
wy
wz
win_width
win_height
worldScale