Ea Loops

  • November 2019
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Ea Loops as PDF for free.

More details

  • Words: 991
  • Pages: 5
//file my pictures\_equation art\sin x cos.bmp //this code is executed for each pixel: $red = 128*(sin($x/10) + cos($y/7.5)); $green = 96*(sin($x/20) - cos($y/15)); $blue = 96*(sin(($x+10)/20) - cos(($y+7.5)/15))*(sin(($x+10)/10) + cos(($y+7.5)/7.5)); //file my pictures\_equation art\(sin+cos)x(sin-cos).bmp //this code is executed for each pixel: $red = 128*(sin($x/8) + cos($y/6)); $green = 96*(sin($x/16) - cos($y/12)); $blue = $red*$green; //file my pictures\_equation art\(sin+cos)x(sin-cos) big.bmp //this code is executed for each pixel: $red = 128*(sin($x/18) + cos($y/13.5)); $green = 96*(sin($x/36) - cos($y/27)); $blue = $red*$green; //file my pictures\_equation art\(sin+cos)x(sin-cos) twist.bmp //this code is executed for each pixel: $red = 128*(sin($x/12) + cos($x/9)); $green = 96*(sin($y/24) - cos($y/18)); $blue = $red*$green; //file my pictures\_equation art\(x-y)x(x+y).bmp //this code is executed for each pixel: $red = ($x - $y)*9/6; $green = ($x + $y)*9/2.5; $blue = $red*$green; //file my pictures\_equation art\(x-y),(x+y),0.bmp //this code is executed for each pixel: $red = ($x - $y)*9/6; $green = ($x + $y)*9/2.5; $blue = 0; //file my pictures\_equation art\(x-y)-(x+y).bmp //this code is executed for each pixel: $red = ($x - $y)*9/6; $green = ($x + $y)*9/2.5; $blue = $red - $green; //file my pictures\_equation art\(x-y)-(x+y) bal.bmp //this code is executed for each pixel: $red = ($x - $y)*9/4; $green = ($x + $y)*9/4; $blue = $red - $green; //file my pictures\_equation art\(x-y)+(x+y) bal.bmp //this code is executed for each pixel: $red = ($x - $y)*9/4; $green = ($x + $y)*9/4; $blue = $red + $green; //file my pictures\_equation art\4(x-y)-(x+y).bmp //this code is executed for each pixel: $red = ($x - $y)*9/2;

$green = ($x + $y)*9/8; $blue = $red - $green; //file my pictures\_equation art\sunset over the sea.bmp //this code is executed for each pixel: $red = ($x - $y)*9/3; $green = ($x + $y)*9/5; $blue = $red - $green + (sin($x) + cos($y))*1024*1024; //file - no picture saved //this code is executed for each pixel: $red = $x*sin($x)*9/3; $green = $y*(cos($y)*9/5; $blue = ($red + 1)*($green + 1); //--> parse error: syntax error, unexpected ';' in /mountedstorage/home17a/sub001/sc18673-hhlm/pheddles.com/eacoder/2.php on line 26 //file my pictures\_equation art\x+y,x-y,7x^2+7y^2.bmp //this code is executed for each pixel: $red = $x + $y; $green = $x - $y; $blue = 7*($x * $x + $y * $y); //file my pictures\_equation art\x+y,x-y,x^2+y^2.bmp //this code is executed for each pixel: $red = $x + $y; $green = $x - $y; $blue = $x * $x + $y * $y; //file my pictures\_equation art\x+y,x-y,7x^2+5y^2.bmp //this code is executed for each pixel: $red = $x + $y; $green = $x - $y; $blue = 7*$x*$x + 5*$y*$y; //file my pictures\_equation art\x+y,x-y,x^2o5+y^2o7.bmp //this code is executed for each pixel: $red = $x + $y; $green = $x - $y; $blue = $x*$x/5 + $y*$y/7; //file my pictures\_equation art\sqrt(x),sqrt(y),r-g.bmp //this code is executed for each pixel: $red = (abs($x))^(1/2); $green = (abs($y))^(1/2); $blue = $red - $green; //file my pictures\_equation art\sqrt(x)+sqrt(y),r,x-y.bmp //this code is executed for each pixel: $red = (abs($x))^(1/2)+(abs($y))^(1/2); $green = $red; $blue = $x - $y; //file my pictures\_equation art\sqrt(x),sqrt(y),x-y.bmp //this code is executed for each pixel: $red = (abs($x))^(1/2); $green = (abs($y))^(1/2); $blue = $x - $y;

//file my pictures\_equation art\128sqrt(sin(x)),64sqrt(sin(y)),r+g.bmp //this code is executed for each pixel: $red = 128*(sin($x))^(1/2); $green = 64*(sin($y))^(1/2); $blue = $red+$green; //file my pictures\_equation art\128sqrt(sin(x)),128sqrt(sin(y)),rxgo64.bmp //this code is executed for each pixel: $red = 128*(sin($x))^(1/2); $green = 128*(sin($y))^(1/2); $blue = $red*$green/64; //file my pictures\_equation art\128sqrt(sin(x)),256sqrt(sin(y)),rxgo128.bmp //this code is executed for each pixel: $red = 128*(sin($x))^(1/2); $green = 256*(sin($y))^(1/2); $blue = $red*$green/128; //file my pictures\_equation art\128sqrt(sin(x)),256sqrt(sin(y)),0.bmp //this code is executed for each pixel: $red = 128*(sin($x))^(1/2); $green = 256*(sin($y))^(1/2); $blue = 0; //file my pictures\_equation art\384sqrt(sin(x)),256sqrt(sin(y)),0.bmp //this code is executed for each pixel: $red = 384*(sin($x))^(1/2); $green = 256*(sin($y))^(1/2); $blue = 0; //file my pictures\_equation art\384sqrt(sin(xo128)),256sqrt(sin(yo128)),0.bmp //this code is executed for each pixel: $red = 384*(sin($x/128))^(1/2); $green = 256*(sin($y/128))^(1/2); $blue = 0; //file my pictures\_equation art\384sqrt(sin(xo128)),384sqrt(sin(yo128)),0.bmp //this code is executed for each pixel: $red = 384*(sin($x/128))^(1/2); $green = 384*(sin($y/128))^(1/2); $blue = 0; //file my pictures\_equation art\2sqrt(x)+sqrt(y),sqrt(x)-2sqrt(y),x-y.bmp //this code is executed for each pixel: $red = 2*(abs($x))^(1/2)+(abs($y))^(1/2); $green = (abs($x))^(1/2)-2*(abs($y))^(1/2); $blue = $x - $y; //file my pictures\_equation art\sum(x)+sum(y),sum(x)-sum(y),prod(x)+prod(y).bmp // actually no picture was produced // every time i tried to execute prodmod, i got an "ie cannot display the webpage" error. //this setup code is executed once only: function sum($n) { return $n/2 * ($n + 1); }

function prodmod($n) { if ($n<>1) return ($n * prodmod($n-1)) % 256; else return 1; } //this loop code is executed for each pixel: //this code is executed for each pixel. example loop code: $red = sum($x)+sum($y); $green = sum($x)-sum($y); $blue = prodmod($x)+prodmod($y); //file my pictures\_equation art\sum(x)+sum(y),sum(x)-sum(y),prod(x)+prod(y).bmp //this setup code is executed once only: function sum($n) { return $n/2 * ($n + 1); } function prodmod($n) { if ($n<>1) return ($n * prodmod($n-1)) % 256; else return 1; } //this loop code is executed for each pixel: //this code is executed for each pixel. example loop code: $red = sum($x)+sum($y); $green = sum($x)-sum($y); $blue = prodmod($x)+prodmod($y); //file my pictures\_equation art\sum(x)+sum(y),sum(x)-sum(y),fact(x)+fact(y).bmp //this setup code is executed once only: function sum($n) { return $n/2 * ($n + 1); } function fact($x) { $factorial = 1; for ($i=2; $i < $x; $i++) { $factorial = $factorial*$i; } return $factorial; } //this loop code is executed for each pixel: $red = sum($x)+sum($y); $green = sum($x)-sum($y); $blue = fact($x)+fact($y); //file my pictures\_equation art\sum(x)xfact(y),fact(x)xsum(y),3(x^2+y^2).bmp //this setup code is executed once only: function sum($n) { return $n/2 * ($n + 1);

} function fact($x) { $factorial = 1; for ($i=2; $i < $x; $i++) { $factorial = $factorial*$i; } return $factorial; } //this loop code is executed for each pixel: $red = sum($x)*fact($y); $green = fact($x)*sum($y); $blue = 3*($x^2+$y^2); //file my pictures\_equation art\sum(x)xfact(y),fact(x)xsum(y),3(x^3+y^3).bmp //this setup code is executed once only: function sum($n) { return $n/2 * ($n + 1); } function fact($x) { $factorial = 1; for ($i=2; $i < $x; $i++) { $factorial = $factorial*$i; } return $factorial; } //this loop code is executed for each pixel: $red = sum($x)*fact($y); $green = fact($x)*sum($y); $blue = 3*($x^3+$y^3);

Related Documents

Ea Loops
November 2019 27
Loops
May 2020 15
Loops
June 2020 13
Ea
November 2019 40
Creating Loops
May 2020 14
Ch3 Loops
April 2020 11