dspoint: Individual points and their images In dsmodels: A Language to Facilitate Simulation and Visualization of Two-Dimensional Dynamical Systems

Description

pnt and dspoint are the same function. This function takes a single point and creates an object displaying the point, and optionally it's behavior throughout iterations of the system.

Usage

 1 2 3 4 dspoint(x, y, label = "", pch = 21, size = 2, col = "blue", regionCol = NULL, image = "", offset = NULL, display = TRUE, fixed = FALSE, iters = 0, attractor = FALSE, crop = TRUE, artificial = FALSE, ...) 

Arguments

 x The x-coordinate of the point. y The y-coordinate of the point. label A string label. Text can be input in the form of pseudo-LaTeX code within quotes. See TeX for more details. Text will appear above the dot by default. Please see the offset parameter to adjust. pch Plotting 'character' or symbol to use, default is 21 (filled circle). See help(pch) for details. size Determines the size of the point. col A string color for the point. Use "NA" or "" to hide the point. See also display. regionCol An alternate color used to define the color of the region for simbasins(). Defaults to col or col[1]. image A single color as a string, or a vector of colors as a string. See details for more information. offset This will offset the label. Enter as c(x, y). Defaults to an automatic scale dependent on the dsrange's y axis size. display Set display = FALSE to hide the dot, but still add to your system. Mostly useful for simbasins(). fixed A flag to declare a fixed point. The image of any fixed point is should be the original point. iters Determines the number of iterations of the function when making a color gradient. Use col = color1, image = color2, iters = n to create a gradient of colors between color1 and color2. See details for more information. attractor A flag to delcare a point as an attractor: a fixed point for the function that other points converge to. Used in simbasins(). crop If crop==TRUE points outside of defined range will be cropped, and no further images will be calculated. artificial For internal use. ... Extra graphical parameters to be sent through points

Images of the point

The dspoint object begins with an initial point. Images of the point may be displayed in three ways.

If the image parameter is a single color and iters is not set, then dspoint will calculate and display the image of the point under the model's function in that color.

If the image parameter is a vector of k colors, then dspoint calculates and displays k successive images of the point using those colors. The string "NA" may be used to avoid displaying an iteration.

If the image parameter is a single color and iters is defined, then iters successive images are displayed, using a gradient between col and image.

In most cases, rather than specifying col and image separately, they may be combined into a single vector.

Examples

  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 library(dsmodels) fun <- function(X,Y) { list( X/exp(Y), Y/exp(X) ) } model <- dsmodel(fun, title = "A Single Point") model + dsrange(3,3, discretize = .09) + dspoint(1,2, col = "magenta") dsmodel(fun, title = "A Point and a Label") + dsrange(3,3, discretize = .09) + dspoint(2.2, 2.1, label = "$x^{\\alpha}$", col = "green") dsmodel(fun, title = "A Point and Iterations of that Point") + dsrange(3,3, discretize = .09) + dspoint(1,1, col = "red", image = c("orange","yellow")) dsmodel(fun, title = "Iterations of a Point over a Color Gradient") + dsrange(3,3, discretize = .09) + dspoint(0.2, 0.5, image = "pink", iters = 3, col = "grey") 

dsmodels documentation built on July 22, 2017, 9:02 a.m.