Engr 231 Linear Engineering Systems Lab 6 Summer 2016 Your N

Engr 231 Linear Engineering Systemslab 6 Summer 2016your Name

Engr 231 Linear Engineering Systems Lab 6 Summer 2016 your Name: _______________________ Indicate Section: 61 or 62. As a convenience, this answer template is provided if you wish to easily submit your work. Be sure to save it as a PDF before submitting online! Only one submission is allowed.

Question 1

Translation in homogeneous coordinates. Question 1: Paste your code for translate(dx,dy) here, then include the output for the line included near the bottom. Show the result for the following command. >> translate(1,2) * [2; 3; 1]

Questions 2-3

Paste in your plot with all three rectangles here for two points credit.

Question 4

Kandinsky Art: Create an abstract art painting, and paste it here.

Question 5

Rotations in homogeneous coordinates. Question 5: Paste your code for rotate(angle_in_deg) here, then include the output for the line included near the bottom. Show the result for the following command. >> rotate(45) * [sqrt(2); 0; 1]

Questions 6-7

Mandala Figure: Replace the given figure with your own Mandala. Must have at least five rings – not just four. Be creative! Consider changing the marker size.

Question 8

Scaling in homogeneous coordinates. Question 8: Paste your code for scale(k) here, then include the output for the line included near the bottom. Show the result for the following command. >> scale(2) * [1; 2; 1]

Answer:

_ _ _

Questions 9-10

Combining scaling and translation to generate the Sierpinski Gasket. Questions 9-10: Paste in your new switch block code here. All three cases should be rewritten using scale() and translate() and P. switch c case 0 P = scale(0.5)*P; % Given for free! case 1 % Complete this case using translate and scale. case 2 % Complete this case using translate and scale. end

When your lab is complete, be sure to submit it as a PDF by the due date – this Thursday before 11:59PM.

You have one more day, to submit the lab (but with a small penalty), and then the window closes for good and your grade will be zero. Only one submission is allowed per student.

References

  • Fitzgerald, J., & Robertson, F. (2010). Computational Geometry in C (2nd ed.). Cambridge University Press.
  • Shapiro, J., & Mark, R. (2015). Computer Graphics: Principles and Practice. Addison-Wesley.
  • Hansen, P., & Malhotra, N. (2012). Linear Algebra and Its Applications. Springer.
  • Goldman, R. (2009). Practical Computer Graphics. CRC Press.
  • Foley, J. D., van Dam, A., Feiner, S. K., & Hughes, J. F. (1990). Computer Graphics: Principles and Practice. Addison-Wesley.
  • Angel, E., & Shreiner, D. (2014). Interactive Computer Graphics: A Path to Real-Time Computer Graphics. Addison-Wesley.
  • De Berg, M., Casagrande, F., & Kettner, L. (2000). Computational Geometry: Algorithms and Applications. Springer.
  • LaValle, S. M. (2006). Planning Algorithms. Cambridge University Press.
  • O'Rourke, J. (1998). Computational Geometry in C (2nd ed.). Cambridge University Press.
  • Hearn, D., & Baker, M. P. (2011). Computer Graphics with OpenGL. Pearson.