3
$\begingroup$

I use 3dtools to draw this cones enter image description here

shaded cone

enter image description here

I see difficult when I use Mathematica

Graphics3D[Cone[{{0, 0, 0}, {0, 0, 3}}, 2], Boxed -> False]

enter image description here

How can I draw dashed line behind of a cone?

UPDATE

I tried

    basegraph = 
     Graphics3D[Cone[{{0, 0, 0}, {0, 0, 1}}, 1.2], Boxed -> False]
ResourceFunction["Graphics3DSketch"][basegraph]

I get

enter image description here

How can I get shaded cone like my picture?

$\endgroup$
6
  • 3
    $\begingroup$ Have you seen 256898 ? $\endgroup$
    – Syed
    Aug 20 at 14:23
  • 3
    $\begingroup$ Also see Graphics3DSketch from the Wolfram Function Repository mentioned in this popular post. $\endgroup$
    – Syed
    Aug 20 at 14:32
  • $\begingroup$ Thanks. I will try. $\endgroup$ Aug 20 at 14:35
  • $\begingroup$ You can also use the trick I used in this answer $\endgroup$
    – Lukas Lang
    Aug 20 at 17:33
  • $\begingroup$ DynamicModule[{point = 4 {1, -1, 1}, vertical = {0, 0, 1}, angle = 10 Degree}, Overlay[ Graphics3D[#, Boxed -> False, Lighting -> DirectionalLight[White, {{1, 0, 1}, {0, 0, 0}}], ViewPoint -> Dynamic@point, ViewVertical -> Dynamic@vertical, ViewAngle -> Dynamic@angle] & /@ {{EdgeForm[ AbsoluteThickness[3]], Cone[{{0, 0, 0}, {0, 0, 3}}, 2]}, {EdgeForm[ Directive@{AbsoluteThickness[2], AbsoluteDashing[{1, 9}, 0, "Round"]}], FaceForm[], Cone[{{0, 0, 0}, {0, 0, 3}}, 2]}}, All, 1] ] $\endgroup$
    – cvgmt
    Aug 21 at 13:10

1 Answer 1

5
$\begingroup$

Use the excellent answer of @LukasLang, we complete the animation。

Animate[DynamicModule[{point = 10 {Cos[t], Sin[t], .5}, 
   vertical = {0, 0, 1}, angle = 8 Degree}, 
  Overlay[Graphics3D[#, Boxed -> False, 
      Lighting -> DirectionalLight[White, {{1, 0, 1}, {0, 0, 0}}], 
      ViewPoint -> Dynamic@point, ViewVertical -> Dynamic@vertical, 
      ViewAngle -> Dynamic@angle] & /@ {{EdgeForm[
       AbsoluteThickness[3]], 
      Cone[{{0, 0, 0}, {0, 0, 3}}, 2]}, {EdgeForm[
       Directive@{AbsoluteThickness[2], 
         AbsoluteDashing[{2, 6}, 0, "Round"]}], FaceForm[], 
      Cone[{{0, 0, 0}, {0, 0, 3}}, 2]}}, All, 1]], {t, 0, 
  2 π, .1}, AnimationRate -> 5]

enter image description here

$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.