From b535346ad251f3b88fb09ad43bad4861a0652ee8 Mon Sep 17 00:00:00 2001 From: Kian-Meng Ang Date: Sun, 21 May 2023 20:41:53 +0800 Subject: [PATCH] -Fix typos Found via `codespell` --- R/add_overlay.R | 2 +- R/ambient_shade.R | 2 +- R/convert_path_to_animation_coords.R | 2 +- R/plot_gg.R | 2 +- R/ray_shade.R | 2 +- R/render_depth.R | 2 +- R/render_movie.R | 4 ++-- R/render_obj.R | 2 +- R/render_path.R | 2 +- R/render_snapshot.R | 2 +- R/render_tree.R | 2 +- R/resize_matrix.R | 2 +- README.Rmd | 4 ++-- README.md | 4 ++-- man/add_overlay.Rd | 2 +- man/ambient_shade.Rd | 2 +- man/convert_path_to_animation_coords.Rd | 2 +- man/plot_gg.Rd | 2 +- man/ray_shade.Rd | 2 +- man/render_depth.Rd | 2 +- man/render_movie.Rd | 4 ++-- man/render_obj.Rd | 2 +- man/render_path.Rd | 2 +- man/render_snapshot.Rd | 2 +- man/resize_matrix.Rd | 2 +- 25 files changed, 29 insertions(+), 29 deletions(-) diff --git a/R/add_overlay.R b/R/add_overlay.R index 302d7d8b..fb229242 100644 --- a/R/add_overlay.R +++ b/R/add_overlay.R @@ -7,7 +7,7 @@ #'If the array is 3D, `alphacolor` should also be passed to indicate transparent regions. #'@param alphalayer Default `1`. Defines minimum tranparaency of layer. If transparency already exists in `overlay`, the way `add_overlay` combines #'the two is determined in argument `alphamethod`. -#'@param alphacolor Default `NULL`. If `overlay` is a 3-layer array, this argument tells which color is interpretted as completely transparent. +#'@param alphacolor Default `NULL`. If `overlay` is a 3-layer array, this argument tells which color is interpreted as completely transparent. #'@param alphamethod Default `max`. Method for dealing with pre-existing transparency with `layeralpha`. #'If `max`, converts all alpha levels higher than `layeralpha` to the value set in `layeralpha`. Otherwise, #'this just sets all transparency to `layeralpha`. diff --git a/R/ambient_shade.R b/R/ambient_shade.R index a627b02e..4f4eb4fa 100644 --- a/R/ambient_shade.R +++ b/R/ambient_shade.R @@ -5,7 +5,7 @@ #'@param heightmap A two-dimensional matrix, where each entry in the matrix is the elevation at that point. All points are assumed to be evenly spaced. #'@param anglebreaks Default `90*cospi(seq(5, 85,by =5)/180)`. The angle(s), in degrees, as measured from the horizon from which the light originates. #'@param sunbreaks Default `24`. Number of rays to be sent out in a circle, evenly spaced, around the point being tested. -#'@param maxsearch Default `30`. The maximum horizontal distance that the system should propogate rays to check for surface intersections. +#'@param maxsearch Default `30`. The maximum horizontal distance that the system should propagate rays to check for surface intersections. #'@param multicore Default FALSE. If TRUE, multiple cores will be used to compute the shadow matrix. By default, this uses all cores available, unless the user has #'set `options("cores")` in which the multicore option will only use that many cores. #'@param zscale Default 1. The ratio between the x and y spacing (which are assumed to be equal) and the z axis. diff --git a/R/convert_path_to_animation_coords.R b/R/convert_path_to_animation_coords.R index 2f9908ec..0c63d259 100644 --- a/R/convert_path_to_animation_coords.R +++ b/R/convert_path_to_animation_coords.R @@ -10,7 +10,7 @@ #'@param long Vector of longitudes (or other coordinate in the same coordinate reference system as extent). #'@param lat Vector of latitudes (or other coordinate in the same coordinate reference system as extent). #'@param altitude Elevation of each point, in units of the elevation matrix (scaled by zscale). -#'If left `NULL`, this will be just the elevation value at ths surface, offset by `offset`. If a single value, +#'If left `NULL`, this will be just the elevation value at this surface, offset by `offset`. If a single value, #'all data will be rendered at that altitude. #'@param extent Either an object representing the spatial extent of the scene #' (either from the `raster`, `terra`, `sf`, or `sp` packages), diff --git a/R/plot_gg.R b/R/plot_gg.R index 3c21932d..31a500a0 100644 --- a/R/plot_gg.R +++ b/R/plot_gg.R @@ -70,7 +70,7 @@ #'if `triangulate = TRUE`. #'@param emboss_text Default `0`, max `1`. Amount to emboss the text, where `1` is the tallest feature in the scene. #'@param emboss_grid Default `0`, max `1`. Amount to emboss the grid lines, where `1` is the tallest feature in the scene. -#'By default, the minor grid lines will be half the size of the major lines. Pass a length-2 vector to specify them seperately (second value +#'By default, the minor grid lines will be half the size of the major lines. Pass a length-2 vector to specify them separately (second value #'is the minor grid height). #'@param reduce_size Default `NULL`. A number between `0` and `1` that specifies how much to reduce the resolution of the plot, for faster plotting. By #'default, this just decreases the size of height map, not the image. If you wish the image to be reduced in resolution as well, pass a numeric vector of size 2. diff --git a/R/ray_shade.R b/R/ray_shade.R index f3843d73..8296c28d 100644 --- a/R/ray_shade.R +++ b/R/ray_shade.R @@ -1,6 +1,6 @@ #'@title Calculate Raytraced Shadow Map #' -#'@description Calculates shadow map for a elevation matrix by propogating rays from each matrix point to the light source(s), +#'@description Calculates shadow map for a elevation matrix by propagating rays from each matrix point to the light source(s), #' lowering the brightness at each point for each ray that intersects the surface. #' #'@param heightmap A two-dimensional matrix, where each entry in the matrix is the elevation at that point. All points are assumed to be evenly spaced. diff --git a/R/render_depth.R b/R/render_depth.R index 93269fe3..ec78f1ec 100644 --- a/R/render_depth.R +++ b/R/render_depth.R @@ -41,7 +41,7 @@ #'`1` is the darkest vignetting, while `0` is no vignetting. If vignette is a length-2 vector, the second entry will #'control the blurriness of the vignette effect. #'@param vignette_color Default `"black"`. Color of the vignette. -#'@param vignette_radius Default `1.3`. Radius of the vignette, as a porportion of the image dimensions. +#'@param vignette_radius Default `1.3`. Radius of the vignette, as a proportion of the image dimensions. #'@param width Default `NULL`. Optional argument to pass to `rgl::snapshot3d()` to specify the #'width when `software_render = TRUE`.. #'@param height Default `NULL`. Optional argument to pass to `rgl::snapshot3d()` to specify the diff --git a/R/render_movie.R b/R/render_movie.R index 9e4469b3..ffcc19b6 100644 --- a/R/render_movie.R +++ b/R/render_movie.R @@ -10,7 +10,7 @@ #'Other options are `oscillate` (sine wave around `theta` value, covering 90 degrees), or `custom` (which uses the values from the #'`theta`, `phi`, `zoom`, and `fov` vectors passed in by the user). #'@param frames Default `360`. Number of frames to render. -#'@param fps Default `30`. Frames per second. Recommmend either 30 or 60 for web. +#'@param fps Default `30`. Frames per second. Recommend either 30 or 60 for web. #'@param phi Defaults to current view. Azimuth values, in degrees. #'@param theta Default to current view. Theta values, in degrees. #'@param zoom Defaults to the current view. Zoom value, between `0` and `1`. @@ -36,7 +36,7 @@ #'`1` is the darkest vignetting, while `0` is no vignetting. If vignette is a length-2 vector, the second entry will #'control the blurriness of the vignette effect. #'@param vignette_color Default `"black"`. Color of the vignette. -#'@param vignette_radius Default `1.3`. Radius of the vignette, as a porportion of the image dimensions. +#'@param vignette_radius Default `1.3`. Radius of the vignette, as a proportion of the image dimensions. #'@param audio Default `NULL`. Optional file with audio to add to the video. #'@param progbar Default `TRUE` if interactive, `FALSE` otherwise. If `FALSE`, turns off progress bar. #'Will display a progress bar when adding an overlay or title. diff --git a/R/render_obj.R b/R/render_obj.R index 944b10d7..8958eec0 100644 --- a/R/render_obj.R +++ b/R/render_obj.R @@ -16,7 +16,7 @@ #'@param long Vector of longitudes (or other coordinate in the same coordinate reference system as extent). #'@param lat Vector of latitudes (or other coordinate in the same coordinate reference system as extent). #'@param altitude Default `NULL`. Elevation of each point, in units of the elevation matrix (scaled by `zscale`). -#'If left `NULL`, this will be just the elevation value at ths surface, offset by `offset`. If a single value, +#'If left `NULL`, this will be just the elevation value at this surface, offset by `offset`. If a single value, #'the OBJ will be rendered at that altitude. #'@param xyz Default `NULL`, ignored. A 3 column numeric matrix, with each row specifying the x/y/z #'coordinates of the OBJ model(s). Overrides lat/long/altitude and ignores extent to plot the OBJ in raw rgl coordinates. diff --git a/R/render_path.R b/R/render_path.R index 62d21f47..06c8f179 100644 --- a/R/render_path.R +++ b/R/render_path.R @@ -9,7 +9,7 @@ #'@param long Default `NULL`. Vector of longitudes (or other coordinate in the same coordinate reference system as extent). #'Ignored if lat is an `sf` or `SpatialLineDataFrame` object. #'@param altitude Default `NULL`. Elevation of each point, in units of the elevation matrix (scaled by zscale). -#'If left `NULL`, this will be just the elevation value at ths surface, offset by `offset`. If a single value, +#'If left `NULL`, this will be just the elevation value at this surface, offset by `offset`. If a single value, #'all data will be rendered at that altitude. #'@param groups Default `NULL`. Integer vector specifying the grouping of each lat/long path segment, if lat/long are #'specified as numeric vectors (as opposed to `sf` or `SpatialLineDataFrame` objects, where this information diff --git a/R/render_snapshot.R b/R/render_snapshot.R index 58942dcb..56bb7106 100644 --- a/R/render_snapshot.R +++ b/R/render_snapshot.R @@ -20,7 +20,7 @@ #'`1` is the darkest vignetting, while `0` is no vignetting. If vignette is a length-2 vector, the second entry will #'control the blurriness of the vignette effect. #'@param vignette_color Default `"black"`. Color of the vignette. -#'@param vignette_radius Default `1.3`. Radius of the vignette, as a porportion of the image dimensions. +#'@param vignette_radius Default `1.3`. Radius of the vignette, as a proportion of the image dimensions. #'@param clear Default `FALSE`. If `TRUE`, the current `rgl` device will be cleared. #'@param instant_capture Default `TRUE` if interactive, `FALSE` otherwise. If `FALSE`, a slight delay is added #'before taking the snapshot. This can help stop prevent rendering issues when running scripts. diff --git a/R/render_tree.R b/R/render_tree.R index 1ee23e54..cf763479 100644 --- a/R/render_tree.R +++ b/R/render_tree.R @@ -202,7 +202,7 @@ render_tree = function(lat = NULL, # Handling case where both full tree and parts are specified if(custom_tree && has_custom_tree && (has_custom_crown || has_custom_trunk)) { - warning("Using `custom_obj_tree` over models specied in `custom_obj_crown` and `custom_obj_trunk`") + warning("Using `custom_obj_tree` over models specified in `custom_obj_crown` and `custom_obj_trunk`") has_custom_crown = FALSE has_custom_trunk = FALSE } diff --git a/R/resize_matrix.R b/R/resize_matrix.R index 53dff6d9..1a0d5313 100644 --- a/R/resize_matrix.R +++ b/R/resize_matrix.R @@ -8,7 +8,7 @@ #'e.g. 0.5 would halve the resolution for the width. #'@param height Default `NULL`. Alternative to `scale` argument. The desired output width. If `height` is less than 1, it will be interpreted as a scaling factor-- #'e.g. 0.5 would halve the resolution for the height. -#'@param method Default `bilinear`. Method of interpolation. Alteratively `cubic`, which is slightly smoother, although +#'@param method Default `bilinear`. Method of interpolation. Alternatively `cubic`, which is slightly smoother, although #'current implementation slightly scales the image. #'@export #'@examples diff --git a/README.Rmd b/README.Rmd index 271da8c8..7d412a39 100644 --- a/README.Rmd +++ b/README.Rmd @@ -68,7 +68,7 @@ Also included are functions to add additional effects and information to your 3D - `render_highquality()` renders in the scene with a built-in pathtracer, powered by the **rayrender** package. Use this for high-quality maps with realistic light transport. - `render_depth()` generates a depth of field effect for the 3D map. The user can specify the focal distance, focal length, and f-stop of the camera, as well as aperture shape and bokeh intensity. This either plots the image to the local device, or saves it to a file if given a filename. - `render_label()` adds a text label to the `x` and `y` coordinate of the map at a specified altitude `z` (in units of the matrix). The altitude can either be specified relative to the elevation at that point (the default), or absolutely. -- `render_water()` adds a 3D tranparent water layer to 3D maps, after the rgl device has already been created. This can either add to a map that does not already have a water layer, or replace an existing water layer on the map. +- `render_water()` adds a 3D transparent water layer to 3D maps, after the rgl device has already been created. This can either add to a map that does not already have a water layer, or replace an existing water layer on the map. - `render_compass()` places a compass on the map in 3D. - `render_path()` adds a 3D path to the current scene, using latitude/longitude or coordinates in the reference system defined by the extent object. If no altitude is provided, the path will be elevated a constant offset above the heightmap. - `render_points()` Adds 3D points to the current scene, using latitude/longitude or coordinates in the reference system defined by the extent object. If no altitude is provided, the points will be elevated a constant offset above the heightmap. @@ -252,7 +252,7 @@ rgl::rgl.close() system("rm dem_01.tif") ``` -You can also easily add a water layer by setting `water = TRUE` in `plot_3d()` (and setting `waterdepth` if the water level is not 0), or by using the function `render_water()` after the 3D map has been rendered. You can customize the appearance and transparancy of the water layer via function arguments. Here's an example using bathymetric/topographic data of Monterey Bay, CA (included with rayshader): +You can also easily add a water layer by setting `water = TRUE` in `plot_3d()` (and setting `waterdepth` if the water level is not 0), or by using the function `render_water()` after the 3D map has been rendered. You can customize the appearance and transparency of the water layer via function arguments. Here's an example using bathymetric/topographic data of Monterey Bay, CA (included with rayshader): ```{r README_three-d-water, fig.width = 10, fig.height = 8} diff --git a/README.md b/README.md index 5deb8018..ee53331e 100644 --- a/README.md +++ b/README.md @@ -124,7 +124,7 @@ your 3D visualizations: the map at a specified altitude `z` (in units of the matrix). The altitude can either be specified relative to the elevation at that point (the default), or absolutely. -- `render_water()` adds a 3D tranparent water layer to 3D maps, after +- `render_water()` adds a 3D transparent water layer to 3D maps, after the rgl device has already been created. This can either add to a map that does not already have a water layer, or replace an existing water layer on the map. @@ -347,7 +347,7 @@ render_highquality(samples=200, scale_text_size = 24,clear=TRUE) You can also easily add a water layer by setting `water = TRUE` in `plot_3d()` (and setting `waterdepth` if the water level is not 0), or by using the function `render_water()` after the 3D map has been -rendered. You can customize the appearance and transparancy of the water +rendered. You can customize the appearance and transparency of the water layer via function arguments. Here’s an example using bathymetric/topographic data of Monterey Bay, CA (included with rayshader): diff --git a/man/add_overlay.Rd b/man/add_overlay.Rd index 17b24087..03cfc863 100644 --- a/man/add_overlay.Rd +++ b/man/add_overlay.Rd @@ -22,7 +22,7 @@ If the array is 3D, `alphacolor` should also be passed to indicate transparent r \item{alphalayer}{Default `1`. Defines minimum tranparaency of layer. If transparency already exists in `overlay`, the way `add_overlay` combines the two is determined in argument `alphamethod`.} -\item{alphacolor}{Default `NULL`. If `overlay` is a 3-layer array, this argument tells which color is interpretted as completely transparent.} +\item{alphacolor}{Default `NULL`. If `overlay` is a 3-layer array, this argument tells which color is interpreted as completely transparent.} \item{alphamethod}{Default `max`. Method for dealing with pre-existing transparency with `layeralpha`. If `max`, converts all alpha levels higher than `layeralpha` to the value set in `layeralpha`. Otherwise, diff --git a/man/ambient_shade.Rd b/man/ambient_shade.Rd index 6b07ca33..ab74a427 100644 --- a/man/ambient_shade.Rd +++ b/man/ambient_shade.Rd @@ -24,7 +24,7 @@ ambient_shade( \item{sunbreaks}{Default `24`. Number of rays to be sent out in a circle, evenly spaced, around the point being tested.} -\item{maxsearch}{Default `30`. The maximum horizontal distance that the system should propogate rays to check for surface intersections.} +\item{maxsearch}{Default `30`. The maximum horizontal distance that the system should propagate rays to check for surface intersections.} \item{multicore}{Default FALSE. If TRUE, multiple cores will be used to compute the shadow matrix. By default, this uses all cores available, unless the user has set `options("cores")` in which the multicore option will only use that many cores.} diff --git a/man/convert_path_to_animation_coords.Rd b/man/convert_path_to_animation_coords.Rd index 91acc555..ae0bbc6e 100644 --- a/man/convert_path_to_animation_coords.Rd +++ b/man/convert_path_to_animation_coords.Rd @@ -41,7 +41,7 @@ convert_path_to_animation_coords( \item{long}{Vector of longitudes (or other coordinate in the same coordinate reference system as extent).} \item{altitude}{Elevation of each point, in units of the elevation matrix (scaled by zscale). -If left `NULL`, this will be just the elevation value at ths surface, offset by `offset`. If a single value, +If left `NULL`, this will be just the elevation value at this surface, offset by `offset`. If a single value, all data will be rendered at that altitude.} \item{extent}{Either an object representing the spatial extent of the scene diff --git a/man/plot_gg.Rd b/man/plot_gg.Rd index aade360c..852ef072 100644 --- a/man/plot_gg.Rd +++ b/man/plot_gg.Rd @@ -135,7 +135,7 @@ if `triangulate = TRUE`.} \item{emboss_text}{Default `0`, max `1`. Amount to emboss the text, where `1` is the tallest feature in the scene.} \item{emboss_grid}{Default `0`, max `1`. Amount to emboss the grid lines, where `1` is the tallest feature in the scene. -By default, the minor grid lines will be half the size of the major lines. Pass a length-2 vector to specify them seperately (second value +By default, the minor grid lines will be half the size of the major lines. Pass a length-2 vector to specify them separately (second value is the minor grid height).} \item{reduce_size}{Default `NULL`. A number between `0` and `1` that specifies how much to reduce the resolution of the plot, for faster plotting. By diff --git a/man/ray_shade.Rd b/man/ray_shade.Rd index f6b8c70f..6b583d9b 100644 --- a/man/ray_shade.Rd +++ b/man/ray_shade.Rd @@ -58,7 +58,7 @@ Use this instead of `sunaltitude` to create a softer shadow by specifying a wide Matrix of light intensities at each point. } \description{ -Calculates shadow map for a elevation matrix by propogating rays from each matrix point to the light source(s), +Calculates shadow map for a elevation matrix by propagating rays from each matrix point to the light source(s), lowering the brightness at each point for each ray that intersects the surface. } \examples{ diff --git a/man/render_depth.Rd b/man/render_depth.Rd index b67e6465..8e9f3ec2 100644 --- a/man/render_depth.Rd +++ b/man/render_depth.Rd @@ -112,7 +112,7 @@ control the blurriness of the vignette effect.} \item{vignette_color}{Default `"black"`. Color of the vignette.} -\item{vignette_radius}{Default `1.3`. Radius of the vignette, as a porportion of the image dimensions.} +\item{vignette_radius}{Default `1.3`. Radius of the vignette, as a proportion of the image dimensions.} \item{progbar}{Default `TRUE` if in an interactive session. Displays a progress bar.} diff --git a/man/render_movie.Rd b/man/render_movie.Rd index 00a4e213..29526bd8 100644 --- a/man/render_movie.Rd +++ b/man/render_movie.Rd @@ -42,7 +42,7 @@ Other options are `oscillate` (sine wave around `theta` value, covering 90 degre \item{frames}{Default `360`. Number of frames to render.} -\item{fps}{Default `30`. Frames per second. Recommmend either 30 or 60 for web.} +\item{fps}{Default `30`. Frames per second. Recommend either 30 or 60 for web.} \item{phi}{Defaults to current view. Azimuth values, in degrees.} @@ -84,7 +84,7 @@ control the blurriness of the vignette effect.} \item{vignette_color}{Default `"black"`. Color of the vignette.} -\item{vignette_radius}{Default `1.3`. Radius of the vignette, as a porportion of the image dimensions.} +\item{vignette_radius}{Default `1.3`. Radius of the vignette, as a proportion of the image dimensions.} \item{title_position}{Default `northwest`. Position of the title.} diff --git a/man/render_obj.Rd b/man/render_obj.Rd index 3d007bf1..71bc9676 100644 --- a/man/render_obj.Rd +++ b/man/render_obj.Rd @@ -40,7 +40,7 @@ the previously aforementioned packages) which will be automatically converted to \item{long}{Vector of longitudes (or other coordinate in the same coordinate reference system as extent).} \item{altitude}{Default `NULL`. Elevation of each point, in units of the elevation matrix (scaled by `zscale`). -If left `NULL`, this will be just the elevation value at ths surface, offset by `offset`. If a single value, +If left `NULL`, this will be just the elevation value at this surface, offset by `offset`. If a single value, the OBJ will be rendered at that altitude.} \item{xyz}{Default `NULL`, ignored. A 3 column numeric matrix, with each row specifying the x/y/z diff --git a/man/render_path.Rd b/man/render_path.Rd index c4f95045..e998a037 100644 --- a/man/render_path.Rd +++ b/man/render_path.Rd @@ -36,7 +36,7 @@ Can also be an `sf` or `SpatialLineDataFrame` object.} Ignored if lat is an `sf` or `SpatialLineDataFrame` object.} \item{altitude}{Default `NULL`. Elevation of each point, in units of the elevation matrix (scaled by zscale). -If left `NULL`, this will be just the elevation value at ths surface, offset by `offset`. If a single value, +If left `NULL`, this will be just the elevation value at this surface, offset by `offset`. If a single value, all data will be rendered at that altitude.} \item{groups}{Default `NULL`. Integer vector specifying the grouping of each lat/long path segment, if lat/long are diff --git a/man/render_snapshot.Rd b/man/render_snapshot.Rd index 5c5cfe61..bbe8395e 100644 --- a/man/render_snapshot.Rd +++ b/man/render_snapshot.Rd @@ -79,7 +79,7 @@ control the blurriness of the vignette effect.} \item{vignette_color}{Default `"black"`. Color of the vignette.} -\item{vignette_radius}{Default `1.3`. Radius of the vignette, as a porportion of the image dimensions.} +\item{vignette_radius}{Default `1.3`. Radius of the vignette, as a proportion of the image dimensions.} \item{instant_capture}{Default `TRUE` if interactive, `FALSE` otherwise. If `FALSE`, a slight delay is added before taking the snapshot. This can help stop prevent rendering issues when running scripts.} diff --git a/man/resize_matrix.Rd b/man/resize_matrix.Rd index fde74e48..ec203417 100644 --- a/man/resize_matrix.Rd +++ b/man/resize_matrix.Rd @@ -23,7 +23,7 @@ e.g. 0.5 would halve the resolution for the width.} \item{height}{Default `NULL`. Alternative to `scale` argument. The desired output width. If `height` is less than 1, it will be interpreted as a scaling factor-- e.g. 0.5 would halve the resolution for the height.} -\item{method}{Default `bilinear`. Method of interpolation. Alteratively `cubic`, which is slightly smoother, although +\item{method}{Default `bilinear`. Method of interpolation. Alternatively `cubic`, which is slightly smoother, although current implementation slightly scales the image.} } \description{