Question: ( a ) The function c o s ( x ) can be approximated by the following series c o s ( x ) =
a The function can be approximated by the following series
cdots
Using a loop, create line plots of the series expansion of against xin using dots, on the same set of axes. Annotate your plot with axis labels, a title and add a legend with appropriate labels.
b The Sierpinski triangle is a fractal that can be generated using the following steps: starting at a point with coordinates
Randomly select one of three vertex points of an equilateral triangle: bottomleft vertex bottom right vertex or top vertex
Move the point half the distance from its current position to the selected vertex.
Plot the new position.
Repeat these steps a given number of times.
Use this method to produce a plot of the Sierpinski triangle using points with a point marker of size Colour the points red if the bottom left vertex was selected, blue if the bottom right vertex was selected or red if the top vertex was selected.
ci Take a selfie and read in the image file using the imread matplotlib or MATLAB function if you don't want to use a selfie you can using the image kitten.jpg on the Moodle area for this module instead Determine the size of the image in pixels and plot the image.
ii An image can be converted to sepia tone using the following conversion
min
min
min
where and are the colour values for the original image and and are the colour values for the sepia toned image. Apply this conversion to your image and plot it
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
