Talk About Network



Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Fractals > kmandel diff fo...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 1 Topic 124 of 206
Post > Topic >>

kmandel diff for debian etch

by costello@[EMAIL PROTECTED] (Antti =?iso-8859-1?Q?J=E4rvinen?=) Nov 4, 2006 at 12:46 AM

Had some trouble compiling kmandel 0.61 for debian etch. Should anyone 
have interest, here's the diffies:

---------------schnip--schnap------------------------------------
diff -u -r --new-file kmandel-0.61-orig/kmandel/insel.cpp
kmandel-0.61-for-etch/kmandel/insel.cpp
--- kmandel-0.61-orig/kmandel/insel.cpp	2001-07-07 13:26:13.000000000
+0300
+++ kmandel-0.61-for-etch/kmandel/insel.cpp	2006-11-04 00:34:21.000000000
+0200
@[EMAIL PROTECTED]
 -7,7 +7,7 @[EMAIL PROTECTED]
 #define InselNr l[0]
 #define WasserStand l[1]
 #define InselFaktor l[2]
-#define Flags l[3]
+#define Insel_Flags l[3]
 
 #include <stdio.h>
 #include <stdlib.h>
@[EMAIL PROTECTED]
 -33,7 +33,7 @[EMAIL PROTECTED]
    InselNr = 5;
    WasserStand = 60;
    InselFaktor = 256;
-   Flags = 3;
+   Insel_Flags = 3;
    ReInit();
 }
 
@[EMAIL PROTECTED]
 -139,8 +139,8 @[EMAIL PROTECTED]
    
    for (m=0;m<129;m++)   // Mirror
    for (n=0;n<129;n++) {
-      if (Flags & 1) m2=128-m; else m2=m;
-      if (Flags & 2) n2=128-n; else n2=n;
+      if (Insel_Flags & 1) m2=128-m; else m2=m;
+      if (Insel_Flags & 2) n2=128-n; else n2=n;
       Feld2[m][n]=Feld1[m2][n2];
    }
    //Feld1=Feld2;
@[EMAIL PROTECTED]
 -272,11 +272,11 @[EMAIL PROTECTED]
 
    HorCheck = new QCheckBox(i18n("Mirror horizontal"), this, "HorCheck");
    HorCheck->setGeometry(20,135,150,18);
-   HorCheck->setChecked(Fractal->Flags & 1);
+   HorCheck->setChecked(Fractal->Insel_Flags & 1);
    
    VertCheck = new QCheckBox(i18n("Mirror vertical"), this, "VertCheck");
    VertCheck->setGeometry(20,155,150,18);
-   VertCheck->setChecked(Fractal->Flags & 2);
+   VertCheck->setChecked(Fractal->Insel_Flags & 2);
    
    QLabel *Label1 = new QLabel(i18n("Islandnumber:"), this, "Label1");
    Label1->setGeometry(20,35,90,20);
diff -u -r --new-file kmandel-0.61-orig/kmandel/mand4b.cpp
kmandel-0.61-for-etch/kmandel/mand4b.cpp
--- kmandel-0.61-orig/kmandel/mand4b.cpp	2001-07-05 23:18:48.000000000
+0300
+++ kmandel-0.61-for-etch/kmandel/mand4b.cpp	2006-11-04 00:34:34.000000000
+0200
@[EMAIL PROTECTED]
 -52,8 +52,10 @[EMAIL PROTECTED]
    h=eins/d;
    j=eins/(f-b);
    z=pow((-a*b*g*h),j);
-   k=complex<double>(p[4],0)+1;
-   l=complex<double>(p[5],0)+100;
+   complex<double> addition(1,0) ; 
+   k=complex<double>(p[4],0)+addition ;
+   addition = complex<double>(100,0) ; 
+   l=complex<double>(p[5],0)+addition ;
    do {
       z=k*((a*pow(z,b))+(d*pow(z,f)))+c;
       iter++;

---------------schnip--schnap------------------------------------

most likely that "addition" with real part 1 and imaginary part 0 is a
royal mistake but I don't know anything about algebra in complex numbers ;

was I supposed to add 1 to real part or the imaginary part or both???

screwup or not, I was able to plot a mandelbrot :-) 

-- 
Costello the Warrior        St:18/09 Dx:14 Co:18 In:8 Wi:12 Ch:7  Neutral
Dlvl:16 $:0  HP:129(129) Pw:52(52) AC:-6 Xp:14/83896 T:19462 Satiated




 1 Posts in Topic:
kmandel diff for debian etch
costello@[EMAIL PROTECTED  2006-11-04 00:46:58 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Tue May 13 7:29:34 CDT 2008.