Logo by simon.snake - Contribute your own Logo!

END OF AN ERA, FRACTALFORUMS.COM IS CONTINUED ON FRACTALFORUMS.ORG

it was a great time but no longer maintainable by c.Kleinhuis contact him for any data retrieval,
thanks and see you perhaps in 10 years again

this forum will stay online for reference
News: Visit the official fractalforums.com Youtube Channel
 
*
Welcome, Guest. Please login or register. March 29, 2024, 03:55:34 PM


Login with username, password and session length


The All New FractalForums is now in Public Beta Testing! Visit FractalForums.org and check it out!


Pages: 1 [2] 3 4 ... 7   Go Down
  Print  
Share this topic on DiggShare this topic on FacebookShare this topic on GoogleShare this topic on RedditShare this topic on StumbleUponShare this topic on Twitter
Author Topic: Re: Custom formulas & transforms - Release  (Read 5939 times)
0 Members and 1 Guest are viewing this topic.
David Makin
Global Moderator
Fractal Senior
******
Posts: 2286



Makin' Magic Fractals
WWW
« Reply #15 on: February 22, 2011, 11:01:32 PM »

Darkbeam did say:
Quote
My dear I was planning to do this but I fear this is far too complex and almost useless. Why?
2D fractals with complex powers are all weird looking, because complex part of the power screws up the shape making it non-symmetrical. I have never (never!!!!) seen a fractal with a complex power in any artistic site. So why try to extend this in quat? A really hard work for nothing - nobody will ever use this. If you need to raise a quat to a neg power (-1) you can use sphereinv that already gives beautiful results. I will extend that transform soon. Also, raise to a fractional power is useless due to non-symmetry


Useless, because the formula is discontinue and fragmented (like Barnsley but less regular)

You need to look at more fractal art ! Not to mention the fact that many Mandelbulbs are full of discontinuities and many of the 3D mixed formula types have discontinuities and are also asymmetrical wink

Why so against storing to memory ? I realise it does cause a slight speed hit, but nothing like as much as having to do a divide or transcendental function using the fpu smiley

Quote
raising quat to a quat power;

a ^ b = exp ( b log(a))

Don't forget that for quaternions really you should give the user the option of either the above or of:

a^b = exp(log(a)*b)

Since the results will be decidedly different if both a and b have 2 of their last 3 components non-zero.
Logged

The meaning and purpose of life is to give life purpose and meaning.

http://www.fractalgallery.co.uk/
"Makin' Magic Music" on Jango
Kali
Fractal Supremo
*****
Posts: 1138


« Reply #16 on: February 23, 2011, 12:28:01 AM »

This video of mine is made out of a complex-power formula:

<a href="http://www.youtube.com/v/HFl-pXJOeho?fs=1&amp;amp;hl=es_ES" target="_blank">http://www.youtube.com/v/HFl-pXJOeho?fs=1&amp;amp;hl=es_ES</a>

Also my profile pic:






« Last Edit: February 23, 2011, 12:29:45 AM by Kali » Logged

fractalrebel
Fractal Lover
**
Posts: 211



WWW
« Reply #17 on: February 23, 2011, 12:45:08 AM »

Darkbeam did say:

Quote
My dear I was planning to do this but I fear this is far too complex and almost useless. Why?
2D fractals with complex powers are all weird looking, because complex part of the power screws up the shape making it non-symmetrical. I have never (never!!!!) seen a fractal with a complex power in any artistic site. So why try to extend this in quat? A really hard work for nothing - nobody will ever use this. If you need to raise a quat to a neg power (-1) you can use sphereinv that already gives beautiful results. I will extend that transform soon. Also, raise to a fractional power is useless due to non-symmetry


Useless, because the formula is discontinue and fragmented (like Barnsley but less regular)

-------------------------------

Interesting discussion we have going here. Janet Parke is a very well known fractal artist and has won many awards. For several years she also taught a 3 part course on fractal art. One of the points she repeatedly made is that symmetric images are something to avoid. Really good fractal art usually has something to break up the symmetry. This is actually a principle that is true of art in general.

« Last Edit: February 23, 2011, 12:59:27 AM by fractalrebel » Logged

fractalrebel
Fractal Lover
**
Posts: 211



WWW
« Reply #18 on: February 23, 2011, 01:02:58 AM »

The Glynn fractals use a fractional power for the Mandelbrot set, and they can create marvellous images. One of my older fractal images is a Glynn fractal which has won awards, has appeared on a magazine cover and a poster, and made some money for me.
Logged

fractalrebel
Fractal Lover
**
Posts: 211



WWW
« Reply #19 on: February 23, 2011, 01:15:44 AM »

The logo at the top of my webpage is a negative mandelbrot:

z = (-z)^power + c

where the power is 1.1

I would way that fractional powers are far from useless. If you want to see the logo my website address is

http://www.hiddendimension.com
Logged

fractalrebel
Fractal Lover
**
Posts: 211



WWW
« Reply #20 on: February 23, 2011, 02:29:58 AM »

While we are on the topic of using something other than simple integer powers, I thought I would put up an illustrative image. My 3D Fractal Raytrace formula, which handles a number of different object types, was originally designed for quaternions. Here is a Julia quaternion taken to a quaternion power, namely (3, 0, -1, 0). It also has a coloring texture applied using a variant of Sam Monnier's SFBM II algorithm. I call the image Outpouring.



* Outpouring.jpg (67.26 KB, 640x512 - viewed 258 times.)
« Last Edit: February 23, 2011, 02:31:41 AM by fractalrebel » Logged

DarkBeam
Global Moderator
Fractal Senior
******
Posts: 2512


Fragments of the fractal -like the tip of it


« Reply #21 on: February 23, 2011, 08:46:25 AM »

Okay, maybe I will do that, but not now... Let me take my time angel
Logged

No sweat, guardian of wisdom!
DarkBeam
Global Moderator
Fractal Senior
******
Posts: 2512


Fragments of the fractal -like the tip of it


« Reply #22 on: February 23, 2011, 08:49:43 AM »

While we are on the topic of using something other than simple integer powers, I thought I would put up an illustrative image. My 3D Fractal Raytrace formula, which handles a number of different object types, was originally designed for quaternions. Here is a Julia quaternion taken to a quaternion power, namely (3, 0, -1, 0). It also has a coloring texture applied using a variant of Sam Monnier's SFBM II algorithm. I call the image Outpouring.



Please can you send me this formula (the Mset only...) in a private message? wink Only the part that computes new x,y,z,w starting from x,y,z,w,Cx,Cy,Cz,Cw Azn
Logged

No sweat, guardian of wisdom!
DarkBeam
Global Moderator
Fractal Senior
******
Posts: 2512


Fragments of the fractal -like the tip of it


« Reply #23 on: February 23, 2011, 08:52:47 AM »

Darkbeam did say:
Quote
My dear I was planning to do this but I fear this is far too complex and almost useless. Why?
2D fractals with complex powers are all weird looking, because complex part of the power screws up the shape making it non-symmetrical. I have never (never!!!!) seen a fractal with a complex power in any artistic site. So why try to extend this in quat? A really hard work for nothing - nobody will ever use this. If you need to raise a quat to a neg power (-1) you can use sphereinv that already gives beautiful results. I will extend that transform soon. Also, raise to a fractional power is useless due to non-symmetry


Useless, because the formula is discontinue and fragmented (like Barnsley but less regular)

You need to look at more fractal art ! Not to mention the fact that many Mandelbulbs are full of discontinuities and many of the 3D mixed formula types have discontinuities and are also asymmetrical wink

Why so against storing to memory ? I realise it does cause a slight speed hit, but nothing like as much as having to do a divide or transcendental function using the fpu smiley

Quote
raising quat to a quat power;

a ^ b = exp ( b log(a))

Don't forget that for quaternions really you should give the user the option of either the above or of:

a^b = exp(log(a)*b)

Since the results will be decidedly different if both a and b have 2 of their last 3 components non-zero.


I know David, but for example Barnsley is

z = (z+-k)*c

And I would have to do also

z = c*(z+-k)

Too complicated embarrass
Logged

No sweat, guardian of wisdom!
DarkBeam
Global Moderator
Fractal Senior
******
Posts: 2512


Fragments of the fractal -like the tip of it


« Reply #24 on: February 23, 2011, 08:55:38 AM »

Another transform that I wish to do is Mobius in 4D; but I am not able because I need more than 4 slots and I don't know how to do! sad

you can use dfree1+2 and deriv2+3 are not used yet:

    Dfree1:     Double;     //+216
    Dfree2:     Double;     //+224
    Deriv1:     Double;     //+232    for 4D first deriv or as full derivs
    Deriv2:     Double;     //+240
    Deriv3:     Double;     //+248

grin Ty!!!!!!!!!!!!!!
Logged

No sweat, guardian of wisdom!
ericr
Fractal Fanatic
****
Posts: 318


« Reply #25 on: February 23, 2011, 09:05:22 AM »

http://www.physcip.uni-stuttgart.de/phy11733/quat_e.html

look a this adresse a old programme called Quat make A^B in the quaternions
it is only for help
Tank you for all you done
Logged
DarkBeam
Global Moderator
Fractal Senior
******
Posts: 2512


Fragments of the fractal -like the tip of it


« Reply #26 on: February 23, 2011, 09:52:33 AM »

http://www.physcip.uni-stuttgart.de/phy11733/quat_e.html

look a this adresse a old programme called Quat make A^B in the quaternions
it is only for help
Tank you for all you done


void q_exp(point c, const point q)
{
   static double n, f, ex;
   n = sqrt(q[1]*q[1] + q[2]*q[2] + q[3]*q[3]);
   ex = exp(q[0]);
   f = ex*sin(n);
   if (n != 0.0) f /= n;

   c[0] = ex*cos(n);
   c[1] = f*q[1];
   c[2] = f*q[2];
   c[3] = f*q[3];
}

void q_log(point c, const point q)
{
   static double n, f;
   n = sqrt(q[1]*q[1] + q[2]*q[2] + q[3]*q[3]);
   if (n != 0.0)
   {
      f = atan2(n, q[0]);
      f /= n;
      c[0] = 0.5*log(q[0]*q[0] + n*n);
      c[1] = f*q[1];
      c[2] = f*q[2];
      c[3] = f*q[3];
      return;
   }
   else  /* special case: real number */
   {         
      c[0] = 0.5*log(q[0]*q[0]);
      c[1] = atan2(0.0,q[0]);
      c[2] = 0.0;
      c[3] = 0.0;
      return;
      /* comment on asymmetry in i, j and k:
         e^(i*pi)=-1 && e^(j*pi)=-1 && e^(k*pi)=-1
         [ and even linear combinations of i, j and k give:
           e^(a*i+b*j+c*k) = -1 for every a, b, c E R with:
           sqrt(a^2+b^2+c^2) = pi  ]
         the above means that there is an infinite number of solutions to ln(-1).
         Practically, one must choose one of them and thus break symmetry.
         [ Even then there still is an infinite number of solutions due to
           periodicity of sin and cos... ] */
   }
}

void q_pow(point c, const point a, const point b)
{
   /* if a == zero: exp(-inf*b) = 0, if b>0;
      exp(-inf*b) = inf, if b<0
      if b isn't real, exp(-inf*b) isn't defined, because
      lim sin(x) for x->-inf (same with cos) doesn't exists */
   static double an, bnp;
   static point p;
   an = a[0]*a[0] + a[1]*a[1] + a[2]*a[2] + a[3]*a[3];
   bnp = b[1]*b[1] + b[2]*b[2] + b[3]*b[3];
   if (fabs(an) < 1E-200 && (b[0] > 0.0 || bnp != 0.0) ) {
      c[0] = 0.0; c[1] = 0.0; c[2] = 0.0; c[3] = 0.0;
      return;
   }
   q_log(c, a);
   q_mul(p, c, b);
   q_exp(c, p);
   return;
}

I must write both functions directly in assembly, really hard stuff! sad
Logged

No sweat, guardian of wisdom!
DarkBeam
Global Moderator
Fractal Senior
******
Posts: 2512


Fragments of the fractal -like the tip of it


« Reply #27 on: February 23, 2011, 11:24:24 AM »

The formula is really slow and obviously fuzzy, but the overall result is not bad! What look weird in 2D often looks pretty in 3d. cheesy
I will try to make it grin


* aaaaa iko.jpg (167.29 KB, 876x838 - viewed 267 times.)
Logged

No sweat, guardian of wisdom!
fractalrebel
Fractal Lover
**
Posts: 211



WWW
« Reply #28 on: February 23, 2011, 05:24:46 PM »

DarkBeam,

A few messages ago you asked for the M-set code. My 3D Fractal Raytrace program is a raytracer that is several thousand lines of code, and uses an extensive  Quaternion math library. All of the fractal objects are plugins into the raytrace program and rely on other libraries that have also have thousands of lines of code. If you have access to Ultrafractal and the Ultrafractal database, the code is all there and publicly available. To illustate what I mean, here is the code for the Power Mandelbrot Quaternion plugin:

class PowerMandel(Quat) {

public:
  import "common.ulb"
  ; constructor
  func PowerMandel(Generic pparent)
      Quat.Quat(pparent)
    im = (0,1)
    hrotp = exp(im*@hangle*#pi/180)
    hrotn = exp(-im*@hangle*#pi/180)
    m_zri = @zri
    m_zjk = @zjk
    m_mand = true
    m_quat = true
    m_fourth = @fourth
    m_ck = @ck
    power = new Vector(real(@pri),imag(@pri),real(@pjk),imag(@pjk))
    powerd = new Vector(real(@pri)-1,imag(@pri),real(@pjk),imag(@pjk))
   endfunc   

  ; calculates the fractal value
  func frcalc(complex &zri, complex &zjk)
    CtoV(zri,zjk,in)
    QH.QPower(in,power,out)
    VtoC(zri,zjk,out)
    zri = hrotn*zri + hrotp*m_cri
    zjk = hrotn*zjk + hrotp*m_cjk
  endfunc

  ; calculates the derivative of the fractal
  func drcalc(complex zri, complex zjk, complex &zrid, complex &zjkd)
    CtoV(zri,zjk,in)
    CtoV(zrid,zjkd,ind)
    QH.QPower(in,powerd,in)
    QH.QMul(in,ind,out)
    QH.QMul(power,out,ind)
    VtoC(zrid,zjkd,ind)
    zrid = hrotn*zrid + 1
    zjkd = hrotn*zjkd
  endfunc

protected:
  complex hrotp
  complex hrotn
  vector power
  vector powerd


default:
  title = "Power Mandel Quaternion"
  heading
    text = "Uses quaternion mathematics."
  endheading
  heading
    text = "z = zr + i*zi + j*zj + k*zk"
  endheading
  heading
    text = "where i, j and k are the imaginary vectors. Multiplication is \
            noncommutative and the inverse of any nonzero element is unique."
  endheading
  heading
    caption = "Mandel Initialization"
  endheading
  heading
    text = "The 'r-i plane' is the traditional complex plane. The 'j-k plane \
            contains the 3rd and 4th dimensions."
  endheading
  complex param zri
    caption = "r-i plane"
    default = (0.0,0.0)
  endparam
  complex param zjk
    caption = "j-k plane"
    default = (0.0,0.0)
  endparam
  heading
    caption = "Quaternion Power"
  endheading
  complex param pri
    caption = "r-i plane"
    default = (3,0)
  endparam
  complex param pjk
    caption = "j-k plane"
    default = (0,0)
  endparam
  heading
    text = "The 'Hart angle' rotates the fractal in the r-i plane. Because \
            quaternian math is noncommutative, unusual shapes and forms are \
            created."
  endheading
  float param hangle
    caption = "Hart angle"
    default = 0.0
    hint =  "The 'Hart angle' rotates the r-i plane. This is not the same \
            as rotating the object."
  endparam
  param fourth
    caption = "4th Dimension"
    default = 3
    enum = "zr" "zi" "zj" "zk"
  endparam
  float param ck
    caption = "4th Dimension Value"
    default = 0.0
  endparam
}
Logged

DarkBeam
Global Moderator
Fractal Senior
******
Posts: 2512


Fragments of the fractal -like the tip of it


« Reply #29 on: February 23, 2011, 05:58:02 PM »

DarkBeam,

A few messages ago you asked for the M-set code. My 3D Fractal Raytrace program is a raytracer that is several thousand lines of code, and uses an extensive  Quaternion math library. All of the fractal objects are plugins into the raytrace program and rely on other libraries that have also have thousands of lines of code. If you have access to Ultrafractal and the Ultrafractal database, the code is all there and publicly available. To illustate what I mean, here is the code for the Power Mandelbrot Quaternion plugin:

....

Thanks I am trying to do it "directly" but it's very hard.

Anyway that's what I get for the log of the pixel + int pow... Does not look like normal log transform but that's what I get... If it's correct!


* aaaaa iko.PNG (45.33 KB, 291x216 - viewed 610 times.)
Logged

No sweat, guardian of wisdom!
Pages: 1 [2] 3 4 ... 7   Go Down
  Print  
 
Jump to:  


Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines

Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM
Page created in 0.263 seconds with 27 queries. (Pretty URLs adds 0.011s, 2q)