Suppose you are designing a part of a program for a medical robot that has a sensor returning an x- and y-location (measured in cm). You need to check whether the sensor location is inside the circle, outside the circle, or on the boundary (specifically, having a distance of less than 1 mm from the boundary). Assume the circle has center (0, 0) and a radius of 2 cm. Give a set of test cases.
Want to see the full answer?
Check out a sample textbook solutionChapter 3 Solutions
Big Java Late Objects
Additional Engineering Textbook Solutions
Computer Science: An Overview (13th Edition) (What's New in Computer Science)
Data Mining for Business Analytics: Concepts, Techniques, and Applications with XLMiner
Starting Out with C++ from Control Structures to Objects (9th Edition)
Starting Out with Programming Logic and Design (4th Edition)
Computer Systems: A Programmer's Perspective (3rd Edition)
Differential Equations: Computing and Modeling (5th Edition), Edwards, Penney & Calvis
- Design a 20th-order bandstop IIR filter with lower 3-dB frequency 500 Hz and higher 3-dB frequency 560 Hz. The sample rate is 1500 Hz. Visualize the magnitude response of the filter. Use it to filter 1000 samples of random data. Plot the input and output data. Note: you can use any language to accomplish the project. It is recommended to use Matlab.arrow_forwardWrite a program i C language to make the RGB LED start in the Red color state, then fade to Green, then fade to Blue and finally back to the Red color. Complete the code that is giving in the picture. Remember, the LED should FADE from a color to another. So, make sure that the LED fade.arrow_forwardA robot starts on a point marked “A” on a rectangular grid of points. The starting point is always the top left point on the grid. The robot can move left, right, up or down, moving from one point to the next. By moving in steps going left, right, up or down, the robot would like to reach a point marked “B”, which is always the bottom right point in the grid. Sometimes, points are marked as “x”, and the robot is not allowed to visit them at all. A robot is never allowed to visit a point more than once. In how many ways can the robot move from A to B and visit all points along the way? For example, in the following grid, represented in text as A . . . . B there is only one path from A to B: In the following grid, represented in text as A . . x x B there is still only one path (we're lucky because of the two x's): However, in the grid A . . . x B there are no ways for the robot to move from A to B and visit all points that are not marked with “x”. Write a single…arrow_forward
- Write a program Using Digital Differential Analyzer algorithm that allows users to create a picture as a set of straight-line segments drawn between specified endpoints. The coordinates of the individual line segments are to be selected with a locator device.arrow_forwardWrite a triangle (x0, y0, x1, y1, x2, y2) function to draw the triangle with vertices (x0, y0), (x1, y1), and (x2, y2). Use your function to draw some triangles. www..arrow_forwardMake me a model in an engineering software, which allows to represent the magnetic field of a three-phase rotating electric machine.1.A scenario in which you can modify: frequency, modulus of the magnetic field density, initial angle.2.To allow the user to modify the radius of the electric machine casing.3.Allow to re-simulate a new magnetic field distribution or to exit the simulation. in matlabarrow_forward
- Please using python to implement the following task. Given a RGB color image ‘test.jpg’ noised by salt and pepper noise, first choose a good filter to remove noise on each channel, then based on the gray image of this new RGB color image, use canny edge detection to get edges. Finally show the original image and its edge image.arrow_forwardImplement the problem below in Python using mpi4py. Submit the code of your program and a brief report. The report should describe the design of your program, and demonstrate the results of running your program. n-body solver. Implement a parallel n-body solver with n = 10 particles. You may randomly generate the masses, initial velocities, and initial positions of all particles at the beginning. Compute the positions of all particles after 1 second. Compare the results by using 0.1s, 0.01s, and 0.001s as the time in each timestep, respectively.arrow_forwardThe Problem: You are coding a graphics filter that process each of an image through a filter. Each pixel is defined a triplet of real numbers (R,G,B) each of which is between 0 and 255.The filtering algorithms need to work on real numbers in order to do their job. But examining the program you discover that they only need two digits of accuracy. Any additional digits is just overkill.arrow_forward
- Write a program in C language that makes it look like the light is scrolling through 4 LEDs that are connected externally. The scroll effect can be achieved by turning LEDs ON and OFF sequentially.arrow_forwardCreate a program that provides visualization for three-dimensional plane: Animate your solution using any animation programming language like matlab please. (so the output should show graph of the exponential function inputted by the user)the system should be user-input, and the output should show graph of the exponential function inputted by the user) The topic is all about Inverse Laplace Transform on Exponential function.arrow_forwardWrite a program (in MATLAB) to read how many pixels are in "cameraman.tif", and add a white vertical line in the center of the ?(image (cameraman.tifarrow_forward
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education