Develop a simple canvas animation of your own design

Assignment Help Computer Networking
Reference no: EM131243966

Assignment: HTML 5 Canvas, JavaScript and Theory Questions

Assignment Brief:

Develop HTML 5 and JavaScript code to re-create the following vector graphics sequence using appropriate HTML 5 Canvas methods such as:

- beginPath()
- closePath()
- rect()
- arc()
- stroke()
- moveTo()
- lineTo()
- fill()
- ...

Using these methods you will need to draw lines, rectangles, circles (complete arcs) at appropriate co-ordinates using both fillStyle and strokeStyle to reproduce the diagram below.

Note: that when drawing the vector shapes you should use different coordinate variables (var variableName; in JavaScript) to make it easier to keep track of where all the different rectangles, lines and arcs should be placed. For example, it would be wise to keep track of the size of the square with a JavaScript variable such as:

Part A: HTML 5 Canvas Drawing 20%

1. Reproduce the diagram above by defining a canvas object with a width and height of 600 pixels and following the instructions outlined below. In each step be sure to introduce new variables to keep track of things like position, size, and how different objects are offset (differ) from each other.

2. Draw a light green square using code similar to that in Figure 2. The square should have a side length of 300 pixels and should be drawn so that the square is drawn at the center of the canvas as shown in Figure 1.

3. Draw the line objects using the lineTo(), moveTo() and stroke() canvas methods to draw line strokes which create a diamond shape around the canvas. Set the stroke style to black as in Figure 1. The diamond should have four lines on the outside, it should also have lines which converge in the middle (which will later be covered by the center green circle).

4. Fill a complete light green arc (circle) such that the circle is drawn at the center of the canvas with a size less than the width of the rectangle, as shown in Figure 1. Draw a red coloured arc (circle) around the outside of the diamond, as shown in Figure 1. The radius should of the circle should be canvas.width / 2.8

5. Draw filled circles positioned using trigonemtry at diagonal corners of the red circle at the angles of 45°,135°, 225° and 315°. You will be able to calculate the offset (difference) from the center using cos 45° × radius to find the x offset and sin 45° × radius to find the offset for the y position. Remember to use radians!

Part B: Challenge Questions

1. Develop a simple canvas animation of your own design. For example, you could rotate the four circles around the large outside red circle using trigonometry (sin and cos) to locate the x,y coordinates of the circles at different angles. Check that your animation is of an appropriate difficulty level with your lecturer before submitting the assignment.

2. Use Canvas EventListeners to enable user interaction. For example, a user could spin the canvas image using their mouse, buttons and mousedown / mousemove events.

Submission Details and Marking Criteria:

This is an individual assignment. You must work on the individual tasks by yourself and all work on these tasks must be your own. Your final submission should contain the following:
- All the code required to view your animation (your .html file)

Verified Expert

This assignment deals with the HTML5 concept. This assignment deals with the canvas and the graphic method and also uses the event listener. Canvas.html : Simple Use of canvas : Problem A canvasAnimation_A.html : deals with the animation part of Problem B canvas_EventListener.html: deals with the event listener part of Problem B

Reference no: EM131243966

Questions Cloud

Evaluate the financial status of the company : Evaluate the financial status of the company in terms of its liquidity, solvency, structure and profitability. Use your comprehensive analysis to decide whether it would be a wise decision to invest in the company or not
How will this transaction affect the companys balance sheet : How will this transaction affect the Company's income statementeach year from 2016 through 2021? What lines and sub-totals / totals that will be affected and by how much?
What is a composition of functions : 1. What is a composition of functions? What is the difference between the composition and the product of two functions? 2. Write a short paragraph about the number e.
Provide analysis of unexpected events using project schedule : In a separate Word document, provide an analysis of unexpected events using the Project Schedule Template below (the unexpected events are located in Tab 2 of the document).
Develop a simple canvas animation of your own design : ISCG4500 - Introduction to Information Technology - Draw a light green square using code similar to that in Figure 2. The square should have a side length of 300 pixels and should be drawn so that the square is drawn at the center of the canvas as ..
Calculate the value : Given x=2.6*10^4 and y=5.0*10^-8 calculate the value of w=x*y. Given your answer in the form a*10^k where 1
Identify all of information you would need to effectively : Identify all of the information you would need to effectively manage the three goals above. Identify the challenges and potential issues related to implementing the three goals above. Develop recommendations for strategies to address these challenges..
Joining the midpoints of the four sides : Let ABCD be a quadrilateral. Show that the figure formed by joining the midpoints of the four sides is a parallelogram.
How does it differ from an investment demand curve : What is an investment schedule and how does it differ from an investment demand curve?

Reviews

Write a Review

Computer Networking Questions & Answers

  Networking and types of networking

This assignment explains the networking features, different kinds of networks and also how they are arranged.

  National and Global economic environment and ICICI Bank

While working in an economy, it has a separate identity but cannot operate insolently.

  Ssh or openssh server services

Write about SSH or OpenSSH server services discussion questions

  Network simulation

Network simulation on Hierarchical Network Rerouting against wormhole attacks

  Small internet works

Prepare a network simulation

  Solidify the concepts of client/server computing

One-way to solidify the concepts of client/server computing and interprocess communication is to develop the requirements for a computer game which plays "Rock, Paper, Scissors" using these techniques.

  Identify the various costs associated with the deployment

Identify the various costs associated with the deployment, operation and maintenance of a mobile-access system. Identify the benefits to the various categories of user, arising from the addition of a mobile-access facility.

  Describe how the modern view of customer service

Describe how the greater reach of telecommunication networks today affects the security of resources which an organisation provides for its employees and customers.

  Technology in improving the relationship building process

Discuss the role of Technology in improving the relationship building process Do you think that the setting of a PR department may be helpful for the ISP provider? Why?

  Remote access networks and vpns

safekeeping posture of enterprise (venture) wired and wireless LANs (WLANs), steps listed in OWASP, Securing User Services, IPV4 ip address, IPV6 address format, V4 address, VPN, Deploying Voice over IP, Remote Management of Applications and Ser..

  Dns

problems of IPV, DNS server software, TCP SYN attack, Ping of Death, Land attack, Teardrop attack, Smurf attack, Fraggle attack

  Outline the difference between an intranet and an extranet

Outline the difference between an intranet and an extranet A programmer is trying to produce an applet with the display shown in Figure 1 below such that whenever one of the checkboxes is selected the label changes to indicate correctly what has..

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd