I have the necessary information to define a cone and plot it in Mathematica:
Rc = 0.38663124715321806`;
cvec = {0.9549268454424656`,
0.693794964347954`, -0.18315267078439607`};
openCone[{{x1_, y1_, z1_}, {x2_, y2_, z2_}}, r_] := {CapForm[None],
Tube[{{x1, y1, z1}, {x2, y2, z2}}, {r, 0}]}
cone = Graphics3D[{openCone[{cvec, {0, 0, 0}}, Rc]}];
where I have used the openCone[]
defined here: Is there a Graphics primitive for a cone without a base?
This is all good. Now I would like to go one step further. I have the locations of two vectors lying on the cone:
tvec1={1.15282, 0.490827, 0.0797662};
tvec2={0.823045, 0.944722, 0.0797662};
Plotting everything together,
Show[cone,
Graphics3D[{Thick, Blue, Line[{{0, 0, 0}, tvec1}],
Line[{{0, 0, 0}, tvec2}],
{Red, Point[cvec]}}]
]
I get the picture:
Now, what I want to do is plot only the section of the cone that lies between the two blue lines (make a Graphics3D
object)-- let's say the smaller section. How would I do that?
The simplest theoretical approach that I can think of is to define the plane comprised of tvec1
, tvec2
and {0,0,0}
, and plot only the 'points' that lie above (or below) the plane. But I have no idea how to implement this, especially since all I have is a Graphics3D
object. Please help.
ADDENDUM: Why I am asking for a new Graphics3D
object ...
I want more than just to display part of the cone (hence, an option like ClipPlanes
doesn't suffice). I want a new Graphics3D
object so that I can do other operations with it.
In particular, I have a collection of many of these cones and other Graphics3D
objects pieced together, and I want to apply the smoothing procedures GraphDiffusionFlow[]
and MeanCurvatureFlow[]
to the whole complex (defined here: Smoothing 3D contours as post processing).
My understanding is that I need a meshed surface for applying these functions, hence my request for a Graphics3D
object so that I can use something like DiscretizeGraphics[]
. As mentioned in a comment, the current definition of openCone
doesn't support DiscretizeGraphics[]
since contains a Tube
. So I need an alternative.
DiscretizeGraphics/BoundaryDiscretizeGraphics
onopenCone
(or any primitives created usingTube
s) because (unlikeCone
, Cylinder,
Cuboid` etc.)Tube
is not a region primitive. $\endgroup$RegionIntersection[Cone[{cvec, {0, 0, 0}}, Rc], HalfSpace[Cross[tvec2, tvec1], {0, 0, 0}]]
, but the results seem to be mixed. $\endgroup$