Implement a function for computing the achromatic phong

Assignment Help Programming Languages
Reference no: EM131062150

In this question you need to implement a function for computing the achromatic Phong illumination at a surface point.

The function declaration is:

void phongIlluminationAchromatic(double* reflectedLightPtr,
double ambientIntensity, double diffuseIntensity, double specularIntensity,
double ambientReflecCoef, double diffuseReflecCoef, double specularReflecCoef,
double shininess,
double kc, double kl, double kq,
Vec3d pointOnSurface, Vec3d surfaceNormal, Vec3d lightPosition, Vec3d viewPoint)

The value of the variable reflectedLight should be the Phong illumination calculated with the achromatic Phong Illumination model presented in the lecture.

ambientIntensity, diffuseIntensity, and specularIntensity are the intensities of the incoming light hitting the surface.
ambientReflecCoef, diffuseReflecCoef, and specularReflecCoef are the reflection coefficients of the surface.
shininess is the exponent alpha in the specular reflection component of the Phong Illumination formula.
kc, kl and kq are constants used for computing how the distance between light source and surface point effects the reflected light intensity.
pointOnSurface is the point on the surface for which you should compute the reflected light intensity.
surfaceNormal is the surface normal at that point.
lightPosition and viewPoint are the locations of the light and of the viewer (camera) in the scene.

Note that all of these vectors are not normalised.

Reference no: EM131062150

Questions Cloud

Idea of the rhetorical situation : Grant-Davie seems to want us to use the idea of the rhetorical situation mostly in an analytical way, to understand why existing discourses have taken the shape they have. In other words, he seems to be talking to us as readers.
Common indicators of brain abnormalities : How are learning disabilities diagnosed in your school? What are common brain abnormalities and learning disabilities you have encountered? What are common indicators of brain abnormalities and learning disabilities?
Analyze ethical issues : Design a research study on (Goodman, S. H., Dimidjian, S., & Williams, K. G. (2013). Pregnant African American women's attitudes toward perinatal depression prevention. Cultural Diversity and Ethnic Minority Psychology, 19(1), 50-57.). Your design sh..
Determine the minimum permissible thickness tmin of the tank : The desired factor of safety with respect to yielding is 2.8. Also, the normal strain must not exceed 1100 ×10-6.
Implement a function for computing the achromatic phong : In this question you need to implement a function for computing the achromatic Phong illumination at a surface point.
Maintain professional decorum : Which skills listed in the video do you think are most important? Are you acquiring these skills in your current educational journey? Where? Please remember to maintain professional decorum in this discussion. Post has minimum 350 word requirement..
Download and examine the project task : Download and examine the project task list from the link at the bottom of the page. Based on this task list, you will create a PERT chart and write a paper that discusses the following:
What was the internal pressure p in the can : What was the internal pressure p in the can
Chief means of support : In Charles Dickens' novel "Nicholas Nickleby", a young man finds himself the chief means of support for his mother and sister after the death of his father. Of course, there must be a villain in the story. Which character is Nicholas' main antagon..

Reviews

Write a Review

Programming Languages Questions & Answers

  Iimplement a class called monetarycoin

Create an implement a class called MonetaryCoin that is derived from the class Coin class. Store a value in the in the monetary coin that represents its value.

  Copies the content of one file into another file

write a c program that copies the contents of one file to a destination file.

  Program to retrieve records based on last name-first name

Customer service representatives wish to be able to retrieve records based on Last Name + First Name, Product Number, or State fields. Write down steps involved in your analysis of this problem?

  Develop a calendar and scheduling system

Develop a calendar and scheduling system, This assignment will contain two (2) Parts: Written Paper and Visual Basic Prototype. The Visual Basic Prototype is not included in the total page count but is included in the evaluation of your assignment...

  Program to accept inputs from user beginning temperature

Physicists tell us that lowest possible temperature is absolute zero. Absolute zero is -459.69 degrees Fahrenheit. Accept inputs from user: a beginning temperature, ending temperature, and increment value (all Fahrenheit).

  Create a program to store assignment grades for student

The elementary school for which you are doing development work has asked you to create a program to store assignment grades for one student.

  A text string using prompt

A text string, using prompt, either"valid name" or "invalid name",depending on whether the input names fit the required format, which is Last name, first name, middle initial

  Explain how application works and how it interacts with user

explain how your application works and how it interacts with the user. Creativity is encouraged.

  C compiler will not compile the line of code in the center

In the following lines of code, the Miracle C compiler will not compile the line of code in the center (float x = 1/a;). Why does this occur? How can it be corrected?

  Based on the keston 2013 article in the electronic reserve

write a 200- to 300-word short-answer response to the followingbased on the keston 2013 article in the electronic

  A fixed quantum of information packaged together

A fixed quantum of information packaged together with an IP address and other data for sending information over the internet

  Write application layer protocols to permit through firewall

As part of your own planning process, write the application layer protocols which you would permit through the firewall, those you would block and your reasons for doing so.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd