Wednesday, February 13, 2013

Project 1



I did this to show more of me. I am not a very flashy person, I like nice and simple so this design is nothing special i just wanted something simple that had a nice soft color to it and nice symmetry.


<!DOCTYPE HTML>
<html>
<head>
<script>
window.onload = function() {
var canvas = document.getElementById("myCanvas");
var context = canvas.getContext("2d");

////////////////////////////////////// start below this line ˇˇˇˇˇˇˇˇˇˇ
//Rectangle Variables
var x = 0;
var y = 0;
var width = 800;
var height = 600;


//Rectangle
context.beginPath();
context.rect(x, y, width, height);
context.lineWidth = 20;
context.fillStyle = 'rgb(200, 200, 255)';
context.fill();
context.strokeStyle = 'rgb(200, 255, 200)';
context.stroke();

//Bezier Variables
var x = 450;
var y = 160;
var controlX1 = 350
var controlY1 = 15
var controlX2 = 155
var controlY2 = 160
var endX = 350;
var endY = 325
//Quadratic Variables
var controlX3 = 425;
var controlY3 = 385;
var endX3 = 450;
var endY3 = 480;
//Quadratic Variables
var controlX4 = 475;
var controlY4 = 375;
var endX4 = 550;
var endY4 = 325;
//Bezier Variables
var controlX5 = 755;
var controlY5 =180;
var controlX6 =550;
var controlY6 = 15;
var endX5 = x;
var endY5 = y;

//Bezier Curve
context.beginPath();
context.moveTo(x, y);
context.lineWidth = 10;
context.bezierCurveTo(controlX1, controlY1, controlX2, controlY2, endX, endY);
context.quadraticCurveTo(controlX3, controlY3, endX3, endY3);
context.quadraticCurveTo(controlX4, controlY4, endX4, endY4);
context.bezierCurveTo(controlX5, controlY5, controlX6, controlY6, endX5, endY5);
context.closePath();
context.fillStyle = 'rgb(255, 155, 155)';
context.fill();
context.strokeStyle = 'rgb(255, 100, 100)';
context.stroke();


//Rectangle
context.beginPath();
context.rect(650, 40, 100, 100);
context.fillStyle = 'rgb(200, 200, 255)';
context.fill();
context.stroke();

context.beginPath();
context.lineWidth = 10;
context.arc(700, 90, 20, 0 , 2 * Math.PI, false);
context.fillStyle = 'rgb(255, 100, 100)';
context.fill();
context.strokeStyle = 'rgb(255, 100, 100)';
context.stroke();

//Rectangle
context.beginPath();
context.rect(80, 40, 100, 100);
context.fillStyle = 'rgb(255, 200, 200)';
context.fill();
context.stroke();



//Circle Variables
var x = 130
var y = 90
var radius = 20

// Circle
context.beginPath();
context.lineWidth = 10;
context.arc(x, y, radius, 0 , 2 * Math.PI, false);
context.fillStyle = 'rgb(200, 255, 200)';
context.fill();
context.strokeStyle = 'rgb(200, 255, 200)';
context.stroke();

//Line
context.beginPath();
context.moveTo(400, 400);
context.lineTo(200, 300);
context.lineCap = 'round';
context.stroke();

//Line
context.beginPath();
context.moveTo(400,400);
context.lineTo(400, 550);
context.lineCap = 'round';
context.stroke();

//Green Circle 9 Variables
var x9 = 140
var y9 = 500
var radius9 = 60

//GreenCircle 9
context.beginPath();
context.lineWidth = 10;
context.arc(x9, y9, radius9, 0 , 2 * Math.PI, false);
context.fillStyle = 'rgb(200, 255, 200)';
context.fill();
context.strokeStyle = 'rgb(255, 100, 100)';
context.stroke();

//Green Circle 12 Variables
var x12 = 700
var y12 = 500
var radius12 = 60

//Green Circle 12
context.beginPath();
context.lineWidth = 10;
context.arc(x12, y12, radius12, 0 , 2 * Math.PI, false);
context.fillStyle = 'rgb(255, 100, 100)';
context.fill();
context.strokeStyle = 'rgb(200, 255, 200)';
context.stroke();


//Line
context.beginPath();
context.moveTo(500, 400);
context.lineTo(500,550);
context.lineCap = 'round';
context.stroke();

//Line
context.beginPath();
context.moveTo(500,400);
context.lineTo(710,315);
context.lineCap = 'round';
context.stroke();








////////////////////////////////////// end above this line ˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆ

};

</script>
</head>
<body>
<canvas id="myCanvas" width="800" height="600"></canvas>
</body>
</html>

No comments:

Post a Comment