I am creating a cylinder, whose center disk is placed at position vector v1
and whose orientation is given by the disk's normal vector n1.
The second object is a disk, embedded in the same box, but since I don't know how to draw disks in $3D$ in Mathematica, I use a very thin cylinder to approximate the disk, which is placed at v2
and orientation n2.
Both have diameter d=4.
Here's the setup:
v1 = {0.5, 0.5, 0.5};
n1 = {1, 1, 1};
v2 = {1, 1.5, 0};
n2 = {1, 1, 0};
d = 4;
ef1 = 5; (*elongation factor of cylinder 1 to find endpoints to draw*)
\
ef2 = 0.00001; (*elongation factor of cylinder 2, to approximate disk*)
\
cyl1 = Cylinder[{v1 - ef1*n1, v1 + ef1*n1}, d/2];
cyl2 = Cylinder[{v2 - ef2*n2, v2 + ef2*n2}, d/2];
And drawn together: Graphics3D[{Opacity[.5], cyl1, cyl2}]
:
As we see in the image, the cylinder is crossing a portion of the disk, and I'm trying to learn if:
- Is there way a to compute the area of the disk that is in intersection with the crossing cylinder? A naive approach using
Area@RegionIntersection[cyl1, cyl2]
seems not to work (returnsUndefined
).
n1, n2
you should correct your formulas tocyl1 = Cylinder[{v1 - ef1*n1, v1 + ef1*n1}, d/2];cyl2 = Cylinder[{v2 - ef2*n2, v2 + ef2*n2}, d/2];
$\endgroup$