Difference between revisions of "Render Part A Assignment"
Jump to navigation
Jump to search
Line 35: | Line 35: | ||
===Equilateral Triangle=== | ===Equilateral Triangle=== | ||
[[File:Render_equilateral_triangle.png]] | [[File:Render_equilateral_triangle.png]] | ||
+ | |||
+ | NOTE: you may choose to render it from center of mass or center of bounds. | ||
+ | |||
+ | It should be equilateral, however. | ||
===Rectangle=== | ===Rectangle=== |
Revision as of 02:25, 15 July 2019
Contents
OpenGL
GLUT
Code to Investigate
Cavalcade of Graphics
ruby/examples/cavalcade_of_graphics.rb
Code to Implement
Components
Each of the renderable components has its own file in the ruby/render/assignment directory.
Equilateral Triangle
NOTE: you may choose to render it from center of mass or center of bounds.
It should be equilateral, however.
Rectangle
Ellipse
Chord
Image
Text
Bézier Curve
Point2
To support Bézier curves you will want to implement the point2.rb. You may wish to use Ruby's convenient Struct construct.
You should be able to construct a Point2 with an x and a y and be able to access those values.
Component
Quadratic (Second Order) Curve: | ||
Quadratic (Third Order) Curve: | ||
Fourth Order Curve: |