12
$\begingroup$

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?

$\endgroup$

1 Answer 1

14
$\begingroup$

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:

$\endgroup$
2
  • $\begingroup$ (out of votes again) Could you edit my answer there and insert the appropriate changes, please? Thanks! $\endgroup$ Commented May 24, 2015 at 11:09
  • $\begingroup$ @J.M. Gladly. :-) $\endgroup$
    – Mr.Wizard
    Commented May 24, 2015 at 11:11

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.