Skip to content
Snippets Groups Projects
Commit ea12d2ed authored by Egli Adrian (IT-SCI-API-PFI)'s avatar Egli Adrian (IT-SCI-API-PFI)
Browse files

rendering

parent 1af86348
No related branches found
No related tags found
No related merge requests found
......@@ -83,12 +83,15 @@ class PILGL(GraphicsLayer):
self.background_grid = np.zeros(shape=(self.width, self.height))
for x in range(self.width):
for y in range(self.height):
distance = int(np.floor(np.sqrt(self.width * 2.0 + self.height)))
distance = None
for rc in dTargets:
r = rc[1]
c = rc[0]
d = int(np.floor(np.sqrt((x - r) ** 2 + (y - c) ** 2)))
distance = min(d, distance)
if distance is None:
distance = d
else:
distance = min(d, distance)
self.background_grid[x][y] = distance
def rgb_s2i(self, sRGB):
......@@ -309,11 +312,11 @@ class PILSVG(PILGL):
"Scenery/Nadelbaume_A.svg",
"Scenery/Nadelbaume_B.svg",
"Scenery/Bergwelt_B.svg",
"Scenery/Bergwelt_C_Teil_1_links.svg",
"Scenery/Bergwelt_C_Teil_2_rechts.svg",
"Scenery/Bergwelt_A_Teil_1_links.svg",
"Scenery/Bergwelt_A_Teil_2_mitte.svg",
"Scenery/Bergwelt_A_Teil_3_rechts.svg",
# "Scenery/Bergwelt_C_Teil_1_links.svg",
# "Scenery/Bergwelt_C_Teil_2_rechts.svg",
# "Scenery/Bergwelt_A_Teil_1_links.svg",
# "Scenery/Bergwelt_A_Teil_2_mitte.svg",
# "Scenery/Bergwelt_A_Teil_3_rechts.svg",
]
imgBg = self.pilFromSvgFile('svg', "Background_Light_green.svg")
......@@ -430,7 +433,7 @@ class PILSVG(PILGL):
if self.background_grid[col][row] < 4:
a = int(self.background_grid[col][row])
a = a % len(self.dBuildings)
if (col + row) % 10 > 2:
if (col + row) % 10 > 7:
pilTrack = self.dScenery[0]
else:
if (col + row + col * row) % 2 == 0:
......
......@@ -100,7 +100,7 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "387832d242b44d69a1712a42d9547c05",
"model_id": "c96cefa474204cb1992da3eb286fb659",
"version_major": 2,
"version_minor": 0
},
......@@ -134,7 +134,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.5"
"version": "3.6.8"
},
"latex_envs": {
"LaTeX_envs_menu_present": true,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment