Translate Code?

Roger Guay irog at mac.com
Thu Dec 3 14:48:58 EST 2020


Can someone please translate the code below into LC ? I believe it to be Python?
alpha=2
n=1000
x=rep(0,n)
y=rep(0,n)

for (i in 2:n){
   theta=runif(1)*2*pi
   f=runif(1)^(-1/alpha)
   x[i]=x[i-1]+f*cos(theta)
   y[i]=y[i-1]+f*sin(theta)
}

Thanks very much,

Roger


More information about the use-livecode mailing list