6
$\begingroup$

I try to mesh a sphere (examplary) in different qualities, using MaxCellMeasure:

DiscretizeRegion[Sphere[], MaxCellMeasure -> #] & /@ {.1, 1, 10}

enter image description here

but result shows no diffenerence.

What could be the reason? Thanks!

$\endgroup$
19
  • 4
    $\begingroup$ You need to shrink AccuracyGoal as well: DiscretizeRegion[Sphere[], MaxCellMeasure -> 0.01, AccuracyGoal -> 0]. $\endgroup$ Jun 24 at 14:08
  • 2
    $\begingroup$ @rhemans Astonishing because Volume[Sphere[]]gives Undefined $\endgroup$ Jun 24 at 15:11
  • 2
    $\begingroup$ Volume[Ball[]] gives $\frac{4 \pi }{3}$. I think Sphere is surface only just like in 2D where Disk[] has area, but Circle[] doesn't. $\endgroup$
    – Syed
    Jun 24 at 15:37
  • 1
    $\begingroup$ What @Syed said: Ball[] and Disk[] are "full" regions, while Sphere[] and Circle[] are a dimension less than their embedding dimension. $\endgroup$ Jun 24 at 15:38
  • 1
    $\begingroup$ That doesn't change the fact that the default figure for MaxCellMeasure is "Volume" both for Ball and Sphere. $\endgroup$
    – rhermans
    Jun 24 at 15:40

2 Answers 2

4
$\begingroup$

In this case DiscretizeGraphics does what you want:

DiscretizeGraphics[Sphere[], MaxCellMeasure -> {2 -> #}] & /@ {.01, .1, 1, 10}

enter image description here

Funnily enough the documentation for MaxCellMeasure has an example similar to this question. It doesn't work now either. https://wolfram.com/xid/0dqt848dvp2-ej8ci4

$\endgroup$
4
  • $\begingroup$ Thanks, I was wondering too about this example, which doesn't evaluate as indicated. The problem with default of MaxCellMeasure still persists if you change your example to DiscretizeGraphics[Sphere[], MaxCellMeasure -> { #}] & /@ {.01, .1, 1, 10} $\endgroup$ Jul 4 at 6:31
  • $\begingroup$ I think the default dimension for MaxCellMeasure is d for a MeshRegion and d-1 for a BoundaryMeshRegion, where d is the embedding dimension. Since Sphere has dimension 2, we need to specify it. $\endgroup$
    – Greg Hurst
    Jul 4 at 12:27
  • $\begingroup$ Probably yes, remains surprising that DiscretizeGraphics[Sphere[], MaxCellMeasure -> {"Volume"-> .1}] is accepted without error message $\endgroup$ Jul 4 at 12:41
  • $\begingroup$ Also surprising the default isn’t the dimension of the region. $\endgroup$
    – Greg Hurst
    Jul 4 at 12:44
1
+50
$\begingroup$

You could use "SpherePoints" and "ConvexHull" like:

Table[ConvexHullRegion[SpherePoints[i]] // Region , {i, 50, 550, 
  100}] 

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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