Skip to content
baptiste edited this page Jun 7, 2013 · 6 revisions

In this example we define a dimer of nanorods, model its optical response to linearly polarised light at fixed incidence, and orientation-averaged optical activity.

library(cda)
library(rgl)
library(ggplot2)

Manually defining a cluster

# dielectric function
wvl <- seq(400, 900)
gold <- epsAu(wvl)

# define a cluster of particles
cl <- list(r = rbind(c(0, 0, 0),
                      c(0, 0, 200)),
            angles = rbind(c(0, 0, 0),
                           c(pi/4, 0, 0)),
            sizes = rbind(c(40, 20, 20),
                          c(40, 20, 20)))

# visualise
rgl.ellipsoids(cl$r, cl$sizes, cl$angles, col="gold")
rgl.viewpoint( theta = 0, phi = 20, fov = 70, zoom = 1)

plot of chunk cluster

calculate extinction, absorption, scattering of linearly polarised light at fixed incidence

# calculate extinction spectrum at fixed incidence

linear <- linear_extinction_spectrum(cl, gold)
ggplot(linear, aes(wavelength, value, color=variable)) + geom_path()

plot of chunk linear

calculate orientation-averaged optical activity

circular <- circular_dichroism_spectrum(cl, gold)

ggplot(circular, aes(wavelength, value, color=variable)) + 
  facet_grid(type~variable, scales="free") + geom_path()

plot of chunk oa

Clone this wiki locally