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

  Numbers that can be calculated and have meaningful results

Numbers that can be calculated and have meaningful results

  Compare and contrast database connectivity in vb and c#

Compare and contrast database connectivity in VB® and C#. If you studied database connectivity in Java®, include Java® in the comparison. In which language do you find it easiest to implement a connection to a database? Why

  Write an application to calculate the factorials

Write an application that calculates the factorials of 1 through 20. use type long. Display the results in tabular format. What difficulty might prevent you from calculating the factorial of 100?

  Write program that calculates average score of class

write program that calculates average score of class and shows the result. All description written in word file. Program should read datas

  How do you switch between programs & files in microsoft

What is a task pane? Provide examples of three different types of task panes.

  Create generic stack class called mystack to place furniture

Application to simulate distributing furniture from Whole sale center to different stores -  Write an application to simulate distributing furniture from Whole sale center to different stores.

  Appropriate for two classes to inherit from superclass

CDs and DVDs have several common characteristics. Would it be appropriate for these two classes to inherit from a common superclass?

  Explain big o notation

What does "n" represent in relation to big O notation?

  Write a perl cgi program

Write a Perl CGI program (script) to insert new questions into the quiz table via a Web browser. You can assume that, when inserting questions into the table, there is only one transaction yielded by your program to access the table

  Design main driver class to instantiate-compute sum-objects

Design a main driver class to instantiate and calculate sum of several MonetaryCoin objects. Demonstrate that monetary coin inherits its parent's ability to be flipped.

  Sketch state diagram for machine using sw

Sketch the State Diagram for machine using any SW (i.e. MS Visio).: Print out your VHDL Code and Simulation waveforms for you design 3 Points: Print out your VHDL Code for your self-checking Test Bench

  Project code in visual studio console application

Project code in visual Studio Console application and class library and the PADI project aims at implementing a simpli ed distributed software transactional system.

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