• May 22, 2022, 11:40:36 AM

Author Topic:  Parameter Adjustment - Art or Luck?  (Read 498 times)

0 Members and 1 Guest are viewing this topic.

Offline dankje

  • Strange Attractor
  • ******
  • Posts: 91
Parameter Adjustment - Art or Luck?
« on: March 22, 2022, 06:33:13 AM »
I had seen these nice loopy arc lines in other members' images, like @Alef's kaliset_HEARTS_tweaked_singleformula2.jpg which he submitted in our March-2022 Themed Contest.  But this is the first time I've seen it with my sw.  And I didn't add anything new, it just took me months to stumble onto it.

I often find the good stuff after lengthy searching, not finding anything, and then switching palettes.  Yahtzee!

Fractal fn: f(z) = z^2 +c;
Index fn: index = ((double)iter - (logZ/logEsc - 1.0)/(power-1.0))/100.0;
Transfer fn: index = abs(sin(index));
Coloring fn: Harmonic

I found that for the effect to happen both gradient color values need to fall within rather small ranges.  Also, I have 7 coloring fn's (Geometric, Arithmetic, Quadratic, etc.) but only Harmonic works.  This is why it took so long to find.  I wonder what other goodies are hiding in my sw, and how to find them.

Is parameter tweaking an acquired art or just random chance?

Now I have somewhere new to look for next month's contests!


Linkback: https://fractalforums.org/index.php?topic=4686.0

Offline Alef

  • Fractal Freak
  • **
  • Posts: 772
  • a catalisator / z=z*sinh(z)-c^2
    • My deviant art page
Re: Parameter Adjustment - Art or Luck?
« Reply #1 on: March 22, 2022, 08:06:43 AM »
Here these must be a result of colour interpolation function for gradient with lines being where index value is close to 0 or 1.

But there are many colouring algorithms which makes lines like this.
This could be not too complicated and looks neat: https://fractalforums.org/fractal-mathematics-and-new-theories/28/entropy-mandelbrot-coloring/368


Alsou here, but different stripes:
https://commons.wikimedia.org/wiki/File:Stripe_Average_Coloring_-_Mandelbrot_set_zoom_(_wake_1over3_).png 


In kaliset_HEARTS_tweaked_singleformula2.jpg lines is made by direct colouring algorithm with no changable colours involved just 3 parameters I called Log Trichrome. It have just niche use as it's hard, colours can't be mutch adjusted, but they are mutch brighter and realistic than pallete using, kind of like eletrical lights.

before calculation starts:
float factlogR = 1/(log(@baseR));
float factlogG = 1/(log(@baseG));
float factlogB = 1/(log(@baseB));

;during iteration:

cnt=cnt+1
;Log normalisation for insides => zero.
IF (cnt<100)
normaliter = sqr(cnt)
ENDIF


cabsz=cabs(z)

dataR=  abs( factlogR*log (  factlogR*log (  factlogR*log (cabsz  )  )  ) )
dataG=  abs( factlogG*log ( factlogG*log (  factlogG*log (cabsz)  )  ) )
dataB=  abs( factlogB*log (  factlogB*log (  factlogB*log (cabsz)  )  ) )

      sumR= recip(dataR*normaliter +  @darkness) + sumR
      sumG= recip(dataG*normaliter +  @darkness) + sumG
      sumB= recip(dataB*normaliter +  @darkness) + sumB

after end of fractal calculation:
#color = rgb(resultR, resultG, resultB)


With the variables:
@baseR=1.36
@baseG=1.53
@baseB=1.48
@darkness = 5  (by default =1)


Full code:
Code: [Select]
LogTrichrome {

; Direct colour method based on Fractal Explorer and NASA
; colour techniques. Summs of inveversed multiple log,
; algorithm by Arthur Sirotinsky and Olga Federenko.
; Colour information is generated by each channel having
; different logarithm bases.
; http://www.fractalforums.com/index.php?topic=11520

; + post functions for greater variety.
; + switch to use gradient, index is green channel.
; 03.10.2012. + new colour mode by harmonic between gradient and direct.
; So to have advantages of using gradients and direct colours.
; 12.10.2012. + gradient mode with index calculated as harmonic mean between 3 chanells - smoother.
; 17.10.2012. better normalisation for deeper renders.
; 13.11.2012. + flag to remove unnatural blue tones in direct modes.
; 14.08.2013. + triangle transfer function & more colour switches.
; 28.08.2013 + Pre functions, works like orbit traps.
; 30.09.2013  + 8 pre functions.
;+ random noise taken from Mark Townsend's scripts.

; by Edgar Malinovsky 16.04.2012.
; You may redistribute this algorithm, modify, derivate or use comercialy as you wish as long as you give proper credits.


; http://edo555.deviantart.com/

$DEFINE DIRECT
global:
; Calculating differences to ln
float factlogR = recip(log(@baseR));
float factlogG = recip(log(@baseG));
float factlogB = recip(log(@baseB));

init:

float sumR= 0.0
float sumG= 0.0
float sumB= 0.0
float resultR= 0.0
float resultG= 0.0
float resultB= 0.0
float cabsz= 0.0
float dataR= 0.0
float dataG= 0.0
float dataB= 0.0
int cnt= 0
int normaliter = 0
color gradcolor=rgba(0, 0, 0, 0)
float resultAlpha =0.0
complex ztemp =(0,0)

loop:
;"trap center"
ztemp=#z +@posneg
;pre functions
; + 1.0E-15 to avoid null value dots and not working with magnet.

  IF (@prefn == 0)  ; original unmodified
  cabsz= cabs( ztemp  +1.0E-15)
  ELSEIF (@prefn == 1)
  cabsz= cabs( real(ztemp)- imag(ztemp) +1.0E-15)
  ELSEIF (@prefn == 2)
  cabsz= cabs( real(ztemp)* imag(ztemp) +1.0E-15)
  ELSEIF (@prefn == 3)
  cabsz= cabs( real(ztemp)% (imag(ztemp) +1E-20) +1.0E-15)
  ELSEIF (@prefn == 4)
  cabsz= |ztemp +1.0E-15|
  ; non linear
  ELSEIF (@prefn == 5)
  cabsz= cabs( abs(real(ztemp)*2+ imag(ztemp))+ recip(abs(ztemp)+1e-15) +1.0E-15)
  ELSEIF (@prefn == 6)
  cabsz= cabs( ( (real(ztemp))*2+ (imag(ztemp))/((real(ztemp))+ (imag(ztemp))+ (1.9,0.1) )  ) +1.0E-15)
  ELSEIF (@prefn == 7)
  cabsz= cabs( (round(ztemp) +ztemp)*0.5 +1.0E-15)
  ELSEIF (@prefn == 8)
  cabsz= cabs( sinh( ztemp)  +1.0E-15)
  ELSEIF (@prefn == 9)
  cabsz= cabs( cos( ztemp)  +1.0E-15)
  ; symmetric
  ELSEIF (@prefn == 10)
  cabsz=cabs( sqr(imag(ztemp)) - sqrt(abs(real(ztemp))) + flip (sqr(real(ztemp)) - sqrt(abs(imag(ztemp) ))) + 1.0E-15)
  ELSEIF (@prefn == 11)
  cabsz= cabs(( sqr(sqr( imag(ztemp) )) + sqr(sqr( real(ztemp) )) + 1.0E-15  ) ^0.25 )
 ;back to basic
ELSEIF (@prefn == 12)  ; real
cabsz= abs(real( ztemp  +1.0E-15))
ELSEIF (@prefn == 13)  ; imag
cabsz= abs(imag( ztemp)  +1.0E-15)
;from orbit trap
ELSEIF (@prefn == 14)
; "hyperbola"
cabsz = abs(imag(ztemp) * real(ztemp) - 1+1.0E-15)
; from thin orbit trap of Samuel Monnier
ELSEIF (@prefn == 15 )
;sincos waves
cabsz= abs( sin(real(ztemp)) + cos(real(ztemp)) + imag(ztemp) +1.0E-15 )
ELSEIF (@prefn == 16 )
;parabola
cabsz = abs( sqr(real(ztemp)) - imag(ztemp) +1.0E-15)
ELSEIF (@prefn == 17 )
;trifolium
cabsz = abs(8/( sqr(real (ztemp) )  +4) - imag(ztemp) +1.0E-15)
;arlecchino, modified Mark Townsend harlequin
ELSEIF (@prefn == 18 )
;arlecchino
cabsz=cabs( ztemp- 1- sqr(1.25*real(atan( real(ztemp) / (imag(ztemp)+1.0E-15 ) )) )   +1.0E-15)
;formulas
ELSEIF (@prefn == 19)
;Chebyshev4Axolotl
cabsz =cabs(  (sqr(ztemp)*(35 * sqr(ztemp) - 30) + 3) / 8  +1.0E-15)
ENDIF


cnt=cnt+1

;Log normalisation for insides => zero.
IF (cnt<100)
normaliter = sqr(cnt)
ENDIF

;Here goes logarithms
IF (@lgtype ==0)
dataR=  abs( factlogR*log (  factlogR*log (  factlogR*log (cabsz)  )  ) )
dataG=  abs( factlogG*log ( factlogG*log (  factlogG*log (cabsz)  )  ) )
dataB=  abs( factlogB*log (  factlogB*log (  factlogB*log (cabsz)  )  ) )

ELSEIF (@lgtype ==1)
dataR=  abs( factlogR*log (  log (  factlogR*log (cabsz)  )  ) )
dataG=  abs( factlogG*log (  log ( factlogG*log (cabsz)  )  ) )
dataB=  abs( factlogB*log (  log (  factlogB*log (cabsz)  )  ) )

ELSEIF (@lgtype ==2)
dataR=  abs( factlogR*log (  factlogR*log (  factlogR*log (  factlogR*log (cabsz)  )  )  ) )
dataG=  abs( factlogG*log (  factlogG*log ( factlogG*log (  factlogG*log (cabsz)  )  )  ) )
dataB=  abs( factlogB*log  (  factlogB*log (  factlogB*log (  factlogB*log (cabsz)  )  )  ) )

ELSEIF (@lgtype ==3)
dataR=  abs( factlogR*log (  ( factlogR*log (cabsz ) )  ) )
dataG=  abs( factlogG*log (  ( factlogG*log (cabsz ) )  ) )
dataB=  abs( factlogB*log (  ( factlogB*log (cabsz ) )  ) )
ENDIF

;summ of inverted logs
sumR= recip(dataR*normaliter +  @darkness) + sumR
sumG= recip(dataG*normaliter +  @darkness) + sumG
sumB= recip(dataB*normaliter +  @darkness) + sumB

final:

IF (@userandom==true)
sumR = abs( tanh(@hyperandom *real(#random)) +sumR)
sumG = abs( tanh(@hyperandom *real(#random)) +sumG)
sumB = abs( tanh(@hyperandom *real(#random)) +sumB)
ENDIF

;modifications of index grade values 0 to 1.
IF (@postfn==0)
resultR=sumR
resultG=sumG
resultB=sumB

ELSEIF (@postfn==1)
resultR=sqr(sumR)
resultG=sqr(sumG)
resultB=sqr(sumB)

ELSEIF (@postfn==2)
resultR=sqrt(sumR)
resultG=sqrt(sumG)
resultB=sqrt(sumB)

ELSEIF (@postfn==3)
resultR= (  1- sumR )
resultG= (  1- sumG )
resultB= (  1- sumB )

ELSEIF (@postfn==4)
resultR= abs(  cos(#pi*sumR)+sumR*0.5  )
resultG= abs(  cos(#pi*sumG)+sumG*0.5  )
resultB= abs(  cos(#pi*sumB)+sumB*0.5  )

ELSEIF (@postfn==5)
resultR=abs(sumR -sqrt(sumG*sumB)*0.5)
resultG=abs(sumG -sqrt(sumR*sumB)*0.5)
resultB=abs(sumB -sqrt(sumR*sumG)*0.5)

ELSEIF (@postfn==6)
resultR=sqr(sin(#pi*sumR))
resultG=sqr(sin(#pi*sumG))
resultB=sqr(sin(#pi*sumB))

ELSEIF (@postfn==7)
resultR= abs( sumR -round(sumR) )
resultG= abs( sumG -round(sumG) )
resultB= abs( sumB -round(sumB) )

ELSEIF (@postfn==8)
resultR= tanh(sumR)
resultG= tanh(sumG)
resultB= tanh(sumB)

ELSEIF (@postfn==9)
resultR=(  sin((sumR) )*cos((sumG))  )
resultG=(  sin((sumG) )*cos((sumR))  )
resultB=(  sin((sumB) )*cos((sumR))  )

ELSEIF (@postfn==10)
resultR=((sumR)/(2+abs(sumR)))*3
resultG=((sumG)/(2+abs(sumG)))*3
resultB=((sumB)/(2+abs(sumB)))*3

ELSEIF (@postfn==11)
  resultR=abs(abs(sumR*0.5-trunc(sumR*0.5))-0.5)*2
  resultG=abs(abs(sumG*0.5-trunc(sumG*0.5))-0.5)*2
  resultB=abs(abs(sumB*0.5-trunc(sumB*0.5))-0.5)*2

ELSEIF (@postfn==12)
  resultR = abs(cos(sumR))
  resultG = abs(cos(sumG))
  resultB = abs(cos(sumB))

ELSEIF (@postfn==13)
  resultR = asinh(sumR)
  resultG = asinh(sumG)
  resultB = asinh(sumB)

ELSEIF (@postfn==14)
  resultR = abs(exp(sin(sumR))-1)
  resultG = abs(exp(sin(sumG))-1)
  resultB = abs(exp(sin(sumB))-1)


ENDIF
  ; switching red and blue.
IF (@switchRB==true)
sumB=resultB
resultB=resultR
resultR=sumB
  ENDIF
  ; switching red and green.
IF (@switchRG==true)
sumB=resultG
resultG=resultR
resultR=sumB
  ENDIF
 
;colour mode: direct, using palette, or mix.
IF (@palette==0)

       IF (@naturalise==true)
       resultB=resultB*0.8
       ENDIF

#color = rgb(resultR, resultG, resultB)
ELSEIF (@palette==1)
#color = gradient(resultG)
ELSEIF (@palette==2)

 ;gradient is by arithmetic mean of RGB
  gradcolor=gradient( (resultR+resultG+resultB)*0.333333333333333 )
 ;harmonic of gradient and RGB
resultR=2/(  recip (red(gradcolor))+ recip(resultR) )
resultG=2/(  recip (green(gradcolor))+ recip(resultG) )
resultB=2/(  recip (blue(gradcolor))+ recip(resultB) )

       IF (@naturalise==true)
       resultB=resultB*0.8
       ENDIF

resultAlpha=alpha(gradcolor)
#color = rgba(resultR, resultG, resultB,resultAlpha)

ELSEIF (@palette==3)
; colour mode like of Fractal Explorer.
; uses pallete, but each chanell is calculated seperately.
resultR=red(gradient(resultR))
resultG=green(gradient(resultG))
resultB=blue(gradient(resultB))
resultAlpha=alpha(gradient( resultG))

       IF (@naturalise==true)
       resultB=resultB*0.8
       ENDIF

#color = rgba(resultR, resultG, resultB, resultAlpha)

ELSEIF (@palette==4)
;smoother.
#color=gradient(3/(recip(resultR) + recip(resultG) + recip(resultB) ) )
ENDIF

default:
title = "Log Trichrome"
rating = recommended

heading
caption = "Colour notice"
text = "For Gradient change the colour mode."
endheading

param palette
caption = "Colour Mode"
enum= "Direct Colouring" "Gradient Based" "Mixed Harmonic" "Fractal Explorer like" "Gradient by Harmonic"
default=0
hint= "Gradient Based is gradient calculated from green channel, gradient harmonic is gradient calc from mean of all channels. Mixed is harmonic mean between gradient colour (by mean of RGB) and RGB channels. Fractal Explorer like is RGB values calculated seperately from gradient. All exept direct colouring uses gradient and alpha channel."
endparam

param posneg
caption = "Add to pixel value"
default =  (0, 0)
hint = "Adding number aka trap center curves stalks around points with the opposite value. (2 and -2) And diverses + and - areas."
endparam

param lgtype
caption = "Logarithms applied"
enum = "1- Triple logarithm" "2- Smoother Triple log" "3- Quadruple logarithm" "4- Double logarithm"
default = 0
endparam

param darkness
caption="Darkness amount"
default=2.5
hint="Value added before inverting logarithm. Larger value creates darker pictures."
endparam

param switchRB
caption = "Switch Red and Blue"
default=false
hint= "Switch Red and Blue channels, so don't need to change log Bases."
endparam

param switchRG
caption = "Switch Red and Green"
default=false
hint= "Switch Red and Green channels, so don't need to change exponent Bases."
endparam

param prefn
caption = "Pre Function"
enum = "1 None" "2 X-Y" "3 X*Y" "4 remainder of X/Y" "5 X*X+Y*Y" "6 Stalks A" "7 Stalks B" "8 Areas" "9 Sinh" "10 Cos" "11 SZA Butterfly" "12 Supermodulus 4"   "13 Real" "14 Imag" "15 Hyperbola" "16 Sincos Waves" "17 Parabola" "18 Trifolium" "19 Arlecchino" "20 Chebyshev4Axolotl"
default =  0
hint= "Pre function applied before colour calculations. Changes colour pattern like orbit traps."
endparam

param postfn
caption = "Transfer Function"
enum = "1- None" "2- Square Power (darker)" "3- Square Root (lighter)" "4- Inverted" "5- Half Periodic cos" "6- Accentuate RGB" "7- Haversine" "8- Solarisation" "9- Hyperbolic Tangent" "10- SineCosineMix" "11- Sigmoid" "12- Triangle" "13- Cosine" "14- ArcSinH" "15- ExpOfSin"
default =  0
hint="Changes colours. The same as UF, but applied before colour mode and have extra functions."
endparam

param naturalise
caption = "Naturalise Colours"
visible = (@palette == 0||@palette == 2||@palette == 3)
default=false
hint="Removes unnatural blue tint of non-gradient methods."
endparam

bool param userandom
caption = "Add Random noise"
default = false
endparam

float param hyperandom
caption = "Hypertangent noise"
hint = "Adds a random noise to the colours. Use very small or very large values 0.1 or 50."
default = 0.04
visible = (@userandom==true)
endparam

heading
caption = "Info"
text = "Colour method based on Fractal Explorer and NASA techniques. Indexes are summs of normalised inveversed multiple logarithms of all iterated z values. 3 different log bases behaves differently, hence generate different colours. Use Switches and 'Add to pixel value', more logarithms creates more stalks, 'Add to pixel' curves stalks around oposite values (adding 1 to -1 is 0), and post function changing tone. log Bases are for good in math. Colour Mode allows to switch between direct, gradient based and mixed direct and gradient by harmonic mean, Fractal Explorer like and gradient by harmonic mean modes. www.fractalforums.com"
endheading

param baseR
caption = "Red log Base"
default = 1.35
hint="Logarithmic base for a red channel. Colours are generated by each channel having different logs."
endparam
param baseG
caption = "Green log Base"
default = 1.55
endparam
param baseB
caption = "Blue log Base"
default = 1.65
endparam

heading
caption = "Colours"
text = "Colour Mode is incompatible with flag 'use gradient' of earlyer versions. Old parameters could require setting colour mode to direct or gradient. All modes exept direct colouring uses gradient and alpha channel."
endheading
}
« Last Edit: March 22, 2022, 11:57:04 AM by Alef »
by Edgar Malinovsky aka Edgars Malinovskis.

Online ottomagus

  • Fractal Friar
  • *
  • Posts: 133
  • Artist. Freak. Caveman. Spaceman.
Re: Parameter Adjustment - Art or Luck?
« Reply #2 on: March 22, 2022, 11:35:37 AM »
Quote
Is parameter tweaking an acquired art or just random chance?

Both  :)

Offline marcm200

  • 3e
  • *****
  • Posts: 1122
Re: Parameter Adjustment - Art or Luck?
« Reply #3 on: March 22, 2022, 03:59:47 PM »
From my own experience with monocritical polynomials and Lyapunov diagrams, all my images I found purely by chance.

For z^2+c e.g. as long as you're in the same hyperbolic component, the shape changes only in the sense, that a fat spiral might become thinner, but the number of arms stays constant. If you move the c value out of that component into another - and if this 2nd component is not directly attached to the first, then, I'm not aware of a direct way of telling what it would look like there.

Usually I perform a parameter walk just computing black and white escape images with periodicity. Then for  the interesting shapes/periods I apply a color walk with some gradients that looked fine in previous images. But that's more or less guessing.

If you want to turn more into the constructing-an-image from a vision you have, you might try two articles:

genetic algorithm: forum link
Leja points: forum link




Offline The Team

  • Global Moderator
  • Fractal Fanatic
  • *******
  • Posts: 29
Re: Parameter Adjustment - Art or Luck?
« Reply #4 on: March 23, 2022, 12:48:15 AM »
Agree @ottomagus

For those with no math skills and no understanding of a given program then at first it's just luck if you get something that looks good, but after playing with them and gaining some understanding of what's going on under the hood it becomes very easy to make nice images ... art, on the other hand, is totally subjective. A commercial artist (friend) thinks that making images with fractal programs is the same as a 2 year old with their first box of crayons, while others are rendered speechless and stare in awe at an image for some time.

Like any "art" the better you know your tools the better the result.


The Team at FractalForums

Offline dankje

  • Strange Attractor
  • ******
  • Posts: 91
Re: Parameter Adjustment - Art or Luck?
« Reply #5 on: March 23, 2022, 06:15:56 AM »
Thanks for the code Alef. :joy: :worship:  I think I understand it well enough to implement in my little program. 

I have just now completed ALL of Fractalbrot's basic functionality and am looking forward to adding more coloring schemes.  I had put off this last part for months, so it's great to be finally past it.  :P  It was for saving a list of interesting regions' parameters to disk.  Now I can do my fractal diving via laptop/reclining-chair and then load the image parameters on my bigger desktop later.  The images I submit to our contests will now be bigger.  8)


Offline dankje

  • Strange Attractor
  • ******
  • Posts: 91
Re: Parameter Adjustment - Art or Luck?
« Reply #6 on: March 29, 2022, 07:31:45 AM »
Yes I see what you mean Alef.  I have found other colors that give similar results using other gradient functions.  It appears that I am just now learning how to set parameters. 

I was feeling quite satisfied with the state of my code lately.  Then I downloaded Mandelbulb 3D and looked at its User Interface.  Honestly, I had the best laugh at my poor app.  But my enthusiasm for it continues unabated.  I look forward to adding more functions and palettes, with the help of the good people at FFs!

Offline Alef

  • Fractal Freak
  • **
  • Posts: 772
  • a catalisator / z=z*sinh(z)-c^2
    • My deviant art page
Re: Parameter Adjustment - Art or Luck?
« Reply #7 on: March 29, 2022, 08:42:29 AM »
Some save as -> larger file -> 1/2 the size in any image editor (works as AntiAliasing). And the image would be not less in quality as best works here.

Mandelbulb 3D user interface is prety plain, that is not bad (ipad interfaces are bad on PC), but alsou with many options under the same button and navi-gation that don't works unless you flag 'fixed zoom and steps'. Alsou most of good fractal programs had been developed for many years. Just don't download Ultra Fractal.
« Last Edit: March 29, 2022, 08:52:42 AM by Alef »

Offline dankje

  • Strange Attractor
  • ******
  • Posts: 91
Re: Parameter Adjustment - Art or Luck?
« Reply #8 on: May 07, 2022, 07:45:27 AM »

after end of fractal calculation:
#color = rgb(resultR, resultG, resultB)


I am stuck.

resultR, resultG, resultB are floating point, but I need them to be integers [0 to 255] in order to convert them into a color.  I checked their values in the debugger and they seem to be [0.0 to 1.0] so I tried to just multiply by 255, but it didn't work.  What did I miss?


Offline Adam Majewski

  • Fractal Frankfurter
  • *
  • Posts: 641
Re: Parameter Adjustment - Art or Luck?
« Reply #10 on: May 07, 2022, 08:39:45 AM »

Offline dankje

  • Strange Attractor
  • ******
  • Posts: 91
Re: Parameter Adjustment - Art or Luck?
« Reply #11 on: May 07, 2022, 09:41:30 AM »
I'm sorry Adam, I'm only a beginner and don't know how to supply the parameters for the images that I find with my software.  I see other people attach big blocks of alphanumeric chars to their images, but honestly I have no idea what they mean.  All I can offer is that I used this index function:
         index = ((double)iter - (logZ/logEsc - 1.0)/(power-1.0))/100.0;
         index = abs(sin(index));
with this harmonic gradient coloring function, where gradientClr1R=2B02D8, and gradientClr2R=FFFD07:
        redChan = (int) (1.0/(index/gradientClr1R + (1.0-index)/gradientClr2R));
Attached is a different version of the image.
       
But my question is about the LogTrichrome algorithm that Alef posted in this thread.  I am trying to incorporate it into my program and got stuck.  I am also new to forums, should I have started a new thread?

So much to learn, and it's all fun.  I just hope not to exhaust anybody's patience.  Occasionally, the answers I get from people go over my head and I feel I've wasted their time.

Offline 3DickUlus

  • Administrator
  • 3f
  • *******
  • Posts: 2935
Re: Parameter Adjustment - Art or Luck?
« Reply #12 on: May 07, 2022, 09:34:59 PM »
Parameters would consist of...

Formula eg: Zn+1 = Zn2 + C
X,Y centre of image
Number of iterations
Zoom factor

...all of the colour stuff is usually unique to a given program but all must have at least the above "settings" accessible somehow

Offline Alef

  • Fractal Freak
  • **
  • Posts: 772
  • a catalisator / z=z*sinh(z)-c^2
    • My deviant art page
Re: Parameter Adjustment - Art or Luck?
« Reply #13 on: May 07, 2022, 09:54:54 PM »
I am stuck.

resultR, resultG, resultB are floating point, but I need them to be integers [0 to 255] in order to convert them into a color.  I checked their values in the debugger and they seem to be [0.0 to 1.0] so I tried to just multiply by 255, but it didn't work.  What did I miss?
It is easy.
round() or alsou ceil() floor() or trunk() could make float into an integer. Of corse after a multiplication. So that 25.000000000001 becomes 25.
Kind of like:
integer: int_resultR = round (255 * resultR);

Offline dankje

  • Strange Attractor
  • ******
  • Posts: 91
Re: Parameter Adjustment - Art or Luck?
« Reply #14 on: May 07, 2022, 11:59:11 PM »
So my guess was correct. I cast the float to int, which is the same as truncation.

int color = 0xff000000 + ((int)(sumR * 255.0) << 16) + ((int)(sumG * 255.0) << 8 ) + (int)(sumB * 255.0);

My problem must lie elsewhere in the code.  Time to go bug hunting.  Thanks, Edgar.

Also, I will add the capability to save parameters and post them along with my images.  Thanks Adam and 3Dickulus.


question
(solved) Where to find the adjustment slide?

Started by sallymp3951 on Noob's Corner

0 Replies
633 Views
Last post November 23, 2021, 01:58:39 PM
by sallymp3951
xx
automatic skew adjustment for Burning Ship etc

Started by claude on Fractal Mathematics And New Theories

18 Replies
1212 Views
Last post October 05, 2018, 02:00:40 AM
by gerrit
question
Where to find the adjustment slide?

Started by sallymp3951 on Noob's Corner

1 Replies
654 Views
Last post November 24, 2021, 12:27:49 PM
by Sabine62
clip
Julia and parameter-space images of polynomials

Started by gerrit on Fractal Mathematics And New Theories

58 Replies
3159 Views
Last post September 21, 2019, 03:49:43 PM
by marcm200
clip
Sharing parameter-files Jux software.

Started by Caleidoscope on Xenodream

232 Replies
5147 Views
Last post January 25, 2022, 02:48:18 AM
by gerson