The All New FractalForums is now in Public Beta Testing! Visit FractalForums.org and check it out!
|
|
Mandelbulb Variant | ||||||
Previous Image | Next Image | ||||||
Description: A modified Mandelbulb 8 Formula Formula in Gestaltlupe (ar=8): public override void Init() { base.Init(); // Hier kann z.B. pow oder gr aus den Einstellungen gelesen werden. } public override long InSet(double ar, double ai, double aj, double br, double bi, double bj, double bk, long zkl, bool invers) { double aar, aai, aaj; long tw; int n; double pow = ar; // Mandelbrot, version n=8 entspricht dem Mandelbulb, double gr = 2; // Ab diesem Wert liegt mit Sicherheit Nichtzugehörigkeit zur Menge vor. double theta, phi; ar=0; ai=0; aj=0; double r_n = 0; aar = ar * ar; aai = ai * ai; aaj = aj * aj; tw = 0L; double r = Math.Sqrt(aar + aai + aaj); double phi_pow; double theta_pow; double sin_theta_pow; double rn_sin_theta_pow; for (n = 1; n < zkl; n++) { theta = Math.Atan2(Math.Sqrt(aar + aai), aj); phi = Math.Atan2(ai, ar); r_n = Math.Pow(r, pow); phi_pow=phi*pow; theta_pow=theta*pow; sin_theta_pow=Math.Sin(theta_pow); rn_sin_theta_pow=r_n* sin_theta_pow; aj = rn_sin_theta_pow * Math.Cos(phi_pow)+br; ai = rn_sin_theta_pow * Math.Sin(phi_pow)+bi; ar = r_n * Math.Cos(theta_pow)+bj; aar = ar * ar; aai = ai * ai; aaj = aj * aj; r = Math.Sqrt(aar + aai + aaj); if (r > gr) { tw = n; break; } } if (invers) { if (tw == 0) tw = 1; else tw = 0; } return (tw); } Stats: Total Favorities: 0 View Who Favorited Filesize: 38.7kB Height: 720 Width: 960 Posted by: trafassel February 05, 2010, 08:10:25 PM Rating: Has not been rated yet. Image Linking Codes
|
||||||
0 Members and 1 Guest are viewing this picture. | ||||||
Related Images | ||||||
|
|
Comments (0) |
Powered by SMF Gallery Pro