码迷,mamicode.com
首页 > 编程语言 > 详细

代写HTML5 、Javascript、WEB作业、代写JSP、ASP、Asp.net作业A simple animation Towers of Hanoi

时间:2018-04-18 23:37:27      阅读:245      评论:0      收藏:0      [点我收藏+]

标签:ica   环境搭建   智能   crete   views   sql   oss   tor   and   

代写HTML5 、Javascript、WEB作业A simple animation Towers of Hanoi
Assignment 5: The Easy Animator: Part 1 10/19/17, 5)15 PM
Assignment 5: The Easy Animator: Part 1
Due: Fri 10/20 at 8:59pm; self-evaluation due Sat 10/21 at 8:59pm
This assignment is to be completed solo. Subsequent assignments will be done in pairs. Start looking for
partners now, and sign up on the sheet that will be circulated in class. You will not be able to submit
subsequent assignments until we create a team for you on the handin server.
1 Context
A picture is worth a thousand words, and moving pictures are worth many more.
Pictures and moving pictures (animations) can be used to succinctly and effectively illustrate many things.
For example, a stationary histogram visually depicts the distribution of some data points. A histogram with
moving bar heights visually depicts music (e.g. a music equalizer). Animating graphs can be used to show
useful trends in data much more effectively than presenting the same reasoning using raw numbers and
text (see here for a visualization of the trend of life expectancy with GDP over time using only circles). A
fireworks display is simply a bunch of points moving in certain ways. The Towers of Hanoi problem can be
illustrated more effectively as an animation solving it, rather than a description of steps of an algorithm.
Many algorithms can be similarly visualized in a way that illustrates how they work more succinctly than
descriptions or code. Here are some examples of such visualizations:
A simple animation Towers of Hanoi
Assignment 5: The Easy Animator: Part 1 10/19/17, 5)15 PM
The Night Sky Big Bang and Crunch
One of the more frustrating experiences is knowing what to visualize, having a plan for how to visualize it
using simple shapes and animations, but not being able to quickly create such an animation. Creating
animations takes time, and one must learn the necessary tools that are often difficult to master (e.g., using
Flash, or creating Web animations using HTML5 and Javascript, etc.). Such tools are often also specialpurpose.
For example, the statistical package R comes with charting capabilities, but code must be written
in R and data must be formatted accordingly. Similarly creating animations is not difficult in Powerpoint,
but the tool is embedded in Powerpoint and one cannot use it to create other kinds of animation.
In the next few assignments, we will build an application that helps to create simple but effective 2D
animations from shapes (such as the above examples). One of our main goals will be to create a separation
between how an algorithm or phenomenon is described and how it is drawn on the screen. This separation
will allow us to create an application that will draw an animation according to how it is described in text,
without being tied to how the description was produced. This process is illustrated below:
Assignment 5: The Easy Animator: Part 1 10/19/17, 5)15 PM
In other words, our application will show animations generated manually or using any other program,
unrelated to our application.
1.1 Description of animation
In informal language, here is an example description of the animation for the "Simple Animation" example
above:
Create red rectangle R with corner at (200,200), width 50 and height 100
Create blue oval C with center at (500,100), radius 60 and 30
R appears at time t=1 and disappears at time t=100
C appears at time t=6 and disappears at time t=100
R moves from (200,200) to (300,300) from time t=10 to t=50
C moves from (500,100) to (500,400) from time t=20 to t=70
C changes from blue to green from time t=50 to t=80
R moves from (300,300) to (200,200) from time t=70 to t=100
R changes width from 50 to 25 from time t=51 to t=70
As you can see, we describe the animation in terms of what should happen when according to a timeline
when the animation plays. This is called “declarative animation.” Imagine how you would describe
informally the above Towers of Hanoi animation in this way.
We use a time reference for each step in the animation. This time reference is usually unitless, which helps
us in describing animation without mentioning its absolute speed. Further, the animation must adhere to
certain constraints. For example, one cannot have two incompatible moves for the same shape during
overlapping time intervals.
Our application may then use such a description to:
"Show" the animation in various ways. For example interactively play it, describe it on a time line, or
even export the animation as a Flash movie.
Allow a user to edit it or change speed.
Assignment 5: The Easy Animator: Part 1 10/19/17, 5)15 PM
https://course.ccs.neu.edu/cs3500/hw_05_assignment.html Page 4 of 7
Produce a verbose description for what the animation will look like (for the visually impaired).
Other possibilities...
2 The Easy Animator Application
We will build this application progressively using the classic Model-View-Controller architecture. In this
assignment we will focus on the model of this application. There is no starter code for this assignment: you
must use the above description and broad ideas to design the interface and implementation of the model.
You are deliberately not being told about the fine details of what the controller and views will need or do.
You are also not being told about how exactly the application will receive a description from the user (it
would not be relevant to the model).
Here are some aspects to think about:
What does the model represent?
The model should be able to support various kinds of 2D shapes, although currently we have described
only rectangles and ovals.
The model should support adding various kinds of animations to shapes, such as moving, changing
color, changing shape, etc.
Remember to think from not only the implementor’s perspective (the person who is implementing the
model) but also the client perspective (the person or class who is using the model).
2.1 How is the animation seen?
One way the application may show the animation is by actually playing it, similar to the moving images
above. Another way would be to produce a text description of the animation. Here is what a description
might look like:
Shapes:
Name: R
Type: rectangle
Lower-left corner: (200.0,200.0), Width: 50.0, Height: 100.0, Color: (1.0,0.0,0.0)
Appears at t=1
Disappears at t=100
Name: C
Type: oval
Center: (500.0,100.0), X radius: 60.0, Y radius: 30.0, Color: (0.0,0.0,1.0)
Appears at t=6
Disappears at t=100
Shape R moves from (200.0,200.0) to (300.0,300.0) from t=10 to t=50
Shape C moves from (500.0,100.0) to (500.0,400.0) from t=20 to t=70
Shape C changes color from (0.0,0.0,1.0) to (0.0,1.0,0.0) from t=50 to t=80
Shape R scales from Width: 50.0, Height: 100.0 to Width: 25.0, Height: 100.0 from t=51 to t=70
Shape R moves from (300.0,300.0) to (200.0,200.0) from t=70 to t=100
In short, it first describes the shapes that are part of the animation and their details. Next it describes how
these shapes will move as the animation proceeds from start to finish. You may think of this output as a
“read-back” of the animation, perhaps for devices that cannot show the animation, or for users who are
visually impaired who have screen readers.
3 What to do
1. Design a model to represent an animation. This may consist of one or more interfaces, abstract
classes, concrete classes, enums, etc. Consider carefully what operations it should support, what
invariants it assumes, etc.
2. Think about and include in the model interface operations that you think are relevant and the
Assignment 5: The Easy Animator: Part 1 10/19/17, 5)15 PM
model should offer.
3. Document your model well. Be sure to document clearly what each method does, what purpose
it serves and why it belongs in the model.
4. Implement your model. Only if you do not know how to implement the method because it
requires details of animation not provided yet, you may leave the method body blank for now.
5. Test your model.
6. Implement the text output rendering of your model according to the format given in Section 2.1,
so we can visualize your data. We will not be autograding this assignment, but you’d do well to
emulate the output above as precisely as possible, as we will be checking it (on models constructed
from input files we provide) on future assignments.
4 What to submit
Submit any files created in this assignment, along with a text README file explaining your design. Your
README file should give the graders an overview of what the purposes are for every class, interface, etc.
that you include in your model, so that they can quickly get a high-level overview of your code. It does not
replace the need for proper Javadoc!
5 Grading standards
For this assignment, you will be graded on
the design of your model interface(s), in terms of clarity, flexibility, and how plausibly it will support
needed functionality;
the appropriateness of your representation choices for the data, and the adequacy of any documented
class invariants (please comment on why you chose the representation you did in the code);
the forward thinking in your design, in terms of its flexibility, use of abstraction, etc.
the correctness and style of your implementation, and
the comprehensiveness and correctness of your test coverage.
6 Submission
http://www.6daixie.com/contents/19/1284.html

本团队核心人员组成主要包括硅谷工程师、BAT一线工程师,国内Top5硕士、博士生,精通德英语!我们主要业务范围是代做编程大作业、课程设计等等。

 

我们的方向领域:window编程 数值算法 AI人工智能 金融统计 计量分析 大数据 网络编程 WEB编程 通讯编程 游戏编程多媒体linux 外挂编程 程序API图像处理 嵌入式/单片机 数据库编程 控制台 进程与线程 网络安全  汇编语言 硬件编程 软件设计 工程标准规等。其中代写代做编程语言或工具包括但不限于以下范围:

C/C++/C#代写

Java代写

IT代写

Python代写

辅导编程作业

Matlab代写

Haskell代写

Processing代写

Linux环境搭建

Rust代写

Data Structure Assginment 数据结构代写

MIPS代写

Machine Learning 作业 代写

Oracle/SQL/PostgreSQL/Pig 数据库代写/代做/辅导

Web开发、网站开发、网站作业

ASP.NET网站开发

Finance Insurace Statistics统计、回归、迭代

Prolog代写

Computer Computational method代做

 

因为专业,所以值得信赖。如有需要,请加QQ:99515681 或邮箱:99515681@qq.com

微信:codinghelp

代写HTML5 、Javascript、WEB作业、代写JSP、ASP、Asp.net作业A simple animation Towers of Hanoi

标签:ica   环境搭建   智能   crete   views   sql   oss   tor   and   

原文地址:https://www.cnblogs.com/codinghelp168/p/8878099.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!