5thDegreePolynomial { ; Copyright © Matthew Schultz 2006 ; Version 1.1 - Fixed to work correctly ; A polynomail expression of the fifth degree is of the form: ; Y = AX^5 + BX^4 + CX^3 + DX^2 + EX + F ; Note: ; It is quite possible to create the standard Mandelbrot AND Julia ; sets from this formula, without switch. ; Also: ; This formula will work MUCH better in UF4, where the explore ; and previewed eyedropper are available. Without that, it is very ; much hit and miss. global: init: if @START_PIX z = #PIXEL else z = @START_VALUE endif if @APIX iA = #PIXEL else iA = @FA endif if @BPIX iB = #PIXEL else iB = @FB endif if @CPIX iC = #PIXEL else iC = @FC endif if @DPIX iD = #PIXEL else iD = @FD endif if @EPIX iE = #PIXEL else iE = @FE endif if @FPIX iiF = #PIXEL else iiF = @FF endif loop: Z = iA*Z^5+iB*Z^4+iC*Z^3+iD*Z^2+iE*Z+iiF bailout: |z| <= @BAIL default: title = "5th Degree Polynomial" ;//////////////////// heading Caption = "5th Degree" endheading complex param FA Default = (0.0,0.0) Caption = "A" Hint = "5th degree coefficient" Enabled = !(@APIX) endparam bool param APIX Default = false Caption = "Use Pixil" Hint = "Sets the pixel as the 5th degree coefficient" endparam ;////////////////////// heading Caption = "4th Degree" endheading complex param FB Default = (0.0,0.0) Caption = "B" Hint = "4th degree coefficient" Enabled = !(@BPIX) endparam bool param BPIX Default = false Caption = "Use Pixil" Hint = "Sets the pixel as the fourth degree coefficient" endparam ;//////////////////// heading Caption = "3rd Degree" endheading complex param FC Default = (0.0,0.0) Caption = "C" Hint = "3rd degree coefficient" Enabled = !(@CPIX) endparam bool param CPIX Default = false Caption = "Use Pixil" Hint = "Sets the pixel as the 3rd degree coefficient" endparam ;//////////////////// heading Caption = "2nd Degree" endheading complex param FD Default = (1.0,0.0) Caption = "D" Hint = "2nd degree coefficient" Enabled = !(@DPIX) endparam bool param DPIX Default = false Caption = "Use Pixil" Hint = "Sets the pixel as the 2nd degree coefficient" endparam ;//////////////////// heading Caption = "1st Degree" endheading complex param FE Default = (0.0,0.0) Caption = "E" Hint = "1st degree coefficient" Enabled = !(@EPIX) endparam bool param EPIX Default = false Caption = "Use Pixil" Hint = "Sets the pixel as the 1st degree coefficient" endparam ;//////////////////// heading Caption = "0th Degree" endheading complex param FF Default = (-1.25,0.0) Caption = "F" Hint = "0th degree coefficient" Enabled = !(@FPIX) endparam bool param FPIX Default = false Caption = "Use Pixil" Hint = "Sets the pixel as the 0th degree coefficient" endparam ;//////////////////// heading Caption = "General" endheading float param BAIL Default = 4.0 Caption = "Bailout" Hint = "Defines the bailout radius" endparam complex param START_VALUE Default = (0.0,0.0) Caption = "Start Value" Hint = "The start value for Z." Enabled = !(@START_PIX) endparam bool param START_PIX Default = true Caption = "Use Pixel" Hint = "Use Pixel as the the start value for Z." endparam ;//////////////////// ; ; heading ; Caption = "Switch Controls" ; endheading ; $ifdef VER40 ; bool param X ; Default = true ; Enabled = false ; Caption = "Switch controls are not needed in UF4," ; endparam ; bool param X2 ; Default = true ; Enabled = false ; Caption = "use the explorer instead." ; endparam ; $else ; bool param DISPLAY_SWTICH ; Default = false ; Caption = "Show Switch Controls" ; Hint = "Toggles the display of the controls used for switch exploring" ; endparam ; param SWITCH_MODE ; Enum = "Julia" "Mandelbrot" ; Default = 0 ; Caption = "Swtich To" ; Hint = "Selects which mode to swtich to...since this formula can be converted by hand. Will automatically set itself after swtiching." ; endparam ; bool param SWITCH_A ; Default = false ; Caption = "Switch the 5th degree." ; Hint = "Enables swtiching of the 5th degree coeffiecent. This will be overriden if Use Pixel is specified for the 5th degree coefficient." ; Enabled = false ; endparam ; bool param SWITCH_B ; Default = false ; Caption = "Switch the 4th degree." ; Hint = "Enables swtiching of the 5th degree coeffiecent. This will be overriden if Use Pixel is specified for the 5th degree coefficient." ; endparam ; bool param SWITCH_C ; Default = false ; Caption = "Switch the 3rd degree." ; Hint = "Enables swtiching of the 3rd degree coeffiecent. This will be overriden if Use Pixel is specified for the 3rd degree coefficient." ; endparam ; bool param SWITCH_D ; Default = false ; Caption = "Switch the 2nd degree." ; Hint = "Enables swtiching of the 2nd degree coeffiecent. This will be overriden if Use Pixel is specified for the 2nd degree coefficient." ; endparam ; bool param SWITCH_E ; Default = false ; Caption = "Switch the 1st degree." ; Hint = "Enables swtiching of the 1st degree coeffiecent. This will be overriden if Use Pixel is specified for the 1st degree coefficient." ; endparam ; bool param SWITCH_F ; Default = false ; Caption = "Switch the 0th degree." ; Hint = "Enables swtiching of the 0th degree coeffiecent. This will be overriden if Use Pixel is specified for the 0th degree coefficient." ; endparam ;$endif ; switch: ; type = "5thDegreePolynomial" ; BAIL = BAIL ; SWITCH_MODE = (@SWITCH_MODE == 0)*1 ; SWITCH_MODE = SWITCH_MODE ; APIX = (!((@SWITCH_MODE == "Julia") && (@SWITCH_A)) && (@APIX)) ; FA = (((@SWITCH_MODE == "Julia") && (@SWITCH_A)) * #PIXEL) + (!((@SWITCH_MODE == "Julia") && (@SWITCH_A)) * @FA) }