Is there a Graphics primitive for a cone without a base?

openCone[{{x1_, y1_, z1_}, {x2_, y2_, z2_}}, r_] := 
 {CapForm[None], Tube[{{x1, y1, z1}, {x2, y2, z2}}, {r, 0}]}

Graphics3D[openCone[{{0, 0, 1}, {1, 1, 0}}, 1]]

enter image description here


I like Rahul's approach the most. An alternative way to produce open cones is to treat the cone as a NURBS surface:

openCone[{p1_?VectorQ, p2_?VectorQ}, r_?NumericQ] :=
    With[{tr = Composition[TranslationTransform[p1],
                           RotationTransform[{{0, 0, 1}, p2 - p1}]]}, 
         BSplineSurface[{tr /@ PadRight[r {{1, 0}, {1, 1}, {-1, 1}, {-1, 0},
                                           {-1, -1}, {1, -1}, {1, 0}},
                                        {Automatic, 3}], ConstantArray[p2, 7]}, 
                        SplineClosed -> {False, True}, SplineDegree -> {1, 2}, 
                        SplineKnots -> {{0, 0, 1, 1},
                                        {0, 0, 0, 1/4, 1/2, 1/2, 3/4, 1, 1, 1}},
                        SplineWeights ->
                        ConstantArray[{1, 1/2, 1/2, 1, 1/2, 1/2, 1}, 2]]]

With[{p1 = {0, 0, 1}, p2 = {1, 1, 0}, r = 1},
     {Graphics3D[openCone[{p1, p2}, r], Boxed -> False], 
      Graphics3D[Cone[{p1, p2}, r], Boxed -> False]} // GraphicsRow]

open and closed cones


Graphics3D[Cone[],
 ClipPlanes -> {{0, 0, 1, 1}},
 Axes -> True]

enter image description here

Tags:

Graphics3D