Welcome to Fractal Forums

Fractal Math, Chaos Theory & Research => (new) Theories & Research => Topic started by: DarkBeam on February 15, 2012, 05:11:01 PM




Title: Very easy DE formula for "Limpet torus"
Post by: DarkBeam on February 15, 2012, 05:11:01 PM
I am trying to do various shapes in MB3D, it's necessary to express them in implicit form and DE must vary asyntotically like sqrt(x*x+y*y+z*z) (or a similar function).

Normally you need to derive the expressions to do this (boring method and slow)

Some surfaces are easily convertible with this trick that may be interesting if you want to try;

- given a surface implicit form Sum(fn(x,y,z)) = 0 you need to separate terms of constant sign by terms of variable sign.

Example; (x(y^4+z^4) + sin(x))^4 is constantly positive everywhere (power 4 forces positivity :) )
but x*y is not always positive.

- Assign the sum of all positive terms to P, all negative to Q. (P = Sum(positiveF(x,y,z)) and Q = -Sum(negativeF(x,y,z)) ) note that I forced the positivity of P and Q.

- Calculate the variable terms one by one; if they are positive sum them to P else to Q (sum the absolute value!).

- Now P = pow(P,1/M) and Q = pow(P,1/M) where M must be >= the maximum grade encountered in the expressions.
Example x*x*x*x*z + z*y*x - 5*x*(1+y)*sin(z) = 0 -> M = 5

Finally DE = P - Q :)

It works fine.

Ok, the Limpet torus DE is;

  // sqrt4(k) = sqrt(sqrt(k))
  R = sqrt(x*x+y*y)
  DE = sqrt4(sqr(R1 + z*R + Rmul*R) + z*z) - R2
  // nice values are R1 = 1.2 R2 = 1 Rmul = -1.6 don't mess around or it fills the entire plane :o

I can't find this simple expression anywhere (only in parametric form... but parametric stuff is not easily manipulable) thought it may be useful for someone :dink:

Here some images of raytraced surfaces with my method! :dink:

I am trying to figure out how to convert some (some!) minimal surfaces to a DE, somebody wants to help me? :D