Description Usage Arguments Value Examples
Cretaes IFS object of class S3
1 |
... |
contraction functions. |
porb_vec |
vector of probabilities |
Creates object of class S3
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | #Define contraction functions
f1 <- function(x,y) {
x<-0.5*x - 0.5
y<-0.5*y + 0.5
return(c(x,y))
}
f2<-function(x,y){
x<-0.5*x - 0.5
y<-0.5*y - 0.5
return(c(x,y))
}
f3<-function(x,y){
x<-0.5*x + 0.5
y<-0.5*y - 0.5
return(c(x,y))
}
#Define probability vector
p <- c(0.3333, 0.3333, 0.3334)
sierpinski_points <-createIFS(f1, f2, f3, prob_vec=p)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.