0
$\begingroup$

Description

This is in relation to this question. I am trying to derive this conical figure yet I seem to get an error with this code. I would be happy if someone could point out how to solve this problem

Code

Module[
 {
  R1 = Cuboid[{0, 0, 0}, {5, 5, 5}],
  R2 = Cone[{{0, 0, 0}, {5, 5, 5}}, 3]
  },
 Show[{
   Graphics3D[{[email protected], R2}], 
   RegionPlot3D[R1, PlotStyle -> Directive[White, [email protected]]],
   RegionPlot3D[
    DiscretizeRegion[RegionIntersection[R2, R1], PrecisionGoal -> 10]
    ]
   },
  Boxed -> False]
 ]

Error

Skeleton is not a graphics directive
Skeleton is not Graphics3D primitive or directive
DiscretizeRegion was unable to discretize the region RegionIntersection

System

Windows 10 x 64
Mathematica 10.3

$\endgroup$
11
  • 1
    $\begingroup$ Works in 10.4 and 11.0 (I confirm it doesn't in 10.3) $\endgroup$
    – Szabolcs
    Commented Nov 21, 2016 at 11:22
  • $\begingroup$ Is there a workaround to this problem? It seems like the problem lays with DiscretizeRegion but it hasn't been updated since v10.2 $\endgroup$ Commented Nov 21, 2016 at 11:26
  • $\begingroup$ I don't know. "Updated in 10.2" means almost nothing. I think it refers to the API, not the implementation, and it's missing for several symbols even when the API did change ... 11.0 is clearly better at discretizing regions than 10.2 was. $\endgroup$
    – Szabolcs
    Commented Nov 21, 2016 at 11:32
  • 1
    $\begingroup$ The conical output This is an output from my MacBook Pro . I looks like you have something else unintentionally pasted in your notebook. Open a new project and paste exactly the code used here. Can you also attached your notebooks here? Add a SystemInformation[] $\endgroup$ Commented Nov 21, 2016 at 13:44
  • $\begingroup$ What version of Mathematica you run it on? $\endgroup$ Commented Nov 21, 2016 at 13:51

1 Answer 1

3
$\begingroup$

I am not sure I understand what the issue is and only post this in case it facilitates:

Module[{r1 = Cuboid[{0, 0, 0}, {5, 5, 5}], 
  r2 = Cone[{{0, 0, 0}, {5, 5, 5}}, 3]},
 i = DiscretizeRegion[RegionIntersection[r1, r2]];
 Show[
  Graphics3D[{Opacity[0.3], White, r1, Opacity[0.1], LightBlue, r2}],
  RegionPlot3D[i, PlotPoints -> 50],
  Boxed -> False, Background -> Black
  ]
 ]

enter image description here

Improvements to discretization may be suggested by others.

$\endgroup$
2
  • $\begingroup$ Thank you for your reply, but it doesn't work in version v10.3. Up-vote for the effort! :P $\endgroup$ Commented Nov 21, 2016 at 13:35
  • $\begingroup$ @e.doroskevic ok. I hope others can be helpful. Good luck:) $\endgroup$
    – ubpdqn
    Commented Nov 21, 2016 at 13:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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