Skip to content

Commit

Permalink
Minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian Steger authored and Christian Steger committed Mar 30, 2023
1 parent 5c18e66 commit 67f6917
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
9 changes: 5 additions & 4 deletions visualisation/tri_mesh_terrain_horizon.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
# a triangle mesh on a planar map projection. Illustrate the
# algorithm to compute terrain horizon (according to HORAYZON;
# https://doi.org/10.5194/gmd-15-6817-2022) in an animation.
# Combining the invividual images of the animation into a movie
# or GIF requires 'FFmpeg' or 'ImageMagick', respecitvely.
# Combining the individual images of the animation into a movie
# or GIF requires 'FFmpeg' or 'ImageMagick', respectively.
#
# Copyright (c) 2023 ETH Zurich, Christian R. Steger
# MIT License
Expand All @@ -29,7 +29,7 @@
# -----------------------------------------------------------------------------

ter_exa_fac = 1.5 # terrain exaggeration factor [-]
domain = ( 9.231788 - 0.2, 9.231788 + 0.2,
domain = (9.231788 - 0.2, 9.231788 + 0.2,
47.119357 - 0.15, 47.119357 + 0.15) # Walensee (Switzerland)
dist_search = 10000.0 # search distance for terrain horizon [m]
hori_acc = np.deg2rad(1.0) # accuracy of horizon computation [degree]
Expand Down Expand Up @@ -165,6 +165,7 @@ def terrain_horizon(vertices, quad_indices, observer, hori_acc, azim_num,

return data, hori_loc, hori_elev, hori_dist


# -----------------------------------------------------------------------------
# Prepare data
# -----------------------------------------------------------------------------
Expand Down Expand Up @@ -306,7 +307,7 @@ def terrain_horizon(vertices, quad_indices, observer, hori_acc, azim_num,
# Merge (and crop) images
images = sorted(glob.glob(path_out + "fig_???.png"))
images_inset = sorted(glob.glob(path_out + "inset_images/fig_???.png"))
if (len(images) != len(images_inset) != len(data)):
if len(images) != len(images_inset) != len(data):
raise ValueError("Images incomplete")
os.mkdir(path_out + "merged/")
box = (200, 600, 3000, 2500) # (left, upper, right, lower)
Expand Down
3 changes: 2 additions & 1 deletion visualisation/tri_mesh_vertical_grid.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Description: Visualise GEBCO or MERIT data for subregion in Switzerland with
# a triangle mesh. Use a planar map projection and display
# 'idealised' vertical grid of a GCM/RCM. Optionally display lakes.
# 'idealised' vertical grid of a GCM/RCM. Optionally display
# lakes.
#
# Copyright (c) 2023 ETH Zurich, Christian R. Steger
# MIT License
Expand Down

0 comments on commit 67f6917

Please sign in to comment.