Background
Provide an example of programming R.
Problem
Create a value distribution that, when simulated, creates a curve that resembles:

Essentially, I would like to do something like:
x <- seq( 0, 2, by=0.01 )
y <- sin( 2 * pi * cos( x - 1/2 ) )
plot( x, y * runif( x ) )
But without a set of data points around 0.5:

Question
How would you create such a distribution?
Thank!
source
share