Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Hello, could you please code the answer in Python? I also attached some guides, if they are useful. (a) Write the function equilateral, which takes

Hello, could you please code the answer in Python?

I also attached some guides, if they are useful.

image text in transcribed

image text in transcribed

image text in transcribed

(a) Write the function equilateral, which takes two different points x,yRN,N>1, and returns one point zRN such that (x,y,z) are the vertices of an equilateral triangle, that is, the point z must satisfy xz=yz=xy. (b) Write the function nearest_on_circle, which takes a point cR2, a radius R>0, and point xR2. This function returns the point y in the circle {zR2:zcR} that lies closest to x (minimum Euclidean distance). (c) Consider the setup in Fig. 1, where two reflective parallel surfaces separated by a width w>0 lie parallel to the x-axis and a laser placed at point (0,h),0h0, and radius R>cx reflects the beam of a laser at the origin oriented with an angle (0,45) [degrees] with respect to the x axis. As before, the 2 angle of incidence is the same as the angle of reflection. The reflected beam intersects the x-axis at point (L,0). Write the function reflection_on_circle, which takes as input (cx,R,) and returns L. Fig. 2: Reflection of a laser beam on a circle. - Throughout, measurement units are not specified when not necessary. The functions that you program may assume that the units of the input arguments are consistent with each other. - Due to limitations in finite-precision arithmetic, all equalities are checked up to a certain tolerance. Specifically, for a,bRN, the equality a=b is regarded as true if abN105. - The submission of this assignment implies that you abide by the honor code, which states that you do not receive help from anybody else. However, you can check as many books, papers, and websites as you wish. - Notation: R is the set of real numbers, RN is the set of column vectors with N real entries, and RMN is the set of MN matrices with real entries. Uppercase boldface letters (e.g. A ) denote matrices whereas lowercase boldface letters (e.g. a) denote column vectors. The (i,j)-th entry of a matrix A is denoted as (A)i,j, whereas the i-th entry of a vector v is (v)i. Transpose is indicated by v is the Euclidean norm of the vector v

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions