Model trainer: Add function to make tensor of cartesian coordinates for drawing the map (equirectangular projection)
[?]
Jul 1, 2021, 12:01 PM
ZRPV3GAJQYQLXVL5LS3TFKZACVXSL43WEEA6PKF6ZUWHDUIIDSBQCDependencies
- [2]
ROQCAPZJBegin function for showing the map (for now just opens SDL window)
Change contents
- edit in trainmodel/src/drawmap.py at line 1
import math - edit in trainmodel/src/drawmap.py at line 5
import tensorflow as tf - edit in trainmodel/src/drawmap.py at line 22[2.443]
def inputs(width, height):def cartesian(x,y):x = x / width * math.piy = y / height * math.pireturn [math.sin(y) * math.cos(x), math.sin(y) * math.sin(x), math.cos(y)]def row(y):def c(x):return cartesian(x,y)return list(map(c, range(0, width)))return tf.constant(list(map(row, range(0, height))))