MAS115: SEMESTER 1 MINI-PROJECT
POLYGON AREAS
PROF PAUL BLACKWELL AND MR PETER DERLIEN
The basic task
The signed area A of a simple polygon with vertices (x1, y1), . . . ,(xn, yn)
can be calculated1
where xn+1 := x1, yn+1 := y1.
Your task is to write a function in R that, given the co-ordinates of the vertices
of a polygon, plots it (if required, as specified by an optional argument)
and calculates its area.
You should verify the value obtained for at least one polygon for which
you can calculate the area by some other method, either mathematically or
numerically.
Extending the project
In addition to the basic task, you should investigate a way of extending the
project further, either computationally or mathematically. You might:
investigate other approaches for calculating a polygon’s area;
look at more complicated cases e.g. polygons with holes;
look at the results for a particular ‘family’ of polygons e.g. regular
polygons or circular polygons;
explore connections between the formula given above and any other
mathematical ideas;
extend in any other way you can think of.
Do as much as you can! What you choose is up to you.
The project write-up
You should write up your investigations in a R markdown report of around
4 pages, and strictly no more than 6, using the template provided. The title
should be ‘MAS115: Semester 2 Mini-project’, and the author should be
your registration number. Please do not include your name.
You should include sufficient discussion of your R code to explain how it
works, but a line-by-line description of the code is not necessary. The code
1http://mathworld.wolfram.com/PolygonArea.html
1
2 PROF PAUL BLACKWELL AND MR PETER DERLIEN
should be written with meaningful variable names and good use of comments
to aid readability.
Your project will be peer-assessed. This means that it will be marked by
your fellow students. You will receive a mark out of 8 for the project itself,
and a mark out of 2 for your involvement in the peer-assessment. Overall,
the project counts as 10% of your final module score.
Your write-up must not be longer than 6 pages; if this is problematic, contact
Prof Blackwell. You will submit the project (PDF, plus .Rmd file) online
via the course website. The deadline for uploading the projects is 2pm on
Tuesday 26th March (Week 8). More details will follow.
Note. The peer assessment session will be in the standard MAS115 lecture
slot on Tuesday 2nd April (Week 9). Please make sure that you attend.
Late work, plagiarism and yellow stickers
Late work. Due to the peer-assessment of this work, it is important that
work is submitted on time. Any work submitted after the deadline may be
given a mark of zero. Anybody with circumstances affecting their ability
to hand in the work must contact Prof Blackwell in advance of the hand-in
date.
Plagiarism. The mini-project is an individual assignment and must be your
own work. You must not copy work from other students. Formally, this is a
‘non-invigilated examination’; University rules about the use of unfair means
apply. You can ask for help on the discussion board, but must not ask for
help on any other internet discussion forum, or email list or anything of a
similar nature. Where we judge that plagiarism has occurred or two pieces
of work are too similar, we may award zero for those assignments.
Yellow stickers. If you have been assessed by the Disability and Dyslexia
Support Service (DDSS) and have been given yellow stickers to put on your
work, please let Prof Blackwell know so that we can attach a virtual sticker
to your mini-project.
Advice for a good project
Make use of the discussion board. We may post hints on there.
Look over the lecture/lab notes on how to go about writing a program
and how to improve the chances of finding bugs easily.
Try to make your R code as tidy as possible, with comments where
appropriate; after all, it will be read by your fellow students.
Make your write-up as readable as possible by following the advice in
the presentation lectures and learning from your homework feedback.
We hope this mini-project will help you to consolidate what you have learnt
so far and that you enjoy doing it.
版权所有:编程辅导网 2021 All Rights Reserved 联系方式:QQ:99515681 微信:codinghelp 电子信箱:99515681@qq.com
免责声明:本站部分内容从网络整理而来,只供参考!如有版权问题可联系本站删除。