6

Mathematica returns

False

when I execute

Element[{0, 0, 0}, Sphere[{0, 0, 0}]]

whereas

 Element[{0, 0, 0}, Cuboid[]]

returns True as expected. Any clue why this could be happening?

m_goldberg
  • 107,779
  • 16
  • 103
  • 257
Mike
  • 585
  • 3
  • 14

1 Answers1

10

Sphere is a two-dimensional object:

RegionDimension[Sphere[{0, 0, 0}]]
(* 2 *)

so its center is not included in the defined region. Only the shell is considered:

Element[Normalize@{1, 1, 1}, Sphere[{0, 0, 0}]]
(* True *)

You can use Ball instead:

RegionDimension[Ball[{0, 0, 0}]]
(* 3 *)

Element[{0, 0, 0}, Ball[{0, 0, 0}]]
(* True *)