12

In How can I generate and randomly assign color to annular sectors? J.M. showed an interesting way to create a sector graphic using FilledCurve. Unfortunately it was marred by an inferior rendering resulting in a faceted appearance when the concentric rings should be smooth:

faceted

How can we fix this?

Mr.Wizard
  • 271,378
  • 34
  • 587
  • 1,371

1 Answers1

14

Fortunately there is a solution but it appears to be undocumented and takes a bit of guess work.

The magic is:

FilledCurveBoxOptions -> {Method -> {"SplinePoints" -> (* integer value *)}}

This may be set globally or for a Notebook:

SetOptions[InputNotebook[], FilledCurveBoxOptions -> {Method -> {"SplinePoints" -> 30}}]

(Use $FrontEnd in place of InputNotebook[] for persistent global setting.)

By using BaseStyle it may also be set directly in Graphics or with Show:

sec = (* J.M.'s sector graphic *)

Show[sec,
 BaseStyle -> FilledCurveBoxOptions -> {Method -> {"SplinePoints" -> 30}}, 
 ImageSize -> 800]

enter image description here

Style also works but the syntax highlighter will complain of an unknown option:

Style[sec, FilledCurveBoxOptions -> {Method -> {"SplinePoints" -> 30}}]

Related:

Mr.Wizard
  • 271,378
  • 34
  • 587
  • 1,371