Computer Science 112
The Art & Science of Computer Graphics
Spring 2013, The College of Saint Rose
Studio/Lab Bonus 1: Stained Glass Windows
Due: 4:00 PM, Thursday, May 2, 2013
This "bonus" assignment gives you the chance to gain experience
using Bezier curves by constructing a stained glass window.
A Stained Glass Window
We saw in class that the message (bezier) sent to a Prism
object will instruct it to treat its profile as a set of control
points for one or more Bezier curves, rather than as a straight-sided
polygon. We will use this construct to build panes of glass, some
with curved sides, that fit together to form a stained glass window.
I would like to collect all of our windows into a larger model, so
please follow the guidelines below very carefully to facilitate this.
- Create your window object as a Group of colored glass
panes.
- 3 to 5 panes is plenty, but feel free to be ambitious and
include more.
- Construct most panes from Prisms.
- At least two panes must have a curved edge.
- The window should be 5 units thick, though you may include
one "unusual" pane that might be a different thickness or even
not be flat. You might use a different primitive object type for
this pane if you wish.
- You may wish to have the edges of your panes meet exactly, or
leave some (normally lead-filled) empty space between panes as a
feature of your design. Still, the glass should cover almost all
of the window area.
- The window should be rectangular, and be between 60 and 100
units wide and between 60 and 100 units tall.
- Plan the layout of your panes carefully. There will be graph
paper available in the lab to aid in your planning.
- Give your window a formal title of five words or less (in the
spirit of titles of stained glass windows in churches). Use the
description message to set this title.
- Create glass-like materials for your panes.
- Pick a color of your choice. RGB colors have a fourth value
that we have not used so far. It specifies how much of the
light is filtered to take on the color of a transparent material
as it passes through. The default value of 1 means no
filtering, smaller values cause more of the light to take on the
color of the material. I suggest a value around 0.6.
- Make your glass highly transparent and perhaps slightly
reflective and/or specular.
- Set the refraction to 1.5, which is reasonable for glass.
- Your model should be submitted as a module (shared model) in a
file named with your last name and "Window.scm", so mine would be
called "TerescoWindow.scm". It should provide your window
object, named with your last name (uncapitalized), followed by
Window, so mine would be terescoWindow. Also provide
your window's dimensions as defined constant values named with a
similar convention: terescoWindowHeight and
terescoWindowWidth. Your window should, by default, be placed
in the xy-plane, with its lower left corner at the origin.
- Also create a simple model that shows off your window for
testing and for creation of images for your wiki page. Include one
"head on" image that shows the design of your window. Include at
least one where you shine a spotlight through the window onto a
white surface behind to see the colors of the window on that white
surface. And finally, include one other setting not described here
that you feel shows off your window.
Typical Model Layout
Your model will likely be organized as follows. First, define your
materials.
(object redGlass Material
(color red)
(transparency 0.9)
...
)
Define panes of glass:
(define pane3Profile (<point-list>))
(object pane3 Prism
(profile pane3Profile)
(bezier) ; interpret profile as collection of bezier curves
(scale 1 1 0.05) ; ensure 5 units thick (normally, it's 100)
(material redGlass) ; assign a material
)
The panes will be added to a group that represents your entire window.
At this point, also set a description for a title for your window.
(object terescoWindow Group
(description "Finestra Noiosa di Jim")
(add pane1)
(add pane2)
(add pane3)
)
Example Model
The example model shown in class is available to you for use as a
starter, or at least as a guide as you develop your window. In the
class shared folder, you will find a folder labs and the folder
bezier within that contains my model.
Submission
- Email a copy of the source code
for your model (the scheme file, which should always be saved
with a .scm extension) and your best image (which should
always be saved in PNG format and using a .png extension)
as attachments to terescoj AT strose.edu. Please include a meaningful
subject line (something like "CSC 112 Studio/Lab
Bonus 1 Submission"). Make sure your name is included in a
comment in your model code, and that you have comments
throughout the source code to make it easier to understand.
- Rename your best image to include your name, then upload it
to the wiki. For example, if you generate an image of a window with smiley faces
and your name is Guy Smiley, you might call your image
"GuySmileyHappyWindow.png".
- Add a section to your wiki page named "Stained Glass Windows"
that includes a link to your image and a description of your
model that generated the image.
Grading
Your submitted model and image will be graded out of 20 points. Your
grade will be based on how well the model meets the requirements,
documentation, and presentation on your Wiki page. Documentation
(comments) in your submitted Mead model should include your
name, the assignment (Studio/Lab Bonus 1: Stained Glass Windows) and a brief
description of the model at the top, and descriptions of sections of
the model that might not be clear to someone trying to understand it.
Your model code should always be nicely formatted. You can always
select "Reindent All" from the "Scheme" menu in DrScheme to have
the system format your code nicely. This will help with readability.
Since it's so easy to do, there's no excuse for turning in
poorly-formatted models.
Grading Breakdown |
Glass materials | 2 points |
Window panes, including at least two with round sides | 6 points |
Composition of panes into a window | 2 points |
Appropriate test setting | 2 points |
Code organization and style | 3 points |
Model documentation | 3 points |
Image and model description on wiki page | 2 points |
|