Description
Purpose:
Points:
Become more familiar with data representation, program control instructions, function handling, stacks, floating point operations, and operating system interaction. 200
The provided main program calls the following routines:
-
Function getParams() to process and check the command line arguments for the picture width and picture height. The function should read each value, convert the ASCII/septenary to integer and verify the range. If all is correct, return the values (via reference) and return to the main with a return value of TRUE. If there are any errors, display the appropriate error message and return to the main with a return value of FALSE.
-
Function drawWheels() to plot the below functions. The formulas should be iterated and each will generate an (x,y) value pair each must be plotted with the openGL call. The t value should range between 0.0 and 2 p increment by tStep (predefined) each iteration.
x 1 = cos( t )
y 1 = sin (t )
The basic OpenGL library calls are included in the provided main and functions template. In order to set the draw color and plot the point, the following OpenGL functions will be required.
Based on the specific hardware configuration and/or virtual box configuration, the following warning message may be displayed.
OpenGL Warning: Failed to connect to host. Make sure 3D acceleration is enabled for this VM.
This warning message can be ignored. Note, some hardware configurations using virtual box may not be able to use openGL. An openGLtest program is provided to verify correction functional of the openGL installation.
Assemble and Linking Instructions
You will be provided a main function (wheels.cpp) that calls the functions. Your functions should be in a separate file (a10procs.asm). The files will be assembled individually and linked together.
When assembling, and linking the files for assignment #10, use the provided makefile to assemble, and link. Note, only the functions file, a10procs.asm, will be submitted. The submitted functions file will be assembled and linked with the provided main. As such, do not alter the provided main.
Example Execution:
Below is an example execution showing the resulting image.
ed-vm% ./wheels -sp 2 -cl 262022046 -sz 1313
The appropriate speed value will vary on different machines.
When functioning, the inner circle will rotate inside outer circle.
-
All source files must assemble and execute on Ubuntu with yasm.
-
Submit source files
-
Submit a copy of the program source file via the on-line submission.
-
Only the functions file (ast8procs.asm) will be submitted.
-
-
Once you submit, the system will score the project and provide feedback.
-
If you do not get full score, you can (and should) correct and resubmit.
-
You can re-submit an unlimited number of times before the due date/time (at a maximum rate of 5 submissions per hour).
-
-
Late submissions will be accepted for a period of 24 hours after the due date/time for any given assignment. Late submissions will be subject to a ~2% reduction in points per an hour late. If you submit 1 minute – 1 hour late -2%, 1-2 hours late -4%, … , 23-24 hours late -50%. This means after 24 hours late submissions will receive an automatic 0.
Program Header Block
All source files must include your name, section number, assignment, NSHE number, and program description. The required format is as follows:
-
Name: <your name>
-
NSHE ID: <your id>
-
Section: <section>
-
Assignment: <assignment number>
-
Description: <short description of program goes here>
Failure to include your name in this format will result in a loss of up to 3%.
Scoring Rubric
Scoring will include functionality, code quality, and documentation. Below is a summary of the scoring rubric for this assignment.
-
-
Criteria
Weight
Summary
Assemble
–
Failure to assemble will result in a score
of 0.
Program Header
3%
Must include header block in the
required format (see above).
General Comments
7%
Must include an appropriate level of
program documentation.
Program Functionality
90%
Program must meet the functional
(and on-time)
requirements as outlined in the
assignment (based on the following
breakdown):
• Command Line (45%)
• Execution with output (5%)
• Fully correct output (40%)
Must be submitted on time for full score.
-