partEllipse: Generates a Fragment of an Ellipse

Description Usage Arguments Value Author(s) See Also Examples

View source: R/partEllipse.r

Description

The function offers the possibility to generate and to manipulate an ellipse. The data will be generated in [-1,1]^2.

Usage

1
2
3
4
partEllipse(mod = "hcirc1", x = 0, y = 0, intensity = 0.1, 
            n = 257, re1 = 0.2, re2 = 0.2, ring.wide = 0.05, 
            no.xax1 = -1, no.xax2 = 1, no.yax1 = -1, no.yax2 = 1, 
            in.r = 0.01, DebugLevel = "HardCore")

Arguments

mod

Defines the type of computation technique. Default is mod = "hcirc1", i.e. the ellipse is generated only by the parameters from mod to no.yax2. Also implemented are mod = "hcirc2" and mod = "hcirc3" where additionally in each point a circle with radius in.r will be generated in the area with an intensity. The effect is that the border of the ellipse is rounded. If mod = "hcirc2" all values in an accepted area will be set to intensity, but if mod = "hcirc3" then values in an accepted area will be cumulated. The result is more blurred. Note that in both cases the costs for computation increase obviously, all the more value exist with intensity!=0.

x

Is the x-coordinate of the center of the ellipse. Defaults to x = 0.

y

Is the y-coordinate of the center of the ellipse. Defaults to y = 0.

intensity

The intensity of the values, those are in the defined area. Defaults to intensity = 0.1.

n

(integer) Is the number of columns and rows in the generated image. It is assumed that the number of columns are equal to the number of rows. Defaults to n = 257.

re1

Is the half length of the horizontal axis. Defaults to re1 = 0.2.

re2

Is the half length of the vertical axis. Defaults to re2 = 0.2.

ring.wide

Defines the wide of the ellipse. This area is set to intensity. Note 0 < \code{ring.wide} <= 1. Defaults to ring.wide = 0.05.

no.xax1

The area of x-axis between -1 and no.xax1 is set to 0. Defaults to no.xax1 = -1.

no.xax2

The area of x-axis between 1 and no.xax2 is set to 0. Defaults to no.xax2 = 1.

no.yax1

The area of y-axis between -1 and no.yax1 is set to 0. Defaults to no.yax1 = -1.

no.yax2

The area of y-axis between 1 and no.yax2 is set to 0. Defaults to no.yax2 = 1.

in.r

If mod = "hcirc2" or mod = "hcirc3" in.r will define the radius of circles that will be generated in each point of the areas with \code{itensity}>0. If mod="hcirc1" in.r will be ignored. Defaults to in.r = 0.01.

DebugLevel

(character) This parameter controls the level of output. Defaults to DebugLevel="HardCore" for no information at all. Alternative implementations are "Detail" if it is desirable to show almost all output on screen or "Normal" for a standard level output.

Value

Returns a matrix.

Author(s)

Joern Schulz [email protected].

See Also

phantom

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Not run: 
ellip1 <- partEllipse()
ellip2 <- partEllipse(x=0.1, y=-0.1, ring.wide=0.4)
ellip3 <- partEllipse(mod="hcirc2", y=0.2, intensity=0.4, 
                  re1=0.5, no.xax1=0, DebugLevel="Normal")
ellip4 <- partEllipse(mod="hcirc3", y=0.2, intensity=0.4, 
                  re1=0.5, no.xax2=0, DebugLevel="Normal")
viewData(list(ellip1, ellip2, ellip3, ellip4,),
         list("Part of an ellipse 1", "Part of an ellipse 2",
              "Part of an ellipse 3", "Part of an ellipse 4"))
rm(ellip1,ellip2,ellip3,ellip4)

## End(Not run)

PET documentation built on May 2, 2019, 2:43 a.m.