Blockland Wiki
Advertisement

Introduction[]

This page covers another way of writing out the formulas necessary to create graphs than covered on the Parametric equations page. It may seem unnecessarily complicated at times, but as you can see, this method can provide quite complex shapes and designs.

Heart

Heart

  for( %x = -2 ; %x < 2 ; %x+=0.05 )
    {
      for( %y = -2 ; %y < 2 ; %y+=0.05 )
        {
          for( %z = -2 ; %z < 2 ; %z+=0.05 )
            {
              %m = ((-%x*%x*%z*%z*%z - (9*%y*%y*%z*%z*%z)/80) + mPow((%x*%x + (9*%y*%y)/4 + %z*%z -1),3));
              if (%m >= -0.07)
                {
 if (%m <= 0.07)
                    {
                      %posx = %x*10;
                      %posy = %y*10;
                      %posz = %z*10; 
                      %temp = new fxDTSBrick()
                         {
                          datablock = "brick1x1Data";
                          position = %posx SPC %posy SPC %posz;
                          rotation = "0 0 0 0";
                          colorID = "0";
                          scale = "1 1 1";
                          angleID = "0";
                          colorfxID = "0";
                          shapefxID = "0";
                          isPlanted = 1;
                         };
                    }
                }
            }
        }
    }
Algebraic1

UFO

for( %x = -100 ; %x < 100 ; %x++ )
{
for( %y = -100 ; %y < 100 ; %y++ )
{
for( %z = -100 ; %z < 100 ; %z++ )
{

if ((%z*%z-%x*%x-%y*%y-1)==0)
{

%posx = %x/10;
%posy = %y/10;
%posz = %z/10;

%temp = new fxDTSBrick()
   {
    datablock = "brick1x1Data";
    position = %posx SPC %posy SPC %posz;
    rotation = "0 0 0 0";
    colorID = "0";
    scale = "1 1 1";
    angleID = "0";
    colorfxID = "0";
    shapefxID = "0";
    isPlanted = 1;
   };

}

}
}
}

Gupf[]

Algebraic2

Gupf

for( %x = -50 ; %x < 50 ; %x++ )
{
for( %y = -50 ; %y < 50 ; %y++ )
{
for( %z = -50 ; %z < 50 ; %z++ )
{

if ((%x*%x)+(%y*%y)+(%z)==0)
{

%posx = %x;
%posy = %y;
%posz = %z;

%temp = new fxDTSBrick()
   {
    datablock = "brick1x1Data";
    position = %posx SPC %posy SPC %posz;
    rotation = "0 0 0 0";
    colorID = "16";
    scale = "1 1 1";
    angleID = "0";
    colorfxID = "0";
    shapefxID = "0";
    isPlanted = 1;
   };

}

}
}
}

Kreuz[]

Algebraic3

Kreuz

for( %x = -10 ; %x < 10 ; %x++ )
{
for( %y = -10 ; %y < 10 ; %y++ )
{
for( %z = -10 ; %z < 10 ; %z++ )
{

if (%x*%y*%z==0)
{

%posx = %x;
%posy = %y;
%posz = %z;

%temp = new fxDTSBrick()
   {
    datablock = "brick1x1Data";
    position = %posx SPC %posy SPC %posz;
    rotation = "0 0 0 0";
    colorID = "16";
    scale = "1 1 1";
    angleID = "0";
    colorfxID = "0";
    shapefxID = "0";
    isPlanted = 1;
   };

}

}
}
}
Advertisement