WolframLang: FilterOptions to FilterRules

By Xah Lee. Date: . Last updated: .

FilterOptions is Obsolete

Needs["Utilities`FilterOptions`"];

is obsolete.

Replaced by FilterRules.

WolframLang FilterOptions 2024-05-30
WolframLang FilterOptions 2024-05-30

Fix FilterOptions

If you have:

FilterOptions[Graphics, opts]

where opts is a sequence, Now you should do this:

FilterRules[ {opts}, Options[ Graphics ] ]

if opt is a list, then use

FilterRules[ opts, Options[ Graphics ] ]

Change 「opts___Rule」 to use OptionsPattern

replace

helicoid[h_, w_, r_, opts___Rule] := body

by

helicoid[h_, w_, r_, opts:OptionsPattern[] ] := body

replace

pPoints = PlotPoints /. {opts} /. Options[RuledSurfacePlot];

by

pPoints = OptionValue[ PlotPoints ];