No subject


Sat Mar 19 21:51:29 CET 2011


(guess this explains my bad grammar)

A*B=3DC
where
A:[x1,y1,z1]
B:[x2,y2,z2]
C:[x,y,z]

[x1,y1,z1] * [x2,y2,z2] =3D [x,y,z]


x =3D (x1*x2) - (y1*y2) - (z1*z2)
y =3D (x1*y2) + (y1*x2)
z =3D (x1*z2) + (z1*x2)

Correct only if A and B are the same
Or if x1,y1,z1 are the same and
     x2,y2,z2 are the same
     and a few other cases
     otherwize magnitude of x,y,z
     is slightly different than A * B
********************************************END OF HISTORY

START OF CODE SNIPET*******************************************************=
**************
void mandelbrot::iterate(void)
{

 int vtxi;

 long int p,q,r;
 int n;
 double k,l,x,y,z,newx,newy,newz;
 double m;

 vtxi=3D0;

 for(r=3D1; r<depth; r++)
   {
    for (p=3D1; p<width; p++)
        {
         for (q=3D1; q<height; q++)
              {
              if(julia=3D=3D0){
               k=3D(double)x1+(x2-x1)*p /(width);
               l=3D(double)y1+(y2-y1)*q /(height);
               m=3D(double)z1+(z2-z1)*r /(depth);

               x=3Drealp;
               y=3Dimagp;
               z=3Dkapap;
               }else{

               x=3D(double)x1+(x2-x1)*p /(width);
               y=3D(double)y1+(y2-y1)*q /(height);
               z=3D(double)z1+(z2-z1)*r /(depth);

               k=3Drealp;
               l=3Dimagp;
               m=3Dkapap;
               }

               for (n=3D1; n<numits; n++)
                   {
                    //newx=3Dx*x-y*y+k;
                    //newy=3D2*x*y+l;


            //6-9-2002 equation

                    newx=3D((y*z)+(z*y))+k;
                    newy=3D((x*z)+(z*x))+l;
                    newz=3D((x*y)+(y*x))+m;

                   /*
                     *  2000 equation
                     */

                   /*
                     *   newx=3D((x*x)-(y*y)-(z*z))+k;
                     *   newy=3D((y*x)-(z*y)+(x*z))+l;
                     *   newz=3D((z*x)+(x*y)-(y*z))+m;
                     */

                   /*
                     *  1996 equation - see history
                     */

                   /*
                     * newx=3D((x*x)-(y*y)-(z*z))+k;
                     * newy=3D((x*y)+(x*y))+l;
                     * newz=3D(x*z)+(x*z)+m;
                     */

           x=3Dnewx;
                    y=3Dnewy;
                    z=3Dnewz;

                    //putpixel(surface, p+startx-1,q+starty-1,n);

//putpixel(surface,(int)(x*10+160),(int)(y*10+100),(unsigned char)n);

                    if (x*x+y*y+z*z>magnitude)
                       {
                        if((n>lowcolor)&&(n<highcolor))
                          {
                           vtx[vtxi].x=3D(p/scaledivisor);
                           vtx[vtxi].y=3D(q/scaledivisor);
                           vtx[vtxi].z=3D(r/scaledivisor);
                           vtx[vtxi].r=3DcMap[n].r;
                           vtx[vtxi].g=3DcMap[n].g;
                           vtx[vtxi].b=3DcMap[n].b;

                           if(alphamode=3D=3D0)
                              {
                                vtx[vtxi].a=3D16;
                              }else{
                                     vtx[vtxi].a=3D(unsigned
char)((0.9375*n)+16);//((256/(256-16)) * n)+16
                                    }
                           vtx[vtxi].n=3Dn;
                           vtxi++;
                           }



                         // putpixel(surface, p+startx-1,q+starty-1,n);
                         //SDL_UpdateRect(screen, p+startx-1,
q+starty-1, 1, 1);

                         n=3Dnumits;

                        }//mag check

                   }//n

              }//q
        }//p
   }//r
 nvertexes=3Dvtxi;
}

*******************************************************************END
OF CODE SNIPPET




>
> Complex numbers have 2 dimensions. The logic that originally led to
> finding them doesn't work for more dimensions. Looking at complex numbers
> in different ways (as modified vectors or as modified polynomials) leads
> to other structures that are interesting, in 2 or 4 or more dimensions,
> but fail to be as nice as complex numbers are. Complex numbers are very,
> very similar to real numbers.

> I don't know of any 3-dimensional number system that is sufficiently
> similar to complex numbers to be comparable.
>
>> a: [x1,y1,z1]
>> b: [x2,y2,z2]
>> a*b=3D(y1 * z2 - z1 * y2)i + (x1 * z2 - z1 * x2)j + (x1 * y2 - y1 * x2)k
>
> this is almost like cross-product, but the j part has the wrong sign.
> anyway. cross product is weird because a*a =3D 0, and this is also the ca=
se
> for your cross-product-like operator.


I have visited this perplexing search for the 3 dimensional equivalent
of j or i sporadically.
Elusive it is.


> I get the following error message :
>
>    :-\ Cette vid=E9o est priv=E9e.
>        Op=E9ration impossible
>
>   _______________________________________________________________________
> | Mathieu Bouchard ---- t=E9l: +1.514.383.3801 ---- Villeray, Montr=E9al,=
 QC

Appologies. You should be able to view it now. I had it set to private
instead of hidden.

 http://www.youtube.com/watch?v=3DxZUTn-rie8w



More information about the Pd-list mailing list