Andy Pan, Andy Nien, Yun-Lin Ho
A team assignment of Math Software 2015 Spring.
Written by Team 04.
rotate(x, y, theta, a, b)
: Rotate point(s)(x, y)
with respect to point(a,b)
by the angle oftheta
ccw-ly.drawRectangle(x1, x2, x3, color)
: Calculatex4
and use the four points to draw a rectangle. Actually it can be used to draw parallelogram.drawRectangleXY(x1, y1, x2, y2, color)
: A helper function to draw rectangles by a diagdonal(x1, y1) -- (x2, y2)
.drawCircle(O, r, color)
: Draw a circle with centerO
and radiusr
.drawSemiCircle(O, P, color)
: Draw a hemicircle with centerO
and starting sideOP
.drawStar(O, P, color)
: Draw a star with centerO
, usingP
as the first edge.drawStar12(O, P, color)
: Almost the same as above but this has 12 edges.circleArrange(O, P, count)
: Output a list of points separated on a circle equally, usingP
as starting point. Returncount
points as acount * 2
matrix.cc(hex)
: (Internal) Converthex
into a MATLAB RGB vector.
All colors specified in parameter color
are 6-digits HEX colors like #ABCDEF
and they are internally passed into cc
function, so there is no cc
occurrence in main
.
- France
- Iceland
England(should be United Kingdom)- the USA
- Cook Islands
- China
- Taiwan
- Singapore
- Korea