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

  Write a haskell program to calculates a balanced partition

Write a program in Haskell which calculates a balanced partition of N items where each item has a value between 0 and K such that the difference b/w the sum of the values of first partition,

  Create an application to run in the amazon ec2 service

In this project you will create an application to run in the Amazon EC2 service and you will also create a client that can run on local machine and access your application.

  Explain the process to develop a web page locally

Explain the process to develop a Web page locally

  Write functions

These 14 questions covers java class, Array, link list , generic class.

  Programming assignment

If the user wants to read the input from a file, then the output will also go into a different file . If the user wants to read the input interactively, then the output will go to the screen .

  Write a prolog program using swi proglog

Write a Prolog program using swi proglog

  Create a custom application using eclipse

Create a custom Application Using Eclipse Android Development

  Create a application using the mvc architecture

create a application using the MVC architecture. No scripting elements are allowed in JSP pages.

  Develops bespoke solutions for the rubber industry

Develops bespoke solutions for the rubber industry

  Design a program that models the worms behavior

Design a program that models the worm's behavior.

  Writing a class

Build a class for a type called Fraction

  Design a program that assigns seats on an airplane

Write a program that allows an instructor to keep a grade book and also design and implement a program that assigns seats on an airplane.

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