ics summer school, roscoff introduction to scientific visualization · 2017. 5. 9. ·...

44
ICS Summer School, Roscoff Introduction to Scientific Visualization Instructors: Chantal Oberson Ausoni , Jérémie Foulon ,Pascal Frey , ?, Julien Tierny ICS-UPMC, Paris, France LTCI (UMR 5141) Telecom Paris Tech, France ? Lab. J.L. Lions, UMR 7598, UPMC Univ Paris 06, Paris, France Class notes can be downloaded at www.ljll.math.upmc.fr/ frey/visu.html ICS summer school: Scientific visualization at the interfaces Roscoff Marine station, July 28 - August 8, 2014 1 Outline of the lectures PART I-FUNDAMENTALS 1. Introduction to scientific visualization 1.1 Visualization at large 1.2 Definitions and purposes, motivations, concerns 1.3 Technological aspects 2. Computer graphics primer 2.1 Introduction to CG 2.2 The quest for realism 2.3 Illumination models 3. Mathematical primer 3.1 Geometric transformations, motivations 3.2 Affine and projective transformations 3.3 Rotations in 3D ICS summer school: Scientific visualization at the interfaces Roscoff Marine station, July 28 - August 8, 2014 2

Upload: others

Post on 26-Jan-2021

0 views

Category:

Documents


0 download

TRANSCRIPT

  • ICS Summer School, Roscoff

    Introduction to Scientific VisualizationInstructors: Chantal Oberson Ausoni†, Jérémie Foulon†,Pascal Frey†,?, Julien Tierny‡

    † ICS-UPMC, Paris, France‡ LTCI (UMR 5141) Telecom Paris Tech, France

    ? Lab. J.L. Lions, UMR 7598, UPMC Univ Paris 06, Paris, France

    Class notes can be downloaded at www.ljll.math.upmc.fr/ frey/visu.html

    ICS summer school: Scientific visualization at the interfaces Roscoff Marine station, July 28 - August 8, 2014 1

    Outline of the lectures

    PART I - FUNDAMENTALS

    1. Introduction to scientific visualization

    1.1 Visualization at large

    1.2 Definitions and purposes, motivations, concerns

    1.3 Technological aspects

    2. Computer graphics primer

    2.1 Introduction to CG

    2.2 The quest for realism

    2.3 Illumination models

    3. Mathematical primer

    3.1 Geometric transformations, motivations

    3.2 Affine and projective transformations

    3.3 Rotations in 3D

    ICS summer school: Scientific visualization at the interfaces Roscoff Marine station, July 28 - August 8, 2014 2

  • Outline of the lectures

    PART II - ADVANCED CONCEPTS

    4. Surface representation and approximation

    4.1 Curves and surfaces

    4.2 Differential geomery

    4.3 Parametrized surfaces

    4.4 Discrete surfaces, triangulations

    5. Data analysis and visualization

    5.1 Data structures

    5.2 Scalar fields

    5.3 Vector fields

    5.4 Tensor fields

    ICS summer school: Scientific visualization at the interfaces Roscoff Marine station, July 28 - August 8, 2014 3

    References• Computer graphics

    1. Agoston M.K., Computer graphics and geometric modeling, implementation and algorithms, Springer,(2005).

    2. Birn J., Digital lighting & rendering, New Riders, (2010).

    3. Gallardo A., 3D lighting, history, concepts & techniques, Charles River Media, (2000).

    4. Govil-Pai S., Principles of computer graphics, theory and practice using OpenGL and Maya, Springer,(2004).

    5. Hansen C.D., Johnson C.R. (eds), The Visualization Handbook, Academic Press, (2005).

    6. Levkowitz H., Color theory and modeling for computer graphics, visualization, and multimediaapplications, Springer, (1997).

    7. Mukundan R., Advanced methods in computer graphics with examples in OpenGL, Springer, (2012).

    8. Salomon D., Computer graphics and geometric modeling, Springer, (1999).

    9. Tufte E.R., Graves-Morris P.R., The visual display of quantitative information, Graphics press Cheshire,(1983).

    10. Watt A., Watt M., Advanced animation and rendering techniques, Addison-Wesley, (1992).

    ICS summer school: Scientific visualization at the interfaces Roscoff Marine station, July 28 - August 8, 2014 4

  • References (2)• Scientific Visualization

    1. Farin G., Hansford D., Mathematical principles for scientific computing and visualization, AK PetersLtd, (2008).

    2. Giaquinto M., Visual thinking in mathematics, an espistemological study, Oxford University Press,(2007).

    3. Hauser H., Hagen H., Thiesel H. (eds.), Topology-based methods in visualization, Springer, (2007).

    4. Javidi B., Okano F., Son J.Y. (eds.), Three-dimensional imaging, visualization and display, Springer,(2009).

    5. Laidlaw D.H., Vilanova A. (eds.), New developments in the visualization and processing of tensorfields, Springer, (2012).

    6. Möller T., Hamann B., Russell R. (eds.), Mathematical foundations of scientific visualization, com-puter graphics and massive data exploration, Springer, (2009).

    7. Peikert R. et al. (eds.), Topological methods in data analysis and visualization II, Springer, (2012).

    8. Schroeder W., Martin K., Lorensen B., The visualization toolkit, Prentice-Hall, (1997).

    9. Tufte E.R., The visual display of quantitative information, 2nd ed., Graphics Press, (2001).

    10. Wright H., Introduction to scientific visualization, Springer, (2007).

    ICS summer school: Scientific visualization at the interfaces Roscoff Marine station, July 28 - August 8, 2014 5

    References (3)• Geometry

    1. Anderson J.W., Hyperbolic geometry, Springer, (2005).

    2. Audin M., Geometry, Springer UTX, (2003).

    3. Berger M., Geometry, UTX, Springer, (1987).

    4. Berger M., Senechal L.J., Geometry Revealed: A Jacob’s Ladder to Modern Higher Geometry,Springer, (2010).

    5. Dorst L., Fontijne D., Mann S., Geometric algebra for computer science, an object-oriented approachto computer graphics, Morgan-Kaufmann, (2007).

    6. Goldman R., Rethinking quaternions, theory and computation, Morgan & Claypool publishers,(2010).

    7. Perwas Ch., Geometric algebra with applications in engineering, Geometry and Computing, 4,Springer, (2009).

    8. Petersen P., Riemannian geometry, GTM 171, Springer, (2006).

    9. Pressley A., Elementary differential geometry, UMS, 2nd ed., Springer, (2010).

    10. Stillwell J., The four pillars of geometry, Springer, (2005).

    11. Vince J.A., Quaternions for computer graphics, Springer, (2011).

    12. Vince J.A., Geometric algebra for computer graphics, Springer, (2008).

    ICS summer school: Scientific visualization at the interfaces Roscoff Marine station, July 28 - August 8, 2014 6

  • References (4)

    • OpenGL

    1. Angel E., Schreiner D., Interactive computer graphics, a top-down approach with shader-basedOpenGL, 6th ed., Addison-Wesley, (2012).

    2. Cozzi P., Riccio Ch. (eds.), OpenGL insights, CRC Press, (2012).

    3. Glaeser G., Stachel H., Open geometry: OpenGL + advanced geometry, Springer, (1999).

    4. Kempf R., Frazier C. (eds.), OpenGL reference manual, 2nd ed., Addison-Wesley, (1997).

    5. Whitrow R., OpenGL graphics through applications, Springer, (2008).

    6. Woo et al., OpenGL programming guide, 3rd ed., Addison-Wesley, (1999).

    • Related topics

    1. Dey T.K., Curve and surface reconstruction, algorithms with mathematical analysis, Cambridge Uni-versity Press, (2007).

    2. Hjelle O., Daehlen M., Triangulations and applications, Springer, (2006).

    3. Velho L. et al. (eds.), Mathematical optimization in computer graphics and vision, Morgan Kauf-mann, (2008).

    4. Warren J., Weimer H., Subdivision methods for geometric design, a constructive approach, Morgan-Kaufmann, (2002).

    5. Zudilova-Seinstra E. et al. (eds.), Trends in interactive visualization, state-of-the-art survey, Springer,(2009).

    ICS summer school: Scientific visualization at the interfaces Roscoff Marine station, July 28 - August 8, 2014 7

    Schedule

    WEEK I

    Mornings: lectures 17 hours Afternoons: hands-on sessions 12 hours

    Day Schedule Topic

    Mo 28/07 9:00-12:00 Scientific Visualization (definitions and purposes, motivations)14:00-16:00 Computer graphics primer (quest for realism, rendering)16:30-17:30 M. Baaden’s seminar

    Tu 29/07 9:00-12:00 Maths Primer (analytic and proj. geometry)14:00-17:00 GLUT demos

    We 30/07 9:00-12:00 Introduction to C++14:00-17:00 Programming in 3D

    Th 31/07 9:00-12:00 Data structures (regular grid, triangulations, etc)14:00-17:00 Paraview I (data converter)

    Fr 1/08 9:00-12:00 Scalar fields (isosurfaces, etc.)14:00-17:00 Isosurfaces reconstruction

    ICS summer school: Scientific visualization at the interfaces Roscoff Marine station, July 28 - August 8, 2014 8

  • Schedule (2)

    WEEK II

    Mornings: lectures 14 hours Afternoons: hands-on sessions 12 hours

    Day Schedule Topic

    Mo 4/08 9:00-12:00 Continuous surfaces (representation, differential geometry, etc)14:00-17:00 Bézier surfaces (interpolation)

    Tu 5/08 9:00-12:00 Discrete surfaces (representation, subdivision)14:00-17:00 Curvature estimates

    We 6/08 9:00-12:00 Vector fields (critical points, etc)14:00-17:00 Paraview II (scalar, vector, tensors analysis)

    Th 7/08 9:00-12:00 Tensor fields14:00-17:00 Case studies

    Fr 8/08 9:00-11:00 Conclusions

    Total

    Lectures : 31 hours Hands-on sessions: 24 hours

    ICS summer school: Scientific visualization at the interfaces Roscoff Marine station, July 28 - August 8, 2014 9

    Part IFUNDAMENTALS

    ICS summer school: Scientific visualization at the interfaces Roscoff Marine station, July 28 - August 8, 2014 10

  • Chapter IINTRODUCTION TO SCIENTIFIC

    VISUALIZATION

    (C. Brownlee et al., Ray tracing using OpenGL Interception, University of Utah, USA)

    ICS summer school: Scientific visualization at the interfaces Roscoff Marine station, July 28 - August 8, 2014 11

    Introduction

    Section 1.1Motivations & Applications

    ICS summer school: Scientific visualization at the interfaces Roscoff Marine station, July 28 - August 8, 2014 12

  • Introduction

    [Scientific] visualizationChart junk (E. Tufte)

    Which of these visualizations will you remember later?

    (Credit: Images courtesy of Michelle Borkin, Harvard SEAS)

    ICS summer school: Scientific visualization at the interfaces Roscoff Marine station, July 28 - August 8, 2014 13

    Introduction

    [Scientific] visualization

    Pantheon is a project developed by the Macro Connections group at The MIT Media Lab that’s collecting,

    analyzing, and visualizing data on historical cultural popularity and production.

    ICS summer school: Scientific visualization at the interfaces Roscoff Marine station, July 28 - August 8, 2014 14

  • Introduction

    Visualization

    Definitions and aims:

    • the classical definition of visualization is as follows: the formation of mental visualimages, the act or process of interpreting in visual terms or of putting into visual form.

    • a new definition is: a tool or method for interpreting image data fed into a computerand for generating images from complex multi-dimensional data sets (1987).

    • In general, visualization is essentially a mapping process from computer representa-tions to perceptual representations, choosing encoding techniques to maximize humanunderstanding and communication.

    • The goal of a viewer might be a deeper understanding of physical phenomena or math-ematical concepts, but it also might be a visual proof of computer representations de-rived from such an initial stage.

    ICS summer school: Scientific visualization at the interfaces Roscoff Marine station, July 28 - August 8, 2014 15

    Introduction

    Definitions and aims. . .

    Herefater is a selection of distinct attempts to formulate the contents and goals of visualiza-tion processes:

    • R.A. Earnshaw: Scientific Visualization is concerned with exploring data and informa-tion in such a way as to gain understanding and insight into the data. The goal ofscientific visualization is to promote a deeper level of understanding of the data underinvestigation and to foster new insight into the underlying processes, relying on the hu-mans’ powerful ability to visualize. In a number of instances, the tools and techniquesof visualization have been used to analyze and display large volumes of, often time-varying, multidimensional data in such a way as to allow the user to extract significantfeatures and results quickly and easily.

    • J. Foley and B. Ribarsky: A useful definition of visualization might be the binding (ormapping) of data to representations that can be perceived. The types of bindings couldbe visual, auditory, tactile, etc., or a combination of these.

    ICS summer school: Scientific visualization at the interfaces Roscoff Marine station, July 28 - August 8, 2014 16

  • Introduction

    Definitions and aims. . . (2)

    • R. Friedhoff and T. Kiley The standard argument to promote scientific visualization isthat today’s researchers must consume ever higher volumes of numbers that gush, asif from a fire hose, out of supercomputer simulations or high-powered scientific instru-ments. If researchers try to read the data, usually presented as vast numeric matrices,they will take in the information at snail’s pace. If the information is rendered graphi-cally, however, they can assimilate it at a much faster rate.

    • B. McCormick, T. DeFanti, and M. Brown: Visualization is a method of computing.It transforms the symbolic into the geometric, enabling researchers to observe theirsimulations and computations. Visualization offers a method for seeing the unseen.It enriches the process of scientific discovery and fosters profound and unexpectedinsights. In many fields it is already revolutionizing the way scientists do science.

    ICS summer school: Scientific visualization at the interfaces Roscoff Marine station, July 28 - August 8, 2014 17

    Introduction

    Definitions and aims. . . (3)

    • P.K. Robertson: Underlying the concept of visualization is the idea that an observercan build a mental model, the visual attributes of which represent data attributes in adefinable manner. This raises several questions:

    � What mental models most effectively carry various kinds of informations ?� Which definable and recognizable visual attributes of these models are most useful

    for conveying specific information either independently or in conjunction with otherattributes ?

    � How can we most effectively induce chosen mental models in the mind of an ob-server ?

    � How can we provide guidance on choosing appropriate models and their attributesto a human or automated display designer ?

    Choosing the appropriate representation can provide the key to critical and compre-hensive appreciation of the data, thus benefiting subsequent analysis, processing, ordecision making.

    ICS summer school: Scientific visualization at the interfaces Roscoff Marine station, July 28 - August 8, 2014 18

  • Introduction

    Definitions and aims. . . (4)

    • E. Ignatius and H. Senay: In their understanding, scientific data visualization supportsscientists and relations, prove or disprove hypotheses, and discover new phenomenausing graphical techniques.The primary objective in data visualization is to gain insight into an information spaceby mapping data onto graphical primitives.

    • R.B. Haber and D.A. McNabb: they defined visualization as the use of computer imag-ing technology as a tool for comprehending data obtained by simulation or physicalmeasurement. In their understanding Visualization technology is based on the integra-tion of older technologies, including computer graphics, image processing, computervision, computer-aided design geometric modeling, approximation theory, perceptualpsychology, and user interface studies.

    • S. Wehrend and C. Lewis Progress in scientific visualization can be accelerated if work-ers could more readily find visualization techniques relevant to a given problem.

    ICS summer school: Scientific visualization at the interfaces Roscoff Marine station, July 28 - August 8, 2014 19

    Introduction

    Definitions and aims. . . (5)

    • P. Robertson and L. De Ferrari: The size, dimensionality and the number of parametersof data sets can be expected to increase significantly. This is accompanied by a corre-sponding increase in the complexity of the systems being modeled. Many computergraphics and image-processing techniques are applicable to the visualization of thesedata and new ways of representing and interacting with data are evolving. Our abilityto exploit these techniques are limited by the lack of systematic strategies which, tak-ing into account both the characteristics of the data and the interpretation aims of thescientist, can guide the scientist in their use.Our goal is the systematic, and therefore potentially automatic, generation of visualrepresentations, given a description of all the important data characteristics and thespecification of the user’s interpretation aims. The interpretation aims define whatcharacteristics of the data, or relations between data variables, the user is interested inanalyzing by means of visual representation.

    ICS summer school: Scientific visualization at the interfaces Roscoff Marine station, July 28 - August 8, 2014 20

  • Introduction

    Scientific visualization

    • Scientific visualization is concerned with representing scientific phenomena graphi-cally, as a means of gaining understanding and insight into the system that is studied inways previously impossible.

    � This may be part of the research process: graphics are used for understanding,interpretation, exploration, and may guide the direction of the research itself, fromtweaking parameters to raising new questions.

    � It may be used in production environments, such as medical procedures, as onepart of a larger mission.

    � It may be used for educational purposes, in the classroom, etc.

    ICS summer school: Scientific visualization at the interfaces Roscoff Marine station, July 28 - August 8, 2014 21

    Introduction

    Scientific visualization

    What happens when display precedes data analysis !

    ICS summer school: Scientific visualization at the interfaces Roscoff Marine station, July 28 - August 8, 2014 22

  • Introduction

    An emerging science

    • Scientific visualization is a field in and of itself.� It involves research in computer graphics, image processing, high performance com-

    puting, mathematics, and other areas.

    � Its strategy is to develop fundamental ideas leading to general tools for real appli-cations. This pursuit is multidisciplinary in that it uses the same techniques acrossmany areas of study.

    ICS summer school: Scientific visualization at the interfaces Roscoff Marine station, July 28 - August 8, 2014 23

    Introduction

    New science, . . . old concern

    The use of visualization to present information is not new, it has been used in maps, scien-tific drawings, and data plots for over a thousand years.

    A rigid obstacle in flowing water creates wake turbulence, sketch by Leonardo da Vinci in 1509.

    (credit: image The Royal Collection, HRM Queen Elizabeth II).

    ICS summer school: Scientific visualization at the interfaces Roscoff Marine station, July 28 - August 8, 2014 24

  • Introduction

    Visualization in scientific computing

    • In October 1986, the Division of Advanced Scientific Computing (DASC) of the Na-tional Science Foundation (NSF) sponsored a meeting of a newly-organized Panel onGraphics, Image Processing and Workstations to provide input to DASC on establish-ing and ordering priorities for acquiring graphics and image processing hardware andsoftware at research institutions doing advanced scientific computing, with particularattention to NSF-funded supercomputer centers.

    • Supercomputer centers had been requesting funds to provide graphics hardware andsoftware to scientific users but, in point of fact, existing tools were not adequate tomeeting their needs.

    • Computer Graphics and image processing are within computer science; the applica-tion of computers to the discipline sciences is called computational science. Applyinggraphics and imaging techniques to computational science is a while new area of en-deavor, which Panel members termed Visualization in Scientific Computing.

    ICS summer school: Scientific visualization at the interfaces Roscoff Marine station, July 28 - August 8, 2014 25

    Introduction

    Applications fields

    The interplay between application areas and specific problem-solving visualization tech-niques is emphasized by several major themes in: Engineering (CFD, FEA), Electronic De-sign Automation, Simulation, Medical Imaging, Geospatial, RF Propagation, Meteorology,Hydrology, Data Fusion, Ground Water Modeling, Oil and Gas Exploration and Production,Finance, Data Mining, etc.

    • Uncertainty Visualization: seeks to provide a visual representation of errors and uncer-tainty for three-dimensional visualizations. Challenges include the inherent difficultyin characterizing comparisons among different data sets and the corresponding errorand uncertainty in the experimental, simulation, and/or visualization processes.

    "True genius resides in the capacity for evaluation of uncertain, hazardous, and conflicting information."

    (W. Churchill)

    • Integrated Multi-field Visualization: The output of computational science simulationsis typically a combination of fields involving a number of scalar fields, vector fields,or tensor fields. Similarly, data collected experimentally is often multi-field in nature.Multi-scale problems with scale differences of several orders of magnitude pose chal-lenging problems for data analysis.

    ICS summer school: Scientific visualization at the interfaces Roscoff Marine station, July 28 - August 8, 2014 26

  • Introduction

    Applications fields

    • Environmental Scientific Visualization: refers to a collection of visualization applica-tions that deal with captured and simulated data in climate research, atmospheric andenvironmental sciences, earth science, geophysics and seismic research, oceanography,and the energy industry. Research in these applications has a huge impact on mankind,and typically faces serious challenges of data deluge (e.g., very large volumes of multi-spectral satellite images, large data collections from different sensor types, ensemblecomputation of very large simulation models, scattered, time-varying, multi-modal datain seismic research).

    • Scientific Foundation of Visualization: Many fundamental questions about the theoret-ical and perceptual aspects of visualization remain unanswered, such as, why is onevisual design more effective than another, can visual designs be optimized and how,what is the role of visualization in a scientific workflow and how can such a role beformalized, can visualization quality be measured quantitatively and how, and what isthe most informative way to conduct perceptual and usability studies involving domainexperts?

    ICS summer school: Scientific visualization at the interfaces Roscoff Marine station, July 28 - August 8, 2014 27

    Introduction

    Section 1.2Definitions and purposes

    ICS summer school: Scientific visualization at the interfaces Roscoff Marine station, July 28 - August 8, 2014 28

  • Introduction

    Scientific visualization

    Definition and purposes of scientific visualization:

    • SciVis is a very important part of visualization, as the visualization of experiments andphenomena is as old as science itself.

    • SciVis is the transformation, selection, or representation of data from simulations orexperiments, with an implicit or explicit geometric structure, to allow the exploration,analysis, and understanding of the data.

    • SciVis focuses and emphasizes the representation of higher order data using primarilygraphics and animation techniques.

    • Traditional areas of scientific visualization include: flow visualization, medical visual-ization, astrophysical visualization, and chemical visualization.There are several different techniques to visualize scientific data, with isosurface recon-struction and direct volume rendering being the more common.

    ICS summer school: Scientific visualization at the interfaces Roscoff Marine station, July 28 - August 8, 2014 29

    Introduction

    Motivations

    • Through the availability of increasingly powerful computers with increasing amounts ofinternal and external memory, it is possible to investigate incredibly complex dynamicsby means of ever more realistic simulations.However, this brings with it vast amounts of data.

    • To analyze these data it is imperative to have software tools which can visualize thesemulti-dimensional data sets.

    • Comparing this with experiment and theory it becomes clear that visualization of sci-entific data is useful yet difficult.For complicated, time-dependent simulations, the running of the simulation may involve the calculation

    of many time steps, which requires a substantial amount of CPU time , and memory resources are still

    limited, one cannot save the results of every time step. Hence, it will be necessary to visualize and store

    the results selectively in ‘real time’ so as to avoid recomputing the dynamics.

    ICS summer school: Scientific visualization at the interfaces Roscoff Marine station, July 28 - August 8, 2014 30

  • Introduction

    Motivations (2)

    • The main reasons for scientific visualization are the following ones :

    � it will compress a lot of data into one picture (data browsing),

    � it can reveal correlations between different quantities both in space and time,

    � it can furnish new space-like structures beside the ones which are already knownfrom previous calculations,

    � it opens up the possibility to view the data selectively and interactively in ‘realtime’. By following the formation and the deformation as well as the motions ofthese structures in time, one will gain insight into the complicated dynamics.

    • The aim is to integrate the simulation codes into a visualization environment in orderto analyze the data ’real time’ and to by-pass the need to store every intermediate resultfor later analysis: the simulation is distributed over a set of high-performance computersand the actual visualization is done on a graphical distributive workstation.It is also very useful to have the possibility to interactively change the simulation pa-rameters and immediately see the effect of this change through the new data.

    ICS summer school: Scientific visualization at the interfaces Roscoff Marine station, July 28 - August 8, 2014 31

    Introduction

    Questions

    • The discussion is focussed on the following questions:

    � What is the improvement in the understanding of the data as compared to the situ-ation without visualization?

    � Which visualization techniques are suitable for one’s data?

    � Are direct volume rendering techniques to be preferred over surface rendering tech-niques?

    � Can current techniques, like streamline and particle advection methods, be used toappropriately outline the known visual phenomena in the system?

    ICS summer school: Scientific visualization at the interfaces Roscoff Marine station, July 28 - August 8, 2014 32

  • Introduction

    Concerns

    • The success of visualization not only depends on the results which it produces, but alsodepends on the environment in which it has to be done.

    • This environment is determined by the available hardware, like graphical workstations,disk space, color printers, video editing hardware, and network bandwidth, and by thevisualization software.For example, the graphical hardware imposes constraints on interactive speed of visu-alization and on the size of the data sets which can be handled.

    • Many different problems encountered with visualization software must be taken intoaccount: the user interface, programming model, data input, data output, data manip-ulation facilities, and other related items are all important.The way in which these items are implemented determines the convenience and effec-tiveness of the use of the software package as seen by the scientist.

    ICS summer school: Scientific visualization at the interfaces Roscoff Marine station, July 28 - August 8, 2014 33

    Introduction

    Perception of visuals

    • Visual attributes:� a clever choice of visual attributes is paramount to visualization process� redundancy of visual attributes enhances interpretability

    • Interpretation of visual attributes:� natural to interpret, simple,� acquired reactions to visual attributes: through education (color ranking, isosur-

    faces, etc)

    � illusory visual attributes

    • Color:� psychophysical process: relates to wavelengths, spectral distribution and amount

    of light entering eye (physics) and perceived sensation with no linear relation tophysics (psychology).

    � no complete theory, variety of color spaces, perceptual dimensions of color (hue,saturation, intensity).

    ICS summer school: Scientific visualization at the interfaces Roscoff Marine station, July 28 - August 8, 2014 34

  • Introduction

    Perception of visuals

    M.C. Escher optical illusion.

    ICS summer school: Scientific visualization at the interfaces Roscoff Marine station, July 28 - August 8, 2014 35

    Introduction

    Skills

    A student who wants to specialize in visualization needs a broadly based background.

    Ideally, he or she will need:

    • a strong mathematical background, with calculus, linear algebra, ordinary and partialdifferential equations, and numerical analysis.

    • in addition to a regular computer science background, the student would also need astrong grounding in computer graphics plus some experience in computer animation.

    • he or she should have some art courses such as graphics design, photography, drawing,or painting to obtain the general principles of design from an artistic viewpoint. Plus,the student need some science courses such as biology, chemistry, or physics, to beable to communicate with the scientists.

    While it might be extremely difficult, if not impossible to fit all of this into an undergraduatecurriculum, a program oriented towards a Masters Degree in Visualization would be quitefeasible . . .

    ICS summer school: Scientific visualization at the interfaces Roscoff Marine station, July 28 - August 8, 2014 36

  • Introduction

    Skills

    In science, novelty emerges only with difficulty, manifested by resistance, against a back-ground provided by expectations. Thomas Kuhn (1922-1996)

    The eye sees only what the mind is prepared to comprehend. Henri Bergson (1859-1941)

    ICS summer school: Scientific visualization at the interfaces Roscoff Marine station, July 28 - August 8, 2014 37

    Introduction

    Section 1.3Technological aspects

    ICS summer school: Scientific visualization at the interfaces Roscoff Marine station, July 28 - August 8, 2014 38

  • Introduction

    Visualization techniques

    • A visualization technique is used to create and manipulate a graphic representationfrom a set of data.

    • Some techniques will be appropriate only for specific applications while others aremore generic and can be used in many applications.

    • It should always be kept in mind that the goal of visualization is not to understand thedata but to understand the underlying phenomenon.

    • There are three parts to a visualization technique:1. The construction of an empirical model from the data. This construction may in-

    volve sampling theory considerations, and general mathematical interpolation / ap-proximation schemes. If the data contains errors then this must be taken into ac-count.

    2. The selection of some schematic means of depicting the model as some abstractvisualization object, such as an image of a contour map.

    3. The rendering of the image on a graphics display.

    ICS summer school: Scientific visualization at the interfaces Roscoff Marine station, July 28 - August 8, 2014 39

    Introduction

    Visualization techniques

    • For many areas of science and engineering, visualization has become more than aconvenient tool: it has become a necessity for interpreting the enormous amounts ofdata being produced by large-scale instrumentation, experiments and simulations.

    • Fortunately, scientific visualization benefits from technological outcomes.For example, one of the most creative and useful ways of presenting scientific data isthe large-scale (tiled) display.Ranging from tabletop versions to fully immersive 3D stereo virtual reality environ-ments, these displays enable users to explore features that may be hard or impossibleto identify with conventional, personal computers.

    ICS summer school: Scientific visualization at the interfaces Roscoff Marine station, July 28 - August 8, 2014 40

  • Introduction

    Visualization devices

    Graphics cards: the primary suppliers of the GPUs (video chips or chipsets) used in videocards are AMD and Nvidia.

    Nvidia GeForce GTX Titan Z AMD Radeon R9 295X2

    ICS summer school: Scientific visualization at the interfaces Roscoff Marine station, July 28 - August 8, 2014 41

    Introduction

    Visualization devices

    Graphics cards: specifications and features

    Nvidia GeForce GTX Titan Z AMD Radeon R9 295X2dual chip dual chip

    Stream processors 5,760 5,632Engine clock 705 Mhz 1018 MhzCompute performances 21.7 Tflops 11.5 TflopsTexture fill-rate 338 GT/s 358.3 GT/sMemory configuration 12 GB 8 GB

    Retail price 2,999 USD 1,499 USD

    ICS summer school: Scientific visualization at the interfaces Roscoff Marine station, July 28 - August 8, 2014 42

  • Introduction

    Visualization techniques

    • Large-screen displays: can be found in any number of industries and research centers.The ability to display created environments at "full scale" can be of tremendous valueto researchers and scientists.These displays can be curved for an even more immersive experience.

    Immersive environment for design review created by a large-screen curved display.

    ICS summer school: Scientific visualization at the interfaces Roscoff Marine station, July 28 - August 8, 2014 43

    Introduction

    Visualization techniques

    Large display (6.5 ⇥ 2.5 m) in use at the Institute for Scientific Computing and Simulation (UPMC, Paris).

    ICS summer school: Scientific visualization at the interfaces Roscoff Marine station, July 28 - August 8, 2014 44

  • Introduction

    Visualization techniques

    • Immersive environments: this system allows the user to walk in the space, providing atotally immersive, high-resolution experience.Built from 4 to 6 walls with rear projection, the user experiences the environment infull scale and in real time.

    Research in immersive environments works to virtually place the viewer in a space.

    ICS summer school: Scientific visualization at the interfaces Roscoff Marine station, July 28 - August 8, 2014 45

    Introduction

    Visualization techniques

    • Active shutter 3D system: is a technique of displaying stereoscopic 3D images.It works by only presenting the image intended for the left eye while blocking theright eye’s view, then presenting the right-eye image while blocking the left eye, andrepeating this so rapidly that the interruptions do not interfere with the perceived fusionof the two images into a single 3D image.

    • Real-time tracking: concerns the positional measurement of bodies (subjects or objects)that move in a defined space. Position and/or orientation of the body can be measured.3 degrees of freedom (3DOF or 3D) tracking consists in measuring only x, y, z posi-tions. If position (3 coordinates) and orientation (3 independent angular coordinates)are measured simultaneously, this is called 6 degrees of freedom (6DOF or 6D) track-ing.

    • Haptic technology: is a tactile feedback technology which recreates the sense of touchby applying forces, vibrations, or motions to the user.

    ICS summer school: Scientific visualization at the interfaces Roscoff Marine station, July 28 - August 8, 2014 46

  • Introduction

    Software packages• Non-exhaustive set of tools which cover the functions needed by most researchers for

    their scientific visualization needs.

    1. Matlab: is a numerical computing package which has gained wide popularity in thescience and engineering communities. It provides a large set of plotting options, awwell as the standard basic visualization tools.

    2. VTK-Paraview: the Visualization Toolkit is an open source set of graphics libraries,accessible using C++, Tcl, Perl, Python, or Java. ParaView is an open source, freelyavailable visualization application built on top of VTK.

    3. OpenGL: the Open Graphics Library is a standard specifying an API for applicationsthat produce 2-d and 3-d computer graphics.

    4. Open Scene Graph: is an open source high performance 3-d graphics toolkit. Ascene graph is a hierarchical representation of all elements of a visual scene Ð onceyou have constructed this directed graph, the underlying libraries will traverse it andrender the objects represented by it.

    5. Maya: is an interactive, professional 3-d graphics, modeling, and animation pro-gram, used in the movie, television, and game industries, as well as for design andarchitectural rendering.

    ICS summer school: Scientific visualization at the interfaces Roscoff Marine station, July 28 - August 8, 2014 47

    Introduction

    Software packages (2)

    The table below shows where the packages fall in the visualization pipeline:

    1. Produce input data: use a CFD simulation program

    2. Analyze, filter, reformat: compute the gradient of pressure

    3. Apply scientific visualization techniques: compute the pathlines

    4. Map to geometry: produce a set of polygons representing the domain

    5. Rendering: create an image from a virtual camera of the polygonal model

    6. Viewing: use a web browser to view the resulting image

    Tool input data analysis sci-vis geometry rendering viewingexperiments xMatlab x x x x x xVTK-Paraview x x x x x xOpenGL x xOpenScene Graph x xMaya x x

    ICS summer school: Scientific visualization at the interfaces Roscoff Marine station, July 28 - August 8, 2014 48

  • Introduction

    Software packages (3)

    Paraview (Sandia Natl. Lab., Los Alamos Natl. Lab., Kitware Inc.).

    Visualization of the result of OpenFOAM combustion calculations (background color represents the

    temperature, the arrows represents the gas velocity and their colors represent the concentration of oxygen.

    ICS summer school: Scientific visualization at the interfaces Roscoff Marine station, July 28 - August 8, 2014 49

    Introduction

    Software packages (4)OpenSceneGraph (open source 3D application programming interface).

    TerrainView is the free 3D viewer of ViewTec for interactive visualization od 3D data.

    ICS summer school: Scientific visualization at the interfaces Roscoff Marine station, July 28 - August 8, 2014 50

  • Introduction

    Software packages (5)

    Maya Autodesk (3D computer graphics software).

    Autodesk Maya 2013 (Alias Systems Corp., Autodesk Inc.).

    ICS summer school: Scientific visualization at the interfaces Roscoff Marine station, July 28 - August 8, 2014 51

    Introduction

    Software packages (5)Ensight (FEA and CFD post-processing).

    Ensight 10 (CEI-Computational Engineering International, Inc.).

    ICS summer school: Scientific visualization at the interfaces Roscoff Marine station, July 28 - August 8, 2014 52

  • Chapter IICOMPUTER GRAPHICS PRIMER

    ICS summer school: Scientific visualization at the interfaces Roscoff Marine station, July 28 - August 8, 2014 53

    Computer Graphics

    Section 1.1Introduction to CG

    ICS summer school: Scientific visualization at the interfaces Roscoff Marine station, July 28 - August 8, 2014 54

  • Computer Graphics

    Introduction

    Computers have powerful graphics processors to support sophisticated applications. Butthese involve assertive skills in computer graphics and "elementary" mathematics, in partic-ular concerning :

    1. the geometric transformations:

    • affine geometry,• projections,• homogeneous coordinates,• quaternion based representation.

    2. the quest for realism:the purpose of visualization algorithms is to convince the user that the graphical repre-sentation of a 3D model is a slightly altered vision of reality. This involves:

    • color coding• rendering equations

    ICS summer school: Scientific visualization at the interfaces Roscoff Marine station, July 28 - August 8, 2014 55

    Computer Graphics

    Processing demands

    • Scientific visualization and (obviously) computer games are some of the most demand-ing applications at present;

    • To make objects appear on the display, these applications send polygons to a graphicsprocessor. These polygons have various attributes (like color, texture, and transparency)and are displayed with various technologies (antialiasing, smooth shading, and others).

    • For a polygon to be displayed, certain pixels must be colored in certain ways. Thus,polygon rate (the number of polygons displayed per second) and fill rate (the numberof pixels colored per second) are both used to measure performance.

    • But complex scenes for interactive display can easily contain 1 million polygons, ofwhich maybe 100,000 are visible (the others being hidden by things in front of themor outside the field of view), each occupying perhaps 10 pixels on average. In manycases, a single polygon occupies less than a single pixel.

    • This happens in part because complex shapes are modeled with polygonal meshes.

    ICS summer school: Scientific visualization at the interfaces Roscoff Marine station, July 28 - August 8, 2014 56

  • Computer Graphics

    The graphics pipelineThe term graphics pipeline is used because the transformation from mathematical modelto pixels on the screen involves multiple steps, and in a typical architecture, these are per-formed in sequence; the results of one stage are pushed on to the next stage so that the firststage can begin processing the next polygon immediately.

    ptg11539634

    1.6 The Graphics Pipeline 15

    Application

    Texturedata

    Polygonmeshes

    Geometrictransfor-mations

    Rasterizeand light

    Imageassembly Display

    FragmentsGraphics card

    Polygonmesh

    vertices

    View

    Lightingdata

    Polygondata

    Vertexdata

    Figure 1.8: The graphics pipeline, version 1.

    of one stage are pushed on to the next stage so that the first stage can begin pro-cessing the next polygon immediately.

    Figure 1.8 shows a simplified view of this pipeline: Data about the scene beingdisplayed enters at various points to produce output pixels.

    For many purposes, the exact details of the pipeline do not matter; one canregard the pipeline as a black box that transforms a geometric model of a sceneand produces a pixel-based perspective drawing of those polygons. (Parallel-projection drawings are also possible, but we’ll ignore these for the moment.)On the other hand, some understanding of the nature of the processing is valuable,especially in cases where efficiency is important. The details of the boxes in thepipeline will be revealed throughout the book.

    Even with this simple black box you can write a great many useful programs,ignoring all physical considerations and treating the transformation from modelto image as being defined by the black box rather than by physics (like the non-quadratic light-intensity falloff mentioned above).

    The past decade has, to some degree, made the pipeline shown aboveobsolete. While graphics application programming interfaces (APIs) of the pastprovided useful ways to adjust the parameters of each stage of the pipeline, thisfixed-function pipeline model is rapidly being superseded in many contexts.Instead, the stages of the pipeline, and in some cases the entire pipeline, are beingreplaced by programs called shaders. It’s easy to write a small shader that mimicswhat the fixed-function pipeline used to do, but modern shaders have grownincreasingly complex, and they do many things that were impossible to do on thegraphics card previously. Nonetheless, the fixed-function pipeline makes a goodconceptual framework onto which to add variations, which is how many shadersare in fact created.

    1.6.1 Texture Mapping and ApproximationOne standard component of the black box is the texture map. With texture map-ping, we take a polygon (or a collection of polygons) and assign a color to eachpoint via a lookup in a texture image; the technique is a little like applying a stencil

    The graphics pipeline.

    ICS summer school: Scientific visualization at the interfaces Roscoff Marine station, July 28 - August 8, 2014 57

    Computer Graphics

    Basic graphics systems

    • a typical graphics program runs on the CPU, processing input from the devices andsending instructions to the GPU describing what should be displayed;

    • graphical models are created in some convenient coordinate system;� for example, a cube that is to be used as one of a pair of dice might be modeled

    as a unit cube, centered at the origin in 3-space. This coordinate system is calledmodeling space or object space.

    � This cube is then placed in a scene: a model of a collection of objects and lightsources. The resultant coordinates of the cube are said to be in world space.

    � The location and direction of a virtual camera is also given in world space, as are thepositions and physical characteristics of virtual lights. Consider a set of coordinateaxes whose origin is at the center of the virtual camera and whose negative z-axispoints along the camera view. All objects in world space have coordinates in thiscoordinate system as well; these coordinates are called camera-space coordinates.

    ICS summer school: Scientific visualization at the interfaces Roscoff Marine station, July 28 - August 8, 2014 58

  • Computer Graphics

    Building blocks for rendering

    • The physics of light: light propagates along straight-line rays in empty space, stoppingwhen it meets a surface, Light bounces from any shiny surface that it meets, followingan "angle of incidence equals angle of reflection" model, or is absorbed by the surface.

    • Materials: assumption about objects is that they are composed of materials that eitherreflect or absorb light at their surfaces. Because we assume that light only interactswith the surfaces of materials, we represent objects by their surfaces, which are in turngenerally represented by polyhedra with triangular faces.

    • The human visual system: our visual system organizes the patterns of light and darknessthat arrive at the eye and attempts to make sense of them. The visual system is extremelywell adapted to bad input !an understanding of the perception process lets us make informed decisions about whatkinds of approximations we can make while still retaining visual fidelity.

    • Mathematics: in addition to basic knowledge in algebra and arithmetic, you need tobe familiar witg trigonometry, linear algebra, integration and differentiation, geometricand topological notions, etc.

    ICS summer school: Scientific visualization at the interfaces Roscoff Marine station, July 28 - August 8, 2014 59

    Computer Graphics

    Data structures for graphics

    Certain data structures pop up repeatedly in graphics applications: they address fundamen-tal underlying ideas like surfaces, space, and scene structure.

    • Triangle meshes or triangulations: are generally used to represent surfaces, so a mesh isnot just a collection of unrelated triangles, but rather a network of triangles that connectto one another through shared vertices and edges to form a single continuous surface.Connectivity: indexed meshes are the most common in-memory representation of tri-angle meshes, but triangle strips may be more efficient.

    • Scene graphs: a universal problem in graphics applications is arranging the objectsin the desired positions. This is done using transformations, but complex scenes cancontain a great many transformations and organizing them well makes the scene mucheasier to manipulate.

    • Spatial data structures: related to the ability to quickly locate geometric objects inparticular regions of space.

    � structures that group objects together into a hierarchy are object partitioning schemes;� structures that divide space into disjoint regions are space partitioning schemes.

    ICS summer school: Scientific visualization at the interfaces Roscoff Marine station, July 28 - August 8, 2014 60

  • Computer Graphics

    Triangular meshes

    ICS summer school: Scientific visualization at the interfaces Roscoff Marine station, July 28 - August 8, 2014 61

    Computer Graphics

    Section 1.2The Quest for Realism

    ICS summer school: Scientific visualization at the interfaces Roscoff Marine station, July 28 - August 8, 2014 62

  • Computer Graphics

    Rendering example

    An image created using POV-RAY

    ICS summer school: Scientific visualization at the interfaces Roscoff Marine station, July 28 - August 8, 2014 63

    Computer Graphics

    Rendering example

    Intermixing virtuality and reality

    ICS summer school: Scientific visualization at the interfaces Roscoff Marine station, July 28 - August 8, 2014 64

  • Computer Graphics

    Rendering

    • Rendering: process of generating an image from a model by means of computer algo-rithms.

    • A scene file contains objects in a strictly defined language or data structure; it wouldcontain geometry, viewpoint, texture, lighting, and shading information as a descriptionof the virtual scene.

    • the general challenges to overcome in producing a 2D image from a 3D representationstored in a scene file are outlined as the graphics pipeline along a rendering device,such as a GPU.A GPU is a purpose-built device able to assist a CPU in performing complex rendering calculations.

    • Many rendering algorithms have been designed, and software used for rendering mayemploy a number of different techniques to obtain a final image.

    ICS summer school: Scientific visualization at the interfaces Roscoff Marine station, July 28 - August 8, 2014 65

    Computer Graphics

    Local vs. global illumination

    • Local illumination: is only the light provided directly from a light source (such as a spotlight). Direct light is emitted from a light source and travels in a straight path to theilluminated point (either on a surface or in a volume). With direct illumination onlyeach light source’s contribution is used to calculate the overall light contribution to anygiven illuminated point.

    • Global illumination: is a general name for a group of algorithms used in 3D computergraphics that are meant to add more realistic lighting to 3D scenes. Such algorithmstake into account not only the light which comes directly from a light source (directillumination), but also subsequent cases in which light rays from the same source arereflected by other surfaces in the scene, whether reflective or not (indirect illumination)

    • Images rendered using global illumination algorithms appear more photorealistic thanimages rendered using only direct illumination algorithms, but computationally moreexpensive.

    ICS summer school: Scientific visualization at the interfaces Roscoff Marine station, July 28 - August 8, 2014 66

  • Computer Graphics

    Rendering classes

    • A few classes of more-efficient light transport modelling techniques have emerged:� rasterization: geometrically projects objects in the scene to an image plane, without

    advanced optical effects; it is the rendering method used by all graphics cards;

    � ray casting considers the scene as observed from a specific point of view, calculatingthe observed image based only on geometry and very basic optical laws of reflectionintensity, and perhaps using Monte Carlo techniques to reduce artifacts. In raycasting the geometry which has been modeled is parsed pixel by pixel, line by line,from the point of view outward, as if casting rays out from the point of view;

    � ray tracing is similar to ray casting, but employs more advanced optical simulation,and usually uses Monte Carlo techniques to obtain more realistic results at a speedthat is often orders of magnitude slower;

    � radiosity is a method which attempts to simulate the way in which directly illu-minated surfaces act as indirect light sources that illuminate other surfaces. Thisproduces more realistic shading and seems to better capture the ’ambience’.

    ICS summer school: Scientific visualization at the interfaces Roscoff Marine station, July 28 - August 8, 2014 67

    Computer Graphics

    Color perception

    • To achieve this level of realism (accuracy), the sensation (perception) of colors corre-sponding to the observation of a digital image must be very close to the sensation thatthe viewer would feel in the real world.

    • The perception of color by humans depends on the amount of light that reaches theeye. Strength (i.e. quantity) is determined by the radiance of visible points. Thus, eachobject in a 3d scene reflects incident light by changing its color or intensity.

    • Reflexion models describe both the color and the evolution of this color when a pa-rameter of the acquisition is changed.

    • Another important parameter of a surface is its roughness (or its smoothness, according)which determines the specular reflection.

    • To model these complex phenomena, it is essential to know the structure of mathemat-ical or physical interactions between light and object, and its action on the eye (theoryof electromagnetic waves).

    ICS summer school: Scientific visualization at the interfaces Roscoff Marine station, July 28 - August 8, 2014 68

  • Computer Graphics

    Nature and properties of light

    • Dual nature: light, as observed, can be manifest as a wave or a particle.

    • Interactions: light travels in both a vacuum as well as most media, and its interactionwith matter is observable. Its behavior can be categorized in several ways:

    � Reflection: is the throwing or bouncing back of light as it hits a surface;

    � Refraction: is the bending of light as it crosses from one medium to another;

    � Transmission: is the conduction or conveying of light through a medium;

    � Diffraction: is the apparent bending of light around an edge that results in intensityand directional changes.

    � Interference: is the wavelike interaction of light that results in amplification, cancel-lation, or composite generation of the resultant light wave;

    ICS summer school: Scientific visualization at the interfaces Roscoff Marine station, July 28 - August 8, 2014 69

    Computer Graphics

    Nature and properties of light

    • Interactions (cont’d):

    � Scattering: is the spreading or dispersal of light as it interacts with matter or media;

    � Diffusion: is the even scattering of light by reflection from a surface.

    � Absorption: is the nonconductance or retention of light by a matter or media thatdoes not result in either reflection or transmission;

    � Polarization: is the selective transmission of light based on its orientation.

    � Dispersion: is the effect of light being separated or broken into different wavelengthsbecause the light passed through a second medium that has a different refractionindex from the first.

    • A light interaction could have one or more of these manifestations happening at thesame time.

    ICS summer school: Scientific visualization at the interfaces Roscoff Marine station, July 28 - August 8, 2014 70

  • Computer Graphics

    Light behavior

    • Light is radiation: it obeys the rules of radiation. Radiation has properties and qualitiesthat are quantifiable and well as predictable.

    � Thermal radiation: depends on the temperature of the object emitting it. Sunlightand light from burning objects are examples.

    � Reflected radiation: is reflected off objects and is indirectly distributed.

    • Light is the emission of energy as it is transferred around and seeks a lower, more stablestage (electronic spectrum). The property of fading over a distance (think of heat) iscalled the inverse square law.Formally stated, irradiance (power per unit expressed in watts/meter2) is inversely pro-portional to the square of the distance from the source in the absence of media scatter-ing and absorption.

    • Wein’s law: states that the wavelength of the peak radiance decreases linearly as thetemperature increases. It could also be defined as "The hotter the object gets, the bluerthe radiation it emits."

    ICS summer school: Scientific visualization at the interfaces Roscoff Marine station, July 28 - August 8, 2014 71

    Computer Graphics

    Light behavior

    Wein’s law:

    The wavelength at which most radiation is emitted is inversely proportional to the absolute temperature.

    ICS summer school: Scientific visualization at the interfaces Roscoff Marine station, July 28 - August 8, 2014 72

  • Computer Graphics

    Color as a tri-stimulus medium

    • Color is a sensation produced in the brain in response to the incidence of light on theretina of the eye.

    • The sensation of color is caused by differing qualities of the light emitted by lightsources or reflected by objects. It may be defined in terms of :

    � the observer: the definition is referred to as perceptual and subjective (i.e., it de-pends on the observer’s judgment).

    � the characteristics of light by which the individual is made aware of objects or lightsources.

    • However, the light received by the retina is composed of a spectrum of different ener-gies in different wavelengths. Only at the eye, the particular spectrum is translated tothe experience of a particular color. Moreover, many different spectra are perceived asthe same color (metamerism, Newton ca. 1704).

    • both specifications can be accurately defined in a three-dimensional space.

    ICS summer school: Scientific visualization at the interfaces Roscoff Marine station, July 28 - August 8, 2014 73

    Computer Graphics

    Perceived colors: observer

    • The three components that specify color in terms of the observer are:

    1. Hue: specifies the actual "color" that we see (red, yellow, etc.)

    2. Intensity/lightness/brightness: specifies the achromatic (luminance) component, whichis the amount of light emitted or reflected by the color. It can be thought of as "howmuch black is mixed in the color".The term intensity refers to achromatic colors. The term lightness refers to objects,and is associated with reflected light. The term brightness is used for light sources,and is associated with emitted light.

    3. Saturation: specifies purity in terms of mixture with white, or vividness of hue. It isthe degree of difference from a gray of the same lightness or brightness.Increased lightness causes a perceived decreased saturation, and vice versa.

    ICS summer school: Scientific visualization at the interfaces Roscoff Marine station, July 28 - August 8, 2014 74

  • Computer Graphics

    Perceived colors: light

    • The three components that specify color in terms of light are:

    1. Dominant wavelength: specifies the actual "color" that we see, and corresponds tothe subjective notion of hue.

    2. Luminance: specifies the amount of light or reflection. For an achromatic light it isthe light’s intensity. For a chromatic color it corresponds to the subjective notion oflightness or brightness.

    3. Purity: specifies the spectral distribution that produces a certain color of light. It isthe proportion of pure light of the dominant wavelength and white light needed todefine the color. Purity corresponds to the perceptual notion of saturation.

    • A particular color can be described uniquely by three components even though it is aresponse to light, which is an infinite-dimensional vector of energy levels at differentwavelengths. This means that the mapping between the spectral distribution of lightand the perceived color is a many-to-one mapping. Thus, many spectra are perceivedas the same color.

    ICS summer school: Scientific visualization at the interfaces Roscoff Marine station, July 28 - August 8, 2014 75

    Computer Graphics

    Human visual system

    The front-end interface of our visual system is the eye, which consists of several components:

    • The pupil controls the amount of light admittedto the eye (a camera’s aperture is modeled afterthe pupil).

    • Two lenses, the cornea, which is fixed, and avariable-focus lens, provide distance adaptation.

    • The retina, located at the back of the eye, pro-vides the first layer of "image processing" of ourvisual system.

    The retina contains five layers of cells, in charge of several early image processing tasks.The first layer contains four types of photoreceptors. These are light sensitive cells, groupedto filter different light phenomena.

    ICS summer school: Scientific visualization at the interfaces Roscoff Marine station, July 28 - August 8, 2014 76

  • Computer Graphics

    The retina

    • Approximately 120 million rods, which are achromatic light sensitive cells (i.e., theyonly see B/W), are responsible for night and other low light level vision.

    • Day time color vision is provided by approximately 8 million cones of three types,which operate like filters for different ranges of wavelength:

    1. S-type cones: short wavelength, with peak sensitivity at 440 nm (violet),

    2. M-type cones: medium wavelength, with peak sensitivity at 550 nm (green),

    3. L-type cones : long wavelength, with peak sensitivity at 570 nm (yellow)

    • Cones are mainly concentrated in the central vision center of the retina, in particular inthe fovea; rods are mainly concentrated in the periphery of the retina.

    • There are no photoreceptors in the optic disk, where the optical nerve connects pho-toreceptors in the retina to ganglion cells in the brain, transferring image signals to thebrain for further processing.

    • Four other classes of cells in the retina handle image compression and lateral inhibition.

    ICS summer school: Scientific visualization at the interfaces Roscoff Marine station, July 28 - August 8, 2014 77

    Computer Graphics

    Color vision: trichromacy

    • It is accepted among color scientists as well as psychologists, that human color percep-tion is a three-dimensional space.

    • Trichromacy starts at the retina, where the cones provide three broadband filters, tunedto three overlapping ranges of wavelength (blue, green, red filters).

    • each cone filter mechanism by itself is "colorblind" (the signal out of a particular cone filterwould be indentical whether it is the result ofthe component on the left of the peak of thefilter, or the one on the right),

    • the perceived hue depends on the three-dimensional vector of signals detected by thethree cone mechanisms in combination.

    ICS summer school: Scientific visualization at the interfaces Roscoff Marine station, July 28 - August 8, 2014 78

  • Computer Graphics

    Color models

    • A color model (color space): is a three-dimensional body used to represent some colororganization according to a particular choice of three coordinates that describe color(date back to L. Da Vinci ca. 1500).

    • The RGB space: color display monitors createdifferent colors c 2 R3 by additive mixtures ofthe three primaries Red, Green and Blue. Thevalue c

    i

    of these 3 components is the sum of therespective sensitivity functions and the incominglight:

    c

    i

    =

    Z�

    max

    min

    s

    i

    (�) ⇠(�) d� 8i = 1,2,3

    where ⇠(�) is the light spectrum and si

    repre-sent the sensitivity functions for the R,G,B sen-sors. RGB model

    ICS summer school: Scientific visualization at the interfaces Roscoff Marine station, July 28 - August 8, 2014 79

    Computer Graphics

    Materials• The understanding of light and color is important; however, what happens to that light

    after it leaves the light source and affects the objects in the scene is also important.

    • Real-world material properties can be broken down into two parts: the specular com-ponents and the diffuse components.

    • Different types of reflection are characterized by different models describing materials:1. conductive materials (metals): rapidly attenuate the incident wave, so the reflection

    is essentially a surface phenomenon;

    2. poorly conductive materials (dielectric, e.g. glass): they let the light penetratedeeply, so the description of the modeling requires modelling the optical phenom-ena in the material;

    3. optically homogeneous materials: characterized by a constant refractive index in-side;

    4. optically inhomogeneous materials: including compounds of many colorant parti-cles whose optical properties are different from those of the support material (e.g.paper, textile, paint, plastics, ...).

    ICS summer school: Scientific visualization at the interfaces Roscoff Marine station, July 28 - August 8, 2014 80

  • Computer Graphics

    Section 1.3Illumination models

    ICS summer school: Scientific visualization at the interfaces Roscoff Marine station, July 28 - August 8, 2014 81

    Computer Graphics

    Rendering equation• The rendering equation is an integral equation in which the equilibrium radiance leav-

    ing a point is given as the sum of emitted plus reflected radiance under a geometricoptics approximation.

    • The physical basis for the rendering equation is the law of conservation of energy. As-suming that L denotes radiance, we have that at each particular position and direction,the outgoing light L

    o

    is the sum of the emitted light Le

    and the reflected light which isthe sum of the incoming light L

    i

    from all directions, multiplied by the surface reflectionand cosine of the incident angle.

    ICS summer school: Scientific visualization at the interfaces Roscoff Marine station, July 28 - August 8, 2014 82

  • Computer Graphics

    Reflection

    • A reflection model describes the interaction between the light and a surface based onthe properties of the material thereof and the nature of the light and its incidence.

    • The incident light on the surface of a material can undergo various interaction there-with. In the case of an opaque surface, three phenomena occur which give the materialthe appearance that we know: the absorption, specular reflection and diffuse reflection.

    Reflection: part of the luminous flux is absorbed by the material.

    ICS summer school: Scientific visualization at the interfaces Roscoff Marine station, July 28 - August 8, 2014 83

    Computer Graphics

    Reflection model

    1. Specular reflection (speculum, mirror): produced by polished surfaces, metal contacts.Descartes’ law applies to the reflected beam. Light can only be seen in this reflectiondirection.

    The specular reflection Rs

    is given by theformula:

    R

    s

    =

    1

    4⇡

    F.D.G

    hN,LihN,V iwhere hN,Li denotes the cosine of theangle between the outer normal N andthe light direction L, and hN, V i is thecosine of the angle between N and thedirection of the observer.

    F characterizes the reflectance of the material (the ratio of the reflected flux to the incidentflux, depending on the wavelength and angle of incidence).

    ICS summer school: Scientific visualization at the interfaces Roscoff Marine station, July 28 - August 8, 2014 84

  • Computer Graphics

    Reflection model

    2. The diffuse reflection: produced by rough and matt surfaces which reflect the lightuniformly in all directions (it is necessary to consider all of these directions). Lambertmodel characterizes this type of reflection:

    R

    d

    =

    F

    0

    ,

    where F0

    is the coefficient of reflection under normal incidence.

    This approximation is valid only for metallic objects, since the reflectance spectrum ofthe object varies very little with the angle of incidence.

    The diffusion takes place at depth and the light emitted is so tinged with the colorpigments.

    ICS summer school: Scientific visualization at the interfaces Roscoff Marine station, July 28 - August 8, 2014 85

    Computer Graphics

    Illumination models

    • The Lambertian model: the oldest known model (ca. 1760) and still the most used todescribe the phenomena of reflection within the dielectric which emit a constant lightin all directions.Lambert’s law connects the intensity with the angle between the normal and the direc-tion of the incident beam:

    I

    d

    = k

    d

    I

    p

    cos ✓

    where kd

    is a coefficient of diffuse reflection, Ip

    denotes the intensity of the pointsource and cos ✓ = hN,Li.

    • Bowknight’s model (1970) includes an ambient term to illuminate the invisible parts ofthe source, but visible to the observer:

    I

    r

    = I

    a

    k

    r

    + k

    d

    I

    p

    cos ✓ , (1)

    where kr

    is a reflection coefficient for the ambient light modeled by the term Ia

    .

    • We can introduce an attenuation factor of the light fa

    = 1/d

    2 which decreases pro-portionally to the inverse of the distance between the source and the surface.

    ICS summer school: Scientific visualization at the interfaces Roscoff Marine station, July 28 - August 8, 2014 86

  • Computer Graphics

    Illumination models

    • The Phong reflection model: the intensity of specular reflection depends on the angleof incidence, the wavelength of the incident light and the properties of the material.The state equation of state is Fresnel equation.

    • Only an observer located in the angle of incidence can see the specular reflectionlight. In this model, the intensity of specular reflection is proportional to the cosine ofthe angle of reflection:

    I

    s

    = I

    p

    k

    s

    cos

    n

    � (2)

    where ks

    denotes the coefficient of re-flectivity of the surface n is an exponentwhich approach the spatial distributionof the reflected specular light.

    Spatial distribution of the reflected specular light.

    ICS summer school: Scientific visualization at the interfaces Roscoff Marine station, July 28 - August 8, 2014 87

    Computer Graphics

    Phong model

    • By adding the terms of equations (1)) and (2), we obtain the Phong reflection model:

    I = I

    a

    k

    a

    + f

    a

    I

    p

    (k

    d

    cos ✓ + k

    s

    cos

    n

    �) . (3)

    Phong specular reflection model.

    � as in Lambert’s model, this equation is written for each of the primary colors;� if multiple light sources are used, their effects are combined:

    I = I

    a

    k

    a

    +

    mX

    j=1

    f

    a

    I

    p,j

    ⇣k

    d

    cos ✓

    j

    + k

    s

    cos

    n

    j

    ⌘.

    ICS summer school: Scientific visualization at the interfaces Roscoff Marine station, July 28 - August 8, 2014 88