Graphics systems do not generally provide primitives for drawing general smooth curves. The most commonly used technique is to approximate the curve by a connected piece wise straight-line "polyline".
In R the curve defined by the function f over the interval [a,b] could be drawn as follows.
x = seq(a, b, length = 1000)
y = f(x)
plot(x, y, type = "n")
lines(x, y)
y = f(x)
plot(x, y, type = "n")
lines(x, y)
If the function f is discontinuous this approach fails (e.g. consider the function f(x) = 1/x on the interval [-1,1]).
The purpose of this topic is to explore techniques for automatically detecting and locating function discontinuities and drawing the function over the intervals between the discontinuities.
The project could be taken further by developing methods for detecting and locating sharp "corners" in a function's graph. This amounts to finding the discontinuities in the derivative f'(x).
To take on this project you will need to be a competent R programmer (i.e. have completed or be doing 782) and be familiar with notions like "discontinuity", "derivative", "smooth" etc.
0 comments:
Post a Comment