Open stevengj opened 6 years ago
Basically, this will be a subtype of cylinder that has additional properties: r2
(other semiaxis) and e1
and e2
(the two ellipse axes).
Similar to a block
object, the three vectors (r1e1,r2e2,axis) define a 3x3 matrix M. You can cache inv(M) in the object (just like for a block). To check whether a point is in the elliptical cylinder, you first multiply inv(M) * (point - center)
to convert the displacement to the "cylinder coordinates". In this coordinate system everything becomes easy: it is just an ordinary circular cylinder oriented along the 3rd axis. (To compute the normal vector, you will have to rotate the resulting vector back to the original coordinate system.)
From https://github.com/stevengj/meep/issues/606: A recent post from the mailing list involved a request for an elliptic cylinder to be added as a new geometry object. This would have to be added first to libctl. An elliptic cylinder would be a useful compliment to the existing
Cylinder
andEllipsoid
objects.cc @HomerReid