Question: Write a graphics method that draws the stars in their proper location. The program requires you to write a small method. GEEN163 Star Chart Astronomers

Write a graphics method that draws the stars in their proper location. The program requires you to write a small method.
 Write a graphics method that draws the stars in their proper
location. The program requires you to write a small method. GEEN163 Star

GEEN163 Star Chart Astronomers collect lots of data about stars and there are many catalogs that identify the locations ofstars. In this assignment, you will use data in a star catalog to create a picture that plots the locations ofstars. The file stars.txt contains one line for each star that is represented in the catalog. The meaning of each field (column) is described below. The first three fields are the x, yand z coordinates for the star. We will ignore the z coordinate, and Each axis in the coordinate system goes from-l to +1 and the center point is 0,0. (See the figure below.) The fourth field is the Henry Draper number which is simply a unique identifier for the star that is unnecessary for this program The fifth field is the magnitude (or brightness) of the star. The smaller the number the brighter the star. The sixth field is Harvard Revised number, another identifier that is unnecessary for this program Your program will have to read each data item in the file even if it will not be used. The coordinate system used for pixels in a picture has position (0,00 in the upper left comer of the picture, and the maximum x and y values are the height and width of the picture in pixels. In this assignment. all pictures will be square with a maximum height and width of 900 pixels. See below for a comparison of the two coordinate systems. 0,900 0,00 -0.5 Pixel Coordinate System -0.5 900,0 Star Catalog Coordinate System The first step is to write a method that will convert from coordinate numbers to a pixel location. Note the same method will work for both X and Y coordinates. The method will have the header int coord2 pixel double coord) The idea for this assignment comes from bampuhitystanfordedu/2009reid-stammapstarmaphtml page of

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!