Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

elliptic cylinder #33

Open
stevengj opened this issue Nov 13, 2018 · 2 comments · May be fixed by #64
Open

elliptic cylinder #33

stevengj opened this issue Nov 13, 2018 · 2 comments · May be fixed by #64

Comments

@stevengj
Copy link
Collaborator

stevengj commented Nov 13, 2018

From NanoComp/meep#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 and Ellipsoid objects.

cc @HomerReid

@stevengj
Copy link
Collaborator Author

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.)

@smartalecH smartalecH linked a pull request Oct 6, 2022 that will close this issue
@dalarev
Copy link

dalarev commented Dec 19, 2024

Assuming the elliptical cylinder has a 2d cross section while simply being extruded along the 3rd dimension, wouldn't an mp.Ellipse with size = mp.inf along the 3rd dimension work well for getting the desired 2d cross section? This seems to be working for my use case, so far.

If the elliptical cylinder is only desired in a finite portion of the model space, then Blocks of air could be used to truncate the unwanted portions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants