# NOT RUN {
## Apple simulation data according to Qin and Lu (2006).
## DOI: 10.13031/2013.20862
# create object
cfgMedia <- c(0.63,30,0,1.4)
cfgSimulation <- c(1e6,0.05,1e-9,3,0.012)
apple <- MCBS(cfgMedia,cfgSimulation)
apple <- Setup(apple)
# calculate first photon
apple$idx <- 1
apple <- Launch(apple)
# see vector coordinates
cat("Start position",apple$x,":",apple$y,"\n")
cat("Direction",apple$u,":",apple$v,":",apple$w,"\n")
# calculate first photon with 10<U+00B0> incident angle
apple$idx <- 1
apple <- Launch(apple,10)
# see vector coordinates
cat("Start position",apple$x,":",apple$y,"\n")
cat("Direction",apple$u,":",apple$v,":",apple$w,"\n")
# }
Run the code above in your browser using DataLab