Hi.
is it possible to provide the option of alternative bailouts in the same formula?

More specifically, I wanted to include convergent and divergent bailouts:
|z|<@bailout (default 4.0)
|z|>@bailout (default 0.001)

It seems only one expression is allowed in the bailout section. Is there a way to do this? Any help would be appreciated.

Hi. is it possible to provide the option of alternative bailouts in the same formula? More specifically, I wanted to include convergent and divergent bailouts: |z|&lt;@bailout (default 4.0) |z|&gt;@bailout (default 0.001) It seems only one expression is allowed in the bailout section. Is there a way to do this? Any help would be appreciated.
edited Aug 6 '16 at 1:30 pm
 
0
reply

Use && (the "and" operator) to join the expressions:

|z|<@bailout1 && |z|>@bailout2

But note that the convergent part here will bailout when z gets close to 0. More often, you want to compare z with its previous value and bailout when the difference is small (i.e., when it converges to some point). Have a look at the code for one of the Magnet formulas in Standard.ufm for an example.

Use &amp;&amp; (the &quot;and&quot; operator) to join the expressions: |z|&lt;@bailout1 &amp;&amp; |z|&gt;@bailout2 But note that the convergent part here will bailout when z gets close to 0. More often, you want to compare z with its previous value and bailout when the difference is small (i.e., when it converges to some point). Have a look at the code for one of the Magnet formulas in Standard.ufm for an example.
 
0
reply

Thank you smile that actually helps with something else I'm working on. What I meant here is the option to use either a convergent bailout or a divergent bailout. For example there could be a caption saying 'bailout type' and a drop-down menu with choices 'convergent' or 'divergent'. Or convergent could be enabled by default with a caption 'use divergent bailout?' and a box to check.

Thank you :) that actually helps with something else I&#039;m working on. What I meant here is the option to use either a convergent bailout or a divergent bailout. For example there could be a caption saying &#039;bailout type&#039; and a drop-down menu with choices &#039;convergent&#039; or &#039;divergent&#039;. Or convergent could be enabled by default with a caption &#039;use divergent bailout?&#039; and a box to check.
 
0
reply

I actually have a number of formulas that do this. For example look at Magnet 1 Switch, which is a plug-in for Object Formula Switch Lite.

I actually have a number of formulas that do this. For example look at Magnet 1 Switch, which is a plug-in for Object Formula Switch Lite.
 
0
reply

Thank you! I looked at your formulas, experimented a bit and the problem is now solved smile

Thank you! I looked at your formulas, experimented a bit and the problem is now solved :)
 
0
reply
230
views
4
replies
3
followers
live preview
Enter at least 10 characters.
WARNING: You mentioned %MENTIONS%, but they cannot see this message and will not be notified
Saving...
Saved
All posts under this topic will be deleted ?
Pending draft ... Click to resume editing
Discard draft