Skip to content

<codes> && <poems>

TROLLEY PROBLEMS

if ( lever == pull ) {

      1 person is murdered ;

}

else

       5 people die;

}

if ( lockdown == lift ) {

     covid-19 deaths++;

} else

{ starvation deaths ++

}

for ( i = labourer ) {

       if ( walk thorugh roads ) {

                    police beats up ;

                  }

                 else  { walk on rails }

 

 

 

 void PMCARES ( ) {

       insert = donations ;

                  return null;

 }

 

function aatma_nirbhar ( ) {

       while ( unemployed ) {

              create jobs = new [aatma_nirbhar ( ) ] ;

                  return null;

 

}

function hera_pheri ( ) {

       constructor ( raju ) {

              insert  = paisa ;

           let days;

             days ++;

                 if  (days =21)  {

                  return ( 2* paisa );

       }

}

ERROR:  function hera_pheri(bigint) does not exist

 

Duvidha

 

let cursor;

 

function setup() {

 createCanvas(windowWidth, 600);

 noStroke();

cursor = loadImage (
‘https://va-scce-aud.in/wp-content/uploads/2020/05/cursor2.png’ );

  rectMode(CENTER);

 noCursor();

}

function draw() {

     background(240);

     fill(244, 122, 158);

     image(cursor, mouseX-12, height/2, mouseY
/ 5 +10, mouseY / 5 + 10);

     fill(237, 34, 93);

  let inverseX = width – mouseX;

  let inverseY = height – mouseY;

 
 image
(cursor, inverseX, mouseY, inverseY / 5 + 10, inverseY / 5 + 10);

 

}

Patang

let cursor;

let n= 0;

let o=8;

function setup() {

  createCanvas(windowWidth, 600);

  cursor = loadImage ( ‘https://va-scce-aud.in/wp-content/uploads/2020/05/cursor2.png’ );

  noCursor();

}

function draw() {

  background(0);

  let y= mouseY +n;

  image(cursor,mouseX,y,25,25);

  }

function mouseMoved(){

n=n+o;

  if ((n>60)||(n<-70)){

    o=-o;

  }

}

 

 

 

DARAAR

let cursor;

function setup() {

  createCanvas(windowWidth, 600);

  cursor = loadImage ( ‘https://va-scce-aud.in/wp-content/uploads/2020/05/cursor2.png’ );

  x = width / 2 ;

  y = height / 2 ;

  noCursor();

}

 let   x,

  w=300,

  h=300,

  y; // x and y coordinates of the text

function draw() {

  background(204, 120);

image(cursor, x, y, 25,25);

  // check if the mouse is inside the bounding box and tickle if so

  if (

    mouseX >= x – w &&

    mouseX <= x + w &&

    mouseY >= y – h &&

    mouseY <= y + h

  ) {

    x += random(-8, 8);

    y += random(-8, 8);

  }

}

 

 

 

PYAASA

let cursor;

function setup() {

  createCanvas(windowWidth, 600);

  cursor = loadImage ( ‘https://va-scce-aud.in/wp-content/uploads/2020/05/cursor2.png’ );

  x = width / 2 ;

  y = height / 2 ;

  noCursor();

}

function draw() {

  background(204, 120);

translate(mouseX,mouseY);

let a = map(mouseX,0,width,3*PI/4, -3*PI/4);

rotate(a);

  image(cursor, 0,0, 25,25);

}

 

 

 

PANKHA

let cursor;

function setup() {

  createCanvas(windowWidth, 600);

  cursor = loadImage ( ‘https://va-scce-aud.in/wp-content/uploads/2020/05/cursor2.png’ );

  noCursor();

}

function draw() {

  background(204, 120);

  z= map(mouseX, 0, width, 0, 10 *PI);

  image(cursor, mouseX+80 * cos(z), mouseY +80*sin(z), 25,25);

}

 

 

 

GLAANI

let x = 1;

let y = 1;

let easing = 0.005;

let cursor;

function setup() {

  createCanvas(windowWidth, 600);

  noStroke();

cursor = loadImage ( ‘https://va-scce-aud.in/wp-content/uploads/2020/05/cursor2.png’ );

  rectMode(CENTER);

  noCursor();

}

function draw() {

  background(120);

  let targetX = mouseX;

  let dx = targetX – x;

  x += dx * easing;

  let targetY = mouseY;

  let dy = targetY – y;

  y += dy * easing;

  image(cursor, x, y, 25,25);

}

 

 

Valvale

let yvals = [];

let cursor;

function setup() {

  createCanvas(windowWidth, 600);

  strokeWeight(2);

cursor = loadImage ( ‘https://va-scce-aud.in/wp-content/uploads/2020/05/cursor2.png’ );

  rectMode(CENTER);

  noCursor();

}

function draw() {

  background(110);

  for (let i = 1; i < width; i++) {

    yvals[i – 1] = yvals[i];

  }

  // Add the new values to the end of the array

  if ((mouseYpmouseY)==0){

    yvals[width – 1] = 0;

  }

  else {

  yvals[width – 1] = mouseY;

  }

  for (let i = 1; i < width; i+=12) {

    stroke(0);

    image(cursor, i, –height / 20 + yvals[i],25,25 );

  }

}

 

 

 

LOKTANTRA

let cursor;

let n=0;

let a=true;

let x;

let y;

let m=0;

let o= 0;

let p =0;

let q = 0;

let r =0;

   let s =0;

       let t =0;

           let u =0;

               let v =0;

        let w =0;

function setup() {

  createCanvas(windowWidth, 600);

cursor = loadImage ( ‘https://va-scce-aud.in/wp-content/uploads/2020/05/cursor2.png’ );

  frameRate(5);

  noCursor();

}

function draw() {

  background(120);

  x=mouseX-pmouseX;

  y=mouseY-pmouseY;

  constrain(m,0,width);

  constrain(o,0,width);

  constrain(q,0,width);

  constrain(s,0,width);

  constrain(u,0,width);

  constrain(w,0,height);

  constrain(p,0,height);

  constrain(r,0,height);

  constrain(t,0,height);

  constrain(v,0,height);

  image(cursor,width/2+m, height/2+w, 25,25);

   image(cursor,width/2+o, height/2+p, 25,25);

   image(cursor,width/2+q, height/2+r, 25,25);

   image(cursor,width/2+s, height/2+t, 25,25);

   image(cursor,width/2, height/2+v, 25,25);

 if (n%5==0){

  m=m+x;

   w=w+y;

 }

  if (n%5==1){

   o=o+x;

    p=p+y;

 }

  if (n%5==2){

   q=q+x;

    r=r+y;

 }

  if (n%5==3){

   s=s+x;

    t=t+y;

 }

  if (n%5==4){

   u=u+x;

    v=v+y;

 }

}

function mouseMoved() {

 if (a==true){

  n++;

  a=false;

 }

  else {a=true}

}

 

 

 

BEGHAR

let cursor;

class Module {

  constructor(xOff, yOff, x, y, speed, unit) {

    this.xOff = xOff;

    this.yOff = yOff;

    this.x = x;

    this.y = y;

    this.speed = speed;

    this.unit = unit;

    this.xDir = 1;

    this.yDir = 1;

  }

  // Custom method for updating the variables

  update() {

    this.x = this.x + this.speed * this.xDir;

    this.y = this.y + this.speed * this.yDir;

    if (this.x >= this.unit || this.x <= 0) {

      this.xDir *= -1;

      this.x = this.x + 1 * this.xDir;

    //  this.y = this.y + 1 * this.yDir;

    }

    if (this.y >= this.unit || this.y <= 0) {

      this.yDir *= -1;

      this.y = this.y + 1 * this.yDir;

    }

  }

  // Custom method for drawing the object

  draw() {

    fill(255);

    image(cursor,this.xOff + this.x, this.yOff + this.y, 25, 25);

  }

}

let unit = 20;

let count;

let mods = [];

function setup() {

  createCanvas(windowWidth,600);

cursor = loadImage

“https://va-scce-aud.in/wp-content/uploads/2020/05/cursor2.png” );

  let wideCount = width / unit;

  let highCount = height / unit;

  count = wideCount * highCount;

  let index = 0;

  for (let y = 0; y < highCount; y++) {

    for (let x = 0; x < wideCount; x++) {

      mods[index++] = new Module(

        x * unit,

        y * unit,

        unit / 2,

        unit / 2,

        random(0.2,2),

        unit

      );

    }

  }

}

function draw() {

  background(0);

  for (let i = 0; i < count; i++) {

    mods[i].update();

    mods[i].draw();

  }

}