程序代写案例-COM6503

COM6503: 3D Computer Graphics
RESIT ASSESSMENT (100%)
Dr. Steve Maddock
Deadline: 12pm, 26 September, 2022
1. Introduction
The asses
sment will involve two equally-weighted
parts:
Task 1 [50%]: using modern OpenGL (and either Java
or C/C++) to create a program to render a scene. The
scene includes a hierarchical model which is
represented as a scene graph. Also, the hierarchical
model can animate.
Task 2 [50%]: Writing a report that discusses this
work and a specific, associated, focussed topic.
2. Task 1. Programming
Figure 1 shows a model of a large, human-sized, angle-
poise lamp. This is made up of a base, a lower arm, an
upper arm, and a head, which contains a protruding
lightbulb (a spotlight) in the shape of a cube (a sphere
would also suffice). The lower arm can rotate in all
directions about the base, the upper arm can rotate
about the lower arm (in a similar way to a human elbow
joint) and the head can rotate in all directions about the
upper arm connection point. The lightbulb shines in the
same direction that the head is pointing in, as indicated
by the dotted lines in Figure 1.
Imagine the lamp is standing in the centre of a room
and is being used to illuminate part of the room, e.g.
the floor or a wall or the ceiling or a combination of
these (Figure 2). The lamp base does not move but the
lamp can articulate its other parts so that the light can
shine in different directions. For example, it could
rotate about its base and the head would point to a
different wall, or the upper arm could rotate about the
joint with the lower arm and the head could rotate
about the joint with the upper arm so the lamp could
shine at the floor. Your challenge is to create this
scenario.

You must satisfy all the following requirements:
• Produce a hierarchical model of an angle-poise
lamp, made up of at least the four basic parts (and
the lightbulb) listed above. Use simple objects for
the individual parts, i.e. scaled spheres or cubes.
For example, in Figure 1, the head is made from a
combination of a cube for the lamp head and a cube
for the bulb. You may instead decide to use spheres
or a combination of cubes and spheres. Cubes and
spheres are the only pieces needed to model the
lamp. The hierarchy and associated
transformations are more important than the
quality of the pieces in the hierarchy. I want you to
demonstrate that you understand transformations
and a scene graph hierarchy.
• The pieces of the lamp do not need to be texture-
mapped.
• The head of the lamp must contain a bulb. The bulb
is the source of a spotlight used to illuminate the
direction the lamp is pointing in. There must be an
option in the interface to turn the spotlight (and
bulb appearance) on and off.
• The lamp should be placed in a large room, as
illustrated in Figure 2. The floor of the room
should be texture-mapped with an appropriate
texture map. The walls should be texture-mapped
with graffiti.
• A sphere should also be added into the room. The
sphere should be textured mapped such that it has
some dull parts (diffuse map) and some shiny parts
(specular map). When the lamp head points at the
sphere, the shiny parts will reflect the light. Also,
any world light will also result in more reflected
light for the shiny parts.
• One wall should have a texture map of a door on
it. There is no window. There is no ceiling for the
room.
• The whole scene should also be illuminated with
two general world lights. One should be positioned
above the sphere pointing downwards towards the
sphere. The second one can be positioned at any
point in the world (e.g. outside the room). It should
be possible to turn on and off (or dim, i.e. reduce
the intensity of) each light from the interface.
These general world lights will illuminate all parts
of the scene. When you switch off the general
lights, the effects of the lamp spotlight will be
much clearer in the room.
• A user-controlled camera should be positioned in
the room. Use the camera that was given in one of
the tutorial for the module – the mouse can be used
to change the direction the camera is pointing in
and the keys can be used to move about.
• Set up three fixed camera positions that can be
jumped to using buttons on the user interface.
Figure 1. An angle-poise lamp

head
upper
arm
lower
arm
base
• The interface should have a button (labelled
‘Random Pose’) to make the lamp parts adopt
random angles to each other to make a pose (within
certain ranges so that the result is still plausible, i.e.
the lamp parts don’t intersect each other or the
floor). As examples, there might be a smaller or
larger angle between the lower and upper arms, or
the head might twist to point in a different
direction, or the lower arm may rotate about the
base. This will make the spotlight point in a
different direction.
• There should be a button in the interface that
changes the lamp pose so that the bulb (spotlight)
points at the sphere and also changes the camera so
that the specular highlight on the shiny parts of the
sphere can easily be seen.
You do NOT have to do shadows. Do not worry about
shadow effects.
3. Task 2. Report
Write a report that contains the following three
sections:
1. Manipulating and modelling 3D objects: Discuss
how scene graphs have been used in Task 1 to
structure the lamp and make it easier to control the
movement. Include screenshots to illustrate your
discussion. As an example, consider how to show
the effect of changes to transformations in a scene
graph hierarchy by showing the scene graph, the
changes to the scene graph transforms and the
resulting screenshots of the lamp. You should also
consider other creative illustrations to discuss
modelling of the objects used in Task 1.
2. Realism: Discuss how texture mapping has been
used in Task 1 to increase realism. Include
screenshots to illustrate your discussion, e.g.
examples with and without texture maps. Also,
consider how to illustrate the uv mapping process.
Try to be creative with your illustrations.
3. Focussed topic: Discuss how scene graphs have
evolved since they were first introduced into
computer graphics. You should include a
discussion of (i) how have they adapted to include
other kinds of nodes and states in addition to
geometry and transformations; (ii) the relevance of
directed acyclic graphs (DAGs) to scene graphs;
(iii) open source and commercial scene graph
APIs; (iv) the use of scene graphs for efficiency in
rendering objects. You must illustrate your
discussion.
The following references should help with the
discussion of scene graphs:
• James H. Clark. 1976. Hierarchical geometric
models for visible surface algorithms. Commun.
ACM 19, 10 (October 1976), 547-554.
• Robert F. Tobler. Separating semantics from
rendering: a scene graph based architecture for
graphics applications. The Visual Computer, June
2011, Volume 27, Issue 6, pp 687–695
• https://en.wikipedia.org/wiki/Scene_graph (and
references therein).
• https://www.openscenegraph.com/
4. Deliverables
4.1 Task 1
• You should submit a zip file containing a copy of
your program code (and any other necessary
resources, e.g. image files for the textures and a
readme.txt file that describes everything else).
Figure 2: The lamp positioned in the room – the dashed lines show the direction the
light is pointing in. There is also a sphere in the room.
• The program MUST compile and run from the
command line – do not submit a solution that
requires an IDE. A readme.txt must be included that
describes how to compile and run the program.
• You can make use of any code from the module
tutorial.
• You must include appropriate comments in your
program to identify where you wrote the code, e.g.
/* I declare that this code is my own work */
/* Author address here> */
• The name of the main class in your program should
be Main. That way it is easy for me to find and run
the program. (On a Windows PC, it would be
useful to include a main.bat file to automatically
compile and/or run the program.)
4.2 Task 2
• The report should be between 2000 and 4000
words. This total does not include the list of
references and the figure captions. You may
include as many pictures as you deem appropriate.
• You should submit the report as a pdf document.
• You must include the following statement at the
start of the report:
/* I declare that this work is my own.
Author: < name >, < email address > */
5. Marking
5.1 Task 1
I will check that the program meets the requirements
listed above, so read the requirements carefully. Make
sure the program compiles and does some part of the
work requested even if you do not finish everything.
Your program code will be run and exercised
thoroughly.
Marks will be available for:
• The quality of the programming (20%)
• Satisfying the requirements (80%)
In assessing the quality of your program code, four
aspects will be considered:
• General style: layout; neat, organised code;
comments; use of constants and variables; methods
not over long;
• Program and data structures for the models: use of
separate methods and classes, e.g. a separate class
for the lamp;
• Neat and tidy coding for dealing with
transformations in the scene;
• Pose control: how tidy and flexible is the coding?
In considering the requirements, four aspects will be
considered:
• Modelling the lamp and other parts of the scene:
the lamp must be a hierarchical model. (Draw a
scene graph for the lamp model and another for the
full scene before starting to program – these can be
used as illustrations for Task 2.)
• Texturing: sphere and room. The quality of the
texturing will be considered, e.g. use of diffuse and
specular textures. (Pictures of these textures could
be used in Task 2.)
• Lighting and interface controls: lights should
behave correctly such that their effect is seen on
the scene. (The difference between diffuse and
specular maps could be shown as illustrations for
Task 2.) Also, make sure you include two general
world light(s). Necessary interface controls, as
described in the above requirements, should also
be included.
• Posing the lamp: Does the lamp instantly change
from one pose to another or does it animate
smoothly between poses?
5.2 Task 2
It is important that you attend to each of the three topics
described in ‘Task 2. Report’ above, especially the
focussed topic. The following aspects will be
considered:
• Knowledge and understanding of relevant material
– Do you demonstrate knowledge and
understanding of what you have been asked to write
about? Is deeper understanding demonstrated by
comparing and contrasting ideas? Is your
information accurate, or is some of the material
misleading or even incorrect, demonstrating that
you don’t understand it?
• Organisation and clarity – Is the report tidy and
organised? Are all points in the writing expressed
clearly and succinctly and supported with the use of
diagrams? All diagrams should have a figure
number and a caption and be referred to from the
main text. References should be neatly listed.
6. Plagiarism
• The Department’s PGT student handbook gives
detailed information on the topic of lateness and
unfair means:
https://sites.google.com/sheffield.ac.uk/compgtstu
denthandbook

欢迎咨询51作业君
51作业君

Email:51zuoyejun

@gmail.com

添加客服微信: abby12468