Changeset 2437 in lmdz_wrf
- Timestamp:
- Apr 14, 2019, 10:40:55 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/geometry_tools.py
r2436 r2437 228 228 >>> square[3,:] = [-0.5,0.5] 229 229 >>> max_coords_poly(square) 230 [-0.5, 0.5], [-0.5, 0.5], [0.5, 0.5] 230 [-0.5, 0.5], [-0.5, 0.5], [0.5, 0.5], 0.5 231 231 """ 232 232 fname = 'max_coords_poly' 233 233 234 # x-coordinate min/max 234 235 nx = np.min(polygon[:,1]) 235 236 xx = np.max(polygon[:,1]) 237 238 # y-coordinate min/max 236 239 ny = np.min(polygon[:,0]) 237 240 xy = np.max(polygon[:,0]) 238 241 242 # x/y-coordinate maximum of absolute values 239 243 axx = np.max(np.abs(polygon[:,1])) 240 244 ayx = np.max(np.abs(polygon[:,0])) 241 245 242 return [nx, xx], [ny, xy], [ayx, axx] 246 # absolute maximum 247 xyx = np.max([axx, ayx]) 248 249 return [nx, xx], [ny, xy], [ayx, axx], xyx 243 250 244 251 ####### ###### ##### #### ### ## # … … 376 383 377 384 # FROM: http://www.photographers1.com/Sailing/NauticalTerms&Nomenclature.html 378 def zsailing_boat(length=10., beam=1., lbeam=0. 5, sternbp=0.5):385 def zsailing_boat(length=10., beam=1., lbeam=0.4, sternbp=0.5): 379 386 """ Function to define an schematic boat from the z-plane 380 387 length: length of the boat (without stern, default 10) 381 388 beam: beam of the boat (default 1) 382 lbeam: length at beam (as percentage of length, default 0. 5)389 lbeam: length at beam (as percentage of length, default 0.4) 383 390 sternbp: beam at stern (as percentage of beam, default 0.5) 384 391 """
Note: See TracChangeset
for help on using the changeset viewer.