Showing posts with label language. Show all posts
Showing posts with label language. Show all posts

Java Kali Code - Written Long Ago this Program Created a Kaleidoscope... but JAVA Changed the Language and all Old Programs fail to Run Now...

Tye Dye Squiral Java Program Running by gvan42 gregvan


SOMEDAY... I Ought to Re Compile this Code and FIX the Errors & Make the Program Work Again... But I Kinda Doubt that will ever happen... 

 /**tds(number).java by gregvan

code for embedding in webpage....
<applet code="tds(number).class" 
height=500 width=750> </applet>
 **/

import java.applet.*;
import java.awt.*;
//~~~~~~make sure this name is exactly the same as filename~~~~~
public class tds29 extends Applet implements Runnable
{
int spin;
int tiny=1;
int tim=1;
int timFact=1;
int joe=10;
int joeFact=1;
int sd=1;
int sdFact=1;
int god;
int godFact=1;
int mod;
int god1;
int mod1;
int modFact=1;
int q=2;
int xx,yy;
int rr,gg,bb;//color variables 
int bw;//black and white 
int bwq=1;    
int rq=1; // color up-down factors
int gq=1;
int bq=1;

int w,ww;
int wwf=1;
int wf=1;

int cx; //center of screen x
int cy; //center of screen y

        Thread    myRunner;
        Image     buffer;         
        Dimension appletSize;     
        Graphics  bufferGraphics; 

        public void init()
        {    
        setBackground(Color.black);
        appletSize = this.getSize();     
        buffer = this.createImage(appletSize.width, appletSize.height);
        bufferGraphics = buffer.getGraphics();
	cx=appletSize.width/2;
        cy=appletSize.height/2;

        }

        public void start()
        {
             if (myRunner == null)
             {
                 myRunner = new Thread(this);
                 myRunner.start();
             }
        }

        public void run()
        {
            Thread  executingThread;                   
            executingThread = Thread.currentThread();

            while (myRunner == executingThread)
            {
               //new random numbers to start animation
	 

//random starting colors
rr=(int)(Math.random() *255);
gg=(int)(Math.random() *255);
bb=(int)(Math.random() *255);
bw=(int)(Math.random() *255);
xx=gg-128;
yy=rr-128;

w=(int)(Math.random() *8);
ww=(int)(Math.random() *13);

               repaint();
               try
               {Thread.sleep(1000);}
               catch(InterruptedException e) {} 

               while (myRunner != null)
               {
                  repaint(); 
                  try
                  {Thread.sleep(100); }
                  catch (InterruptedException e) {}
               }  
           } 
        }
//~~~~~~~~drawing squares stuff~~~~~~~~~~~~~~~
public void drawSquares1(int cx,int cy,int xx,int yy,int q)
        {

bufferGraphics.fillRect(cx-xx-q,cy-yy-q,q+q,q+q);
bufferGraphics.fillRect(cx+xx-q,cy+yy-q,q+q,q+q);
bufferGraphics.fillRect(cx-yy-q,cy+xx-q,q+q,q+q);
bufferGraphics.fillRect(cx+yy-q,cy-xx-q,q+q,q+q);

bufferGraphics.fillRect(cx-xx+yy-q,cy-xx-yy-q,q+q,q+q);
bufferGraphics.fillRect(cx+xx+yy-q,cy-xx+yy-q,q+q,q+q);
bufferGraphics.fillRect(cx+xx-yy-q,cy+xx+yy-q,q+q,q+q);
bufferGraphics.fillRect(cx-xx-yy-q,cy+xx-yy-q,q+q,q+q);

}

public void drawSquares2(int cx,int cy,int xx,int yy,int q)
        {
q=q+1;

bufferGraphics.drawRect(cx-xx-q,cy-yy-q,q+q,q+q);
bufferGraphics.drawRect(cx+xx-q,cy+yy-q,q+q,q+q);
bufferGraphics.drawRect(cx-yy-q,cy+xx-q,q+q,q+q);
bufferGraphics.drawRect(cx+yy-q,cy-xx-q,q+q,q+q);

bufferGraphics.drawRect(cx-xx+yy-q,cy-xx-yy-q,q+q,q+q);
bufferGraphics.drawRect(cx+xx+yy-q,cy-xx+yy-q,q+q,q+q);
bufferGraphics.drawRect(cx+xx-yy-q,cy+xx+yy-q,q+q,q+q);
bufferGraphics.drawRect(cx-xx-yy-q,cy+xx-yy-q,q+q,q+q);
if(gg<bb){
bufferGraphics.drawLine(cx-xx,cy-yy,cx-yy,cy+xx);
bufferGraphics.drawLine(cx-xx,cy-yy,cx+yy,cy-xx);
bufferGraphics.drawLine(cx+xx,cy+yy,cx-yy,cy+xx);
bufferGraphics.drawLine(cx+xx,cy+yy,cx+yy,cy-xx);
}
if(bw>rr){
bufferGraphics.drawLine(cx-xx,cy-yy,cx,cy);
bufferGraphics.drawLine(cx+xx,cy+yy,cx,cy);
bufferGraphics.drawLine(cx-yy,cy+xx,cx,cy);
bufferGraphics.drawLine(cx+yy,cy-xx,cx,cy);

bufferGraphics.drawLine(cx-xx+yy,cy-xx-yy,cx,cy);
bufferGraphics.drawLine(cx+xx+yy,cy-xx+yy,cx,cy);
bufferGraphics.drawLine(cx+xx-yy,cy+xx+yy,cx,cy);
bufferGraphics.drawLine(cx-xx-yy,cy+xx-yy,cx,cy);
}
q=q-1;
}
//~~~end of drawing squares stuff~~~~~~~~~~~~~~~

       // make sure the animation really stops when exiting webpage
        public void stop()
        { 
          if (myRunner != null)
             { myRunner = null; }
        }

        //used to prevent blinking graphics....
        public void update(Graphics g)
        {paint(g);}

        public void paint(Graphics g)
        {
mod=mod+modFact;
if(mod>9){modFact=-1;}
if(mod<-9){modFact=1;}

//~~~~~~~tim is inside god~~~~~~~~
god=god+godFact;
if(god>12){godFact=-1;}
if(god<-12){godFact=1;

tim=tim+timFact;
if (tim>5){timFact=-1;}
if(tim<2){timFact=1;}

}//end of god

//-----------size of squares---------
sd=sd+sdFact;
if (sd > 12){sdFact=-1;}
if(sd<3){sdFact=1;}

tiny=tiny+1;
if(tiny>rr){tiny=-(rr+rr);}

joe=joe+joeFact;
if(joe>12){joeFact=-1;}
if(joe<3){joeFact=1;}

spin=spin+1;
if(spin>20){
spin=1;
for (int i3=0; i3<gg;i3++){
mod1=mod1+1;
if(mod1>10){mod1=-10;}
god1=god1+1;
if(god1>9){god1=-9;}
}}

//----------------------------------for loop--------------------------------
//for loop to paint many images before sleeping .1 second     
       for (int i=0;i<3;i++)
        {

             //color changer up counters
if(god>mod){
 rr=rr+1;
           if(rr>255){rr=1;}
gg=gg+2;
           if(gg>255){gg=1;}
bb=bb+3;
           if(bb>255){bb=1;}
bw=bw+4;
           if(bw>255){bw=1;}
}
if(god<=mod){
rr=rr+rq;
if(rr>252){rq=-1;}
if(rr<3){rq=1;}
gg=gg+gq;
if(gg>251){gq=-1;}
if(gg<4){gq=1;}
bb=bb+bq;
if(bb>250){bq=-1;}
if(bb<5){bq=1;}
bw=bw+bwq;
if(bw>249){bwq=-1;}
if(bw<6){bwq=1;}
}          
//-------------------position xx,yy----------------
w=w+wf;
if (w>12+mod){wf=-1;}
if (w<-(11+mod)){wf=1;}

ww=ww+wwf;
if(ww>11+god){wwf=-1;}
if(ww<-(12+god)){wwf=1;}
if(tiny<=0 && tiny>-rr){             
xx=xx+w;
yy=yy+ww;
}
if(tiny>0){
xx=xx+mod;
yy=yy+god;}
if(tiny<=-rr){
xx=xx+mod1;
yy=yy+god1;}

//~~~~~~~~~~check to see if off screen~~~~~~~~

if(xx>cx+100){xx=0;
yy=0;}
if(yy>cx+100){yy=0;
xx=0;}
if(xx<-(cx+100)){xx=0;
yy=0;}
if(yy<-(cx+100)){yy=0;
xx=0;}

//-----------for loop ii--------------
if(tiny<0){
joe=joe+joeFact;
if(joe>12){joeFact=-1;}
if(joe<3){joeFact=1;}
}
//for loop to paint many images     
       for (int ii=-(joe*tim);ii<((joe*tim)+1);ii=ii+joe)
        {
q=sd;
if (tiny>0){q=5;}
if(tiny<=-rr){q=mod1+10;}

xx=xx+ii;
if(tiny>=-rr){yy=yy-ii-ii;}
if(tiny<-rr){yy=yy+ii;}
//apply the new numbers for stars
        Color wNew = new Color(rr, gg, bb);
        bufferGraphics.setColor(wNew); 
//~~~~~call subroutine~~~~~~~~
drawSquares1(cx,cy,xx,yy,q);
//~~~~~~~~~~~~~~~~~~`~
//apply the new numbers for stars
        Color waxNew = new Color(256-rr, 256-gg, bb);
        bufferGraphics.setColor(waxNew); 
//~~~~call subroutine~~~~~~~~~~
drawSquares2(cx,cy,xx,yy,q);
//~~~~~~~~~~~~~~~~~`~

//~~~~~~~~~other set of squares~~~~~~~~~~
//apply the new numbers for black erase
        Color zNew = new Color(bw,bw,bw);
        bufferGraphics.setColor(zNew);
//~~~~~~~~~calculate difference~~~~~~~~~~~

xx=xx+25;
yy=yy+25;
//~~~~call subroutine~~~~~~
drawSquares1(cx,cy,xx,yy,q);
//~~~~~~~~~~~~~~~~`~
//apply the new numbers for squares
        Color zapNew = new Color(bw,rr,256-bb);
        bufferGraphics.setColor(zapNew);
//~~~call subroutine~~~~~~~~~
drawSquares2(cx,cy,xx,yy,q);
//~~~~~~~~~~~~~~~~`~
xx=xx-25;
yy=yy-25;

//~~~~~~~~~~~~~~~~`~
if(xx>yy){
//apply the new numbers for black erase
        Color zapBNew = new Color(gg,bw,bw);
        bufferGraphics.setColor(zapBNew);
}
//~~~~~~~~~~~~~~~~`~
if(xx<=yy){
//apply the new numbers for black erase
        Color zapCNew = new Color(0,0,0);
        bufferGraphics.setColor(zapCNew);
}
xx=xx+100;
yy=yy+100;
//~~~call subroutine~~~~~~~~~
drawSquares1(cx,cy,xx,yy,q);
//~~~~~~~~~~~~~~~~`~
yy=yy-100;
xx=xx-100;
xx=xx+200;
yy=yy+200;
//~~~call subroutine~~~~~~~~~
drawSquares1(cx,cy,xx,yy,q);
//~~~~~~~~~~~~~~~~`~
yy=yy-200;
xx=xx-200;
xx=xx-125;
yy=yy-125;
//~~~call subroutine~~~~~~~~~
drawSquares1(cx,cy,xx,yy,q);
//~~~~~~~~~~~~~~~~`~
yy=yy+125;
xx=xx+125;
xx=xx-225;
yy=yy-225;
//~~~call subroutine~~~~~~~~~
drawSquares1(cx,cy,xx,yy,q);
//~~~~~~~~~~~~~~~~`~
yy=yy+225;
xx=xx+225;


xx=xx-ii;
if(tiny>=-rr){yy=yy+ii+ii;}
if(tiny<-rr){yy=yy-ii;}
}//end of for ii loop

   }//end of for loop i
     // move the entire buffer onto the display screen and change
     // pixels that are a different color...
      g.drawImage(buffer, 0, 0, this);
    }
} // end of the program...

Join the Global #DumpTrump Movement. Anyone, Anywhere in the World May Write to US Senators and House Representatives Using Their Online Contact Forms. Use an American Sounding Name and Use Google Maps - "Search Nearby" to Find a Valid Street Address and Phone Number in the Senator's State. That Way You Will Appear To Be A Voter of Theirs. Tell Them To #ArrestTrump... #LockHimUP Thanks!

https://www.senate.gov/senators/How_to_correspond_senators.htm

https://www.house.gov/representatives/find-your-representative

Treten Sie der globalen #DumpTrump-Bewegung bei. Jeder auf der ganzen Welt kann über seine Online-Kontaktformulare an US-Senatoren und Repräsentanten des Repräsentantenhauses schreiben. Verwenden Sie einen amerikanisch klingenden Namen und Google Maps - "In der Nähe suchen", um eine gültige Straße und Telefonnummer im Senator-Bundesstaat zu finden. Auf diese Weise scheinen Sie in diesem Zustand ein Wähler zu sein. Sagen Sie ihnen zu #ImpeachTrump ... Danke! Lesen Sie mehr unter: https://gvan42.blogspot.com

Únete al Movimiento Global #DumpTrump. Cualquiera, en cualquier parte del mundo, puede escribir a los senadores y representantes de la Cámara de Representantes de los Estados Unidos utilizando sus formularios de contacto en línea. Use un nombre de sonido estadounidense y use Google Maps: "Buscar cerca" para encontrar una dirección válida y un número de teléfono en el estado del Senador. De esa manera usted aparecerá como un votante en ese estado. Dígales a #ImpeachTrump ... ¡Gracias! Lea más en: https://gvan42.blogspot.com

Bli med i Global #DumpTrump-bevegelsen. Noen, hvor som helst i verden, kan skrive til amerikanske senatorer og husrepresentanter ved hjelp av deres online kontaktskjemaer. Bruk et amerikansk lydnavn og bruk Google Maps - "Søk i nærheten" for å finne en gyldig gateadresse og telefonnummer i senatorens stat. På den måten vil du vise seg å være en velger i den staten. Fortell dem å #ImpeachTrump ... Takk! Les mer på: https://gvan42.blogspot.com

Junte-se ao movimento global #DumpTrump. Qualquer pessoa, em qualquer lugar do mundo, pode escrever para os senadores e representantes nos Estados Unidos usando seus formulários de contato on-line. Use um nome sonoro americano e use o Google Maps - "Pesquisar nas proximidades" para encontrar um endereço válido e um número de telefone no estado do senador. Dessa forma você vai parecer ser um eleitor nesse estado. Diga-lhes para #ImpeachTrump ... Obrigado! Leia mais em: https://gvan42.blogspot.com

Doe mee met de Global #DumpTrump-beweging. Iedereen, waar ook ter wereld kan schrijven aan Amerikaanse senatoren en huisvertegenwoordigers met behulp van hun online contactformulieren. Gebruik een Amerikaanse klinkende naam en gebruik Google Maps - "Zoeken in de buurt" om een ​​geldig straatadres en telefoonnummer in de staat van de senator te vinden. Op die manier zul je een kiezer in die staat blijken te zijn. Vertel ze aan #ImpeachTrump ... Bedankt! Lees meer op: https://gvan42.blogspot.com

Rejoignez le mouvement mondial #DumpTrump. N'importe qui, n'importe où dans le monde, peut écrire aux sénateurs américains et aux représentants de la Chambre à l'aide de leurs formulaires de contact en ligne Utilisez un nom américain et utilisez Google Maps - "Rechercher à proximité" pour trouver une adresse et un numéro de téléphone valides dans l'état du sénateur. De cette façon, vous semblerez être un électeur dans cet État. Dites-leur de #ImpeachTrump ... Merci! Lire la suite sur: https://gvan42.blogspot.com


MEME - tRUMP Joke - gvan42

Why Has tRUMP FAILED to Make America Great? - Remember the Dead When You Vote... #Purple64ets #PromisesMadePromisesBroken https://gvan42.blogspot.com/2020/07/why-has-trump-failed-to-make-america.html

Trump Says: "Windmills Cause Cancer" - Obviously, He Is WRONG. We Have been using Windmills Safely FOR HUNDREDS OF YEARS. #iDIOTbOYtRUMP
https://gvan42.blogspot.com/2020/01/trump-says-windmills-cause-cancer.html

tRUMP's "Booming" Economy = MORE UNEMPLOYED PEOPLE THAN EVER BEFORE IN THE HISTORY OF THE UNIVERSE... https://gvan42.blogspot.com/2020/04/2trilliondollarloser-trumps-booming.html

Trump's "base" is the 1% [the super rich]. They pretend that his "base" is Uneducated White Men but that's a Misdirection. Like a magic act...


... they use misdirection to keep our attention focused on what they want us to see, not what they are really doing. Note that the Environmental Protection Agency has switched mission from Protecting the Environment to enabling corporations to increase profits by reducing expenditures for cleaning up pollution caused by their factories. https://gvan42.blogspot.com/2017/08/trumps-base-is-1-they-pretend-that-his.html

The TRUMP Effect: US SUICIDE RATE HIGHEST SINCE 1945. If Our Glorious Leader is Doing Such a "Wonderful" Job, Why are So Many People Killing Themselves?
Think About This... The Quality Of Life For 99% of Americans is a LOT Worse Now Than It Was When Obama Was President. https://gvan42.blogspot.com/2019/06/the-trump-effect-us-suicide-rate.html

Global Awakening is Real and Happening Now. All around the World People are Refusing to Believe the Corporate Brainwashing...

Much of what we see in the Media is Propaganda designed to make You and I Believe Whatever they are Selling... Be it a Presidential Candidate, a Drug, a Washing Machine, a Car, a Religion OR A WAR! https://gvan42.blogspot.com/2018/03/global-awakening-is-real-and-happening.html

Popular Posts