3. You will recall from lecture notes that the equation for arc length is dr dt....
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
3. You will recall from lecture notes that the equation for arc length is dr dt. Of course, computers cannot handle infinitesimals so one method to caleulating the are length is to break the arc/curve into small chunks of interval ôt which take the place of dt. The integral then becomes the sum over each of these small intervals. That is, Nist 1=Er(ti+1) - r(t,)|. i=1 where ốt = t;41 - ti, t = a, tN = b and Nint is the number of desired straight line intervals that are desired to approximate the arc/curve. Using this computational method, a code that may be used to approximate the arc length of curve C given in Question 3(a) is the following SInitialiae the discretination of the curve a - 0: Stree paranetor atart b = 1 free paranster end Nint = 100, inunber of intervals along curvo Npoints - Nint + 1i inunber of points along curve tvals - linspace (a,b, Npoints); tvalues of the free paraneter along the curve points p - zeros (Npoints, 3): Bsince this curve in in 3D we need 3 coords (x y and z) for each point in p. 2- toet a funetion to eanily caleulate the point coordinatea 10- t_to coord 8 (t) [t, t2, t-31 11 12 Sdeternina all the pointe in the curve from tmin to tmax 13- for i = l1Npointa 14- Pli, 1) -t_to_coord (tvals (i)) 15- end 16 17 plot to inspect the curve looka right 18 plot3 (p(:,1).p(:,2),p(:,3)) 19 20 Sinitialise the interval distances 21 - intervaldists zeron (Nint, 1) 22 23 calculate all the interval distancen 24 - Bfor i - 1:Nint intervaldista (1) - FINISH THIS LINE 25- 26- end 27 curvelength = sun (intervaldists) 28- (a) Finish the missing line 25. (b) Change this code to evaluate the 2D arc length of a curve known as an inverted cycloid between the points (0,0) and (T,2). The curve is given parametrically as r(t) = t - sin(t). y(t) = 1- cos(t) Note: You do not need to upload your full code, just write out the all of the changed lines of codes and the lines from the previous code they refer to. An answer which is stated without indicating the code changes will be marked as incorrect. Note added: Previously, the given parametrisation was wrong r(t) = 2(t – sin(t)), y(t) = 2(1 - cos(t)). We have corrected this. We noticed that parametrization wasn't good because the end point was not on the eurve %3D [5 marks] 3. You will recall from lecture notes that the equation for arc length is dr dt. Of course, computers cannot handle infinitesimals so one method to caleulating the are length is to break the arc/curve into small chunks of interval ôt which take the place of dt. The integral then becomes the sum over each of these small intervals. That is, Nist 1=Er(ti+1) - r(t,)|. i=1 where ốt = t;41 - ti, t = a, tN = b and Nint is the number of desired straight line intervals that are desired to approximate the arc/curve. Using this computational method, a code that may be used to approximate the arc length of curve C given in Question 3(a) is the following SInitialiae the discretination of the curve a - 0: Stree paranetor atart b = 1 free paranster end Nint = 100, inunber of intervals along curvo Npoints - Nint + 1i inunber of points along curve tvals - linspace (a,b, Npoints); tvalues of the free paraneter along the curve points p - zeros (Npoints, 3): Bsince this curve in in 3D we need 3 coords (x y and z) for each point in p. 2- toet a funetion to eanily caleulate the point coordinatea 10- t_to coord 8 (t) [t, t2, t-31 11 12 Sdeternina all the pointe in the curve from tmin to tmax 13- for i = l1Npointa 14- Pli, 1) -t_to_coord (tvals (i)) 15- end 16 17 plot to inspect the curve looka right 18 plot3 (p(:,1).p(:,2),p(:,3)) 19 20 Sinitialise the interval distances 21 - intervaldists zeron (Nint, 1) 22 23 calculate all the interval distancen 24 - Bfor i - 1:Nint intervaldista (1) - FINISH THIS LINE 25- 26- end 27 curvelength = sun (intervaldists) 28- (a) Finish the missing line 25. (b) Change this code to evaluate the 2D arc length of a curve known as an inverted cycloid between the points (0,0) and (T,2). The curve is given parametrically as r(t) = t - sin(t). y(t) = 1- cos(t) Note: You do not need to upload your full code, just write out the all of the changed lines of codes and the lines from the previous code they refer to. An answer which is stated without indicating the code changes will be marked as incorrect. Note added: Previously, the given parametrisation was wrong r(t) = 2(t – sin(t)), y(t) = 2(1 - cos(t)). We have corrected this. We noticed that parametrization wasn't good because the end point was not on the eurve %3D [5 marks]
Expert Answer:
Answer rating: 100% (QA)
SCREENSHOTS OUTPUT MATLAB CODE a0 b1 Nint100 NpointsNint1 tvals linspaceabNpoint... View the full answer
Related Book For
Posted Date:
Students also viewed these programming questions
-
You will recall from Chapter 9 that Emily, Bev, and Doug had originally thought that the equipment upgrade that ABC decided to undertake could be paid for with cash in the bank. Unfortunately, there...
-
You will recall from Chapter 2 that Software Solutions Inc. had asked ABC to consider a proposal to provide it with approximately 500 hours a month of support services. After much discussion with her...
-
Suppose that the equation for an economys IS curve is Y = 13,500 - 300r. Large fluctuations in stock prices cause people to move funds in and out of assets included in M2, resulting in an unstable...
-
On December 31, 2021, Tiny Tims Tech, Inc. a private company who follows ASPE, leased a colour copier from Cory Copy Corporation at a price of $479,079. The lease agreement specifies annual payments...
-
Consider a policy of output and inflation targeting": the central bank announces numerical targets for both inflation and real GDP. What are the pros and cons of such a policy? No central bank has...
-
a. Derive Eq. 7.4-8. b. Derive Eq. 7.4-12. c. Obtain an expression for the fugacity of a pure species that obeys the van der Waals equation of state in terms of Z, B = P b/RT, and A = aP/(RT) 2...
-
Which class of stockholders takes the greater investment risk? a. Common b. Preferred c. Neither; bondholders take the most risk d. Both preferred and common take equal risk
-
On January 1, 2015, Paro Company purchases 80% of the common stock of Solar Company for $320,000. Solar has common stock, other paid-in capital in excess of par, and retained earnings of $50,000,...
-
1) In valuing a project, or even a firm, we work off of projections.This means that we must make assumptions.What are the biggest areas of assumptions in a valuation exercise? 2) How can we address...
-
Amplitude-modulated (AM) radios use an oscillator operating at \(455 \mathrm{kHz}\) to demodulate the received signal. This frequency is called the intermediate frequency or IM. Your task is to...
-
Create a risk management plan. You have a budget of $100,000 and a timeline of six (6) months for the plan. Refer to Figure A-1, Risk Management Plan Template, from Appendix A of the Hillson and...
-
a. What responsibility does the auditor have when he believes material errors or irregularities may exist? b. What are the possible effects of the foregoing on the auditor's standard report?
-
What are the steps for paying sales tax?
-
a. Can an examination made in accordance with generally accepted auditing standards be relied upon to detect illegal acts? Why or why not? b. What are the possible effects of illegal acts on the...
-
Jackson was a junior staff member of an accounting firm. He began the audit of the Bosco Corporation which manufactured and sold expensive watches. In the middle of the audit, he quit. The accounting...
-
What are the new features of Project Professional 2016?
-
At the end of three years, how much is an initial deposit of $100 worth, assuming annual interest rate of 10 percent compounded semiannually?
-
Suppose you won a financial literacy competition and are given FJS10000 to invest, with the condition that investment can be done either in, i) Invest in Unit trust of Fiji or Invest in Fijian...
-
Explain the importance of the assumption of fixed nominal wages in the determination of the short-run aggregate supply curve.
-
Suppose the ratio of deposits that banks hold in the form of reserves is 7 percent. Suppose further that people want to hold 8 percent of their deposits in the form of cash. Then, if the Fed wants...
-
Decide whether each of the following transactions is included in GDP. If the transaction is included, determine which component of final spending it represents. If the transaction is excluded from...
-
Give examples of non-current (or fixed) assets. In what circumstances would some of the items you have listed be current assets?
-
What is the difference between a non-current asset and a current asset?
-
You are given the following simplified statement of financial position of the Sandin Castle Company: a Calculate the current ratio. b Calculate the liquidity ratio. c After preparing the statement of...
Study smarter with the SolutionInn App