Computer Graphics: Programming, Problem

Computer Graphics:
Programming, Problem Solving,
and Visual Communication
Steve Cunningham
California State University Stanislaus and Grinnell College
PowerPoint Instructor’s Resource
Graphical Problem Solving
in Science
Making images that communicate
about real problems in the
sciences
Why Do We Make Images?
• We need a subject for our images and a
reason for making them in order to get
the most from our work
• The field of scientific visualization gives
us an important set of subjects and an
important audience
• This chapter looks at making images for
science
Problem-Solving with Graphics
• The problem-solving cycle: getting
insight from images
This Chapter’s Process
• We will look at several techniques for
representing and understanding scientific
processes
• We will consider the images we get from
using these processes for modeling
• We hope you will compare the images
with your understanding of the science to
see how they do or do not help you
understand better
Data and Visual Communication
• As we work with data, we need to know
what kind of data we have so we can
make appropriate images
– Interval data
– Ordinal data
– Nominal data
• Each has its own vocabulary for displays
Diffusion Processes
• What happens at one point depends on
what is happening at neighboring points
• Examples: heat in a bar (left) and
disease spread (right)
Function Surfaces
• Process is to create a domain grid in 2D
space and compute a function value
f(x,y) for each point in the grid
• The points (x,y,f(x,y)) in 3D space, with
the arrangement from the domain, form
a set of triangles or quads that can be
graphed
• Lighting, shading, or texture mapping
can be used to clarify the surface
Function Surfaces (2)
• A simple surface
based on a
trigonometric
function
• The surface can
be animated to
show dynamics
Function Surfaces (3)
• A surface based on
a physical principle:
Coulomb’s law
• This figure shows
coordinate axes and
both a lighted
surface and a 2D
pseudocolor display
Function Surfaces (4)
• Wave interactions: linear wave trains
(left) and circular waves (right)
Parametric Curves and Surfaces
• Parametric curves - one parameter
• Parametric surfaces - two parameters
• In 3D space, there are three functions:
fX(s,t), fY(s,t), fZ(s,t)
• As before, you build a grid in parameter
space and evaluate the functions at
each grid point to determine vertices in
3D space
Parametric Curves
• Two simple examples
Parametric Surfaces
• Boy’s surface
• Klein bottle
Parametric Surfaces (2)
• The (4,3) torus
Limit Processes
• There are limit processes such as the that
defining the blancmange surface
• These processes can be carried out as far
as you like and the results then shown
Scalar Fields
• If you have data values across a region,
you can use the same kind of function
graphing processes to create a surface.
• If you also have other data on the region,
you can then map that data onto the
surface
• In our examples, the data is photographic
but other operations can work
Scalar Fields (2)
• This example uses a digital elevation
map for height values and aerial photos
for surface data:
Scalar Fields (3)
• The main problem
is registering the
height values with
the image values,
but the result is
excellent and useful
Simulated Landscapes
• A scalar field can
be simulated by
creating an artificial
landscape and
using the elevations
to generate
synthetic effects
Random Walks
• Random walks are simulations of
processes such as molecular motion
• It is straightforward to generate a 3D
random walk
• The properties of the walk can then be
used with simulations of various
processes
Random Walks (2)
• Simulation of diffusion through
semipermeable membrane
• Notice the readout from the simulation
Molecular Display
• There is abundant information on the
geometry of molecules from several
sources
• This includes the location and type of
each atom in the molecule and all the
molecular bonds
• The information is in standard-format
files so it’s easy to read
Molecular Display (2)
• With the geometry of the molecule
known, it’s simple to draw it -- but you
must still think about the presentation
Simulating Scientific Instruments
• An excellent application of graphic is the
presentation of how instruments work
• An example of the gas chromatograph
shows this well
Monte Carlo Simulations
• Model a complex process or situation
using random values
4D Graphing
• 2D functions of a 2D variable
• 1D function of a 3D variable
• All are 4D problems and require us to
think of ways to show the operations
4D Graphing (2)
• Real function of a 3D variable: real
function defined in a volume
• Can be shown by isosurfaces or slices
4D Graphing (3)
• 2D functions of a 2D variable
• 2D value associated with each point in a 2D space
• Break down the function into direction and
magnitude and use separate encoding
Higher Dimensions
• Displaying a function with 3D values
defined in 3D space
• This is a six-dimensional problem
Data-Driven Graphics
• Innovative approaches can make even
simple line graphs into revealing and
interesting displays