Formulae to calculate their center point

Assignment Help Programming Languages
Reference no: EM13762404

(1) Given n points in the 3D space (xo, yo, zo), (x1, y1, z1), (xn-1,yn-1, zn-i), we use the following formulae to calculate their center point (xc, yc, zc)

xc=(x0+x1 + xn-1)/n
ye= (y0+ y1 + ••• Yn-1)/ n
zc= (Zo + Z1+ ••• Zn-1)/ n

Create an assembly program to implement the above formulae. The data segment of your program should look like the following.


.data

n:      .word 7

x:      .word 30, 12, 45, 34, 40, 14, 30

y:     .word 32, 10, 39, 89, 24, 12, 67

z:      .word 42, 20, 76, 23, 23, 65, 15

xc:    .space 4

yc:    .space 4

zc:    .space 4

 

# This example has 7 points

# xo, xi, • • • Xn-I

# y0, y1, • • • yn-1

# z0, zi, • • • zn-1

# a word result

# a word result

# a word result

xc, yc, and zc are all integers. Ignore the remainders if there are any.

Please name your program xxxx.asm, where xxxx is the last four digits of your ID and e¬mail xxxx.asm to me. In your e-mail, just write Question 1 in the title and attach xxxx.asm to it.

Also in order to help comment on your program, please submit a hardcopy of your source code for this question. When the marker checks it, s/he will make comments on your hardcopy

Reference no: EM13762404

Questions Cloud

Importing and analyzing data for johnson equipment : Importing and Analyzing Data for Johnson Equipment-Johnson Equipment, the medium-sized laboratory equipment manufacturing company where you work, is in the process of acquiring Sloan Manufacturing, a smaller equipment /manufacturer in the same indu..
Viability of upgrading to windows : Provide a detailed upgrade plan for the organization, including the sales staff.
Shock therapy and rapid privatization in russia : Why were the IMF and U.S. Treasury stubbornly committed to shock therapy and rapid privatization in Russia? What was their political objective? What "imminent danger" worried them?
Basic components of organization : The two basic components of organization are selection and arrangement.
Formulae to calculate their center point : Given n points in the 3D space (xo, yo, zo), (x1, y1, z1), (xn-1,yn-1, zn-i), we use the following formulae to calculate their center point (xc, yc, zc)
Health care industry : What role do you plan to have in the industry?
Why does socrates believe that the soul lives beyond death : In what sense does Socrates think that philosophy is a preparation for death? What are his arguments for making that claim? Why does Socrates believe that the soul lives beyond death?
Sources of opinion testimony : You must be sure that the sources of opinion testimony are trusted by your listeners because opinion testimony cannot be verified, it must simply be accepted.
What have been the results of the second experiment : Describe the failures of the first experiment. What were its outcomes - What have been the results of the second experiment, the transition of Russia and Eastern and Southeastern Europe to market-based economies?

Reviews

Write a Review

Programming Languages Questions & Answers

  Write program to reads student-s name together with score

Write a program that reads a student's name together with his or her test score. The program should then compute the average test score for each student.

  Design implement test and debug a program with a jframe

design implement test and debug a program with a jframe that allows the user to enter a series of contacts names ages

  Implement sumpairs and sumof

Using SML writes a version of sumPairs that sums each component of the pairs separately, returning a pair consisting of the sumof the first components and the sum of the second components

  Design a grade average program by using raptor which will

design a grade average program using raptor that will produce the numerical grade average of test scores input by a

  Write program which prompts user to enter length in feet

Create and execute the program for this exercise. Write down the program which prompts user to enter length in feet and inches and outputs equivalent length in centimeters.

  Give hypertext link of the internet location of program

Describe in one or two paragraphs what you observe. Give hypertext link of the internet location of the program (or applet) you found.

  Steps in preparing a high level language program

Describe the purpose of each step in preparing a high level language program for execution (editing, compiling, linking, and loading).  Include in your description the types of files created with each of the first three steps.?

  Create program which calculate distance travelled by boat

Create a program which calculate distance a boat travels across a river, given the width of the river, the boat's speed perpendicular to the river.

  Sequence of statements to find first comma in string line

Write a sequence of statements that finds first comma in String line , and assigns to variable clause portion of line up to, but not including the comma.

  Write a program that reads the data from the file

Write a program that - Reads the data from the file into an array of structure when the form is loaded and When "Display Hits" is clicked, based on the team selected from the list, displays the players from that team and their hits. The players are..

  Write program to find smallest-largest value from n numbers

Write down program which will determine the smallest, largest and average values in collection of N numbers. Get value of N before scanning each value in collection of N numbers.

  Create derived class by inheriting tthe class

Create a derived class named FancyDateClass by inheriting the DateClass. You will have to provide both the class definition and implementation.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd