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$
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$
  • $\begingroup$ (out of votes again) Could you edit my answer there and insert the appropriate changes, please? Thanks! $\endgroup$ – J. M. will be back soon May 24 '15 at 11:09
  • $\begingroup$ @J.M. Gladly. :-) $\endgroup$ – Mr.Wizard May 24 '15 at 11:11

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.