Skip to main content

First Homework

MY CODE:

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

var x1 =50;
var y1 =50;
var x2 =750;
var y2 =500;
var rectx1 = 50;
var recty1 = 100;
var rectwidth1 = 300;
var rectheight1 = 250;
var grd = context.createLinearGradient(rectx1, recty1, rectx1+rectwidth1, recty1+rectheight1);
var rectx2  = 300;
var recty2 = 300;
var rectwidth2 = 200;
var rectheight2 = 300;
var x3= 300;
var y3= 60;
var x4= 100;
var y4= 500;
var rectx3  = 555;
var recty3 = 100;
var rectwidth3 = 150;
var rectheight3 = 150;
var x5= 600;
var y5= 150;
var x6= 550;
var y6= 500;

//orange line
context.beginPath();
  context.moveTo(x3,y4);
  context.lineTo(x1,y6);
  context.lineWidth = 10;
  context.strokeStyle = 'rgb(255,165,0)';
  context.lineCap = 'butt';
  context.stroke();

//light blue line
  context.beginPath();
  context.moveTo(x1,y1);
  context.lineTo(x2,y2);
  context.lineWidth = 5;
  context.strokeStyle = 'rgb(0,250,250)';
  context.lineCap = 'round';
  context.stroke();

//red and yellow rectangle2
  context.beginPath();
context.rect(rectx3,recty1,rectwidth2,rectheight2);
context.lineWidth = 15;
context.strokeStyle = 'rgb(250,250,100)';
context.fillStyle = 'red';
  context.fill();
context.stroke();

//light blue line
  context.beginPath();
  context.moveTo(x1,y5);
  context.lineTo(x2,y3);
  context.lineWidth = 10;
  context.strokeStyle = 'rgb(100,200,250)';
  context.lineCap = 'round';
  context.stroke();

// rectangle 1
  context.beginPath();
context.rect(rectx1,recty1,rectwidth1,rectheight1);
context.lineWidth = 10;
context.strokeStyle = 'rgb(235,280,0)';
// starting gradient color
        grd.addColorStop(0, "rgb(235,281,0)");
        //intermediate color
        grd.addColorStop(0.5, "rgb(193,24,0)");
        // ending color
        grd.addColorStop(1, "rgb(255,100,0)");
context.fillStyle = grd;
context.fill();
context.stroke();


//Simple V line in purple

var x= 50;
var y = 100;
var x1 = 300;
var y1 = 450;
var x2 = 400;
var y2 = 300
var x3 = 500;
var y3 = 450
var x4 = 700;
var y4 = 100
//comment
context.beginPath();
context.moveTo(x, y);
context.lineTo(x1, y1); // move to starting coordinates
context.lineTo(x2, y2); // draw line to following point
context.lineTo(x3, y3)
context.lineTo(x4, y4)
context.lineCap = 'round';
context.lineWidth = 30;// declare the width in pixels of the line
context.strokeStyle = 'rgb(100,0,205)'; // or "#FF0000" // declare the line color in rgb or hexadecimal values

context.stroke();


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

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

Comments

Popular posts from this blog

FINAL PORTFOLIO

FMX210 FINAL PORTFOLIO ARTIST STATEMENT:         FMX210 has been a complex yet rewarding class over this past fall semester. This course has taught me the logistics of countless Adobe programs which have bettered my digital media skills. Attached is my portfolio which includes each final project from each program we worked with. My portfolio is themed as red and black with the font Mercurius MT std bold to better the overall composition. Each page is a different project and is done in chronological order from the first unit through the last. I aimed to use InDesign to successfully create a visually appealing portfolio while displaying each of my projects on the consecutive pages, along with a table of contents and an about me page.          My portfolio is crafted in such a way that is visually appealing through the use of color choices, creative fonts, and a simple approach to highlight each project. The theme I chose to create wa...

GET TO KNOW ME

My name is Emma Lynch and I am originally from Maryland but currently live in South Carolina. I have been coming to Florida for most of my life for vacation as well as to visit family, so I am excited to spend the next few years here at the University of Tampa. My hobbies include trying new foods, photography, and traveling, which typically consumes most of my free time. I am extremely passionate about traveling and hope to live abroad in the future. My favorite places to travel are Italy and Alberta, Canada. I am a Public Relations and Advertising major and aim to pursue a career in Advertising from a creative perspective in the Northeast. I have always been interested in different art forms and photography but am excited to further my knowledge in digital media. Most of the art I am familiar with ties back to photography, so I am excited to use that basis of understanding to influence my work in this class. My initial feelings on the course are that it will be relatively diffic...

BW to Color Portrait

    BW TO COLOR PHOTOSHOP PORTRAITS Artist Statement:          The six portraits I have created are photoshop self portraits that show separate ways that color can be shown, based off of the same base color. Each portrait shares the same pink/purple color which is highlighted differently in each image. Some images include the base color on the hair, face, lips, etc. The base color ties to other colors through triad, monochromatic, complementary, analogous, shades, and compound colors.          These compositions are relevant in showing how colors vary on the color wheel and how each color relates to, but is different from the base color. Each composition is crafted in a slightly different manner than the next but shows how each and every color used correlates in a visually appealing way. My logo tag brush is also included which makes these portraits unique from other projects as my logo represents myself and is embedd...