CS 1112 Lecture Notes - Lecture 12: Linear Interpolation, Cyan
Document Summary
Vectorized functions: most built in functions are vectorized, they will return a vector of the same size as the inputted vector, user-defined functions are not automatically vectorized. Rgb colors are 3-vectors: red, green, and blue are the primary colors of light. Red and green combine to make yellow. Color = 0. 5*yellow + 0. 5*black (previously defined that yellow = [1, 1, 0] and black = [0, 0, 0]) Linear interpolation: values of a function between two values can be found even if the function is unknown, for example: f(x) is the height of a rocket at time x. If we know values of f(15) and f(20), we can find the values of f(16), f(17), etc. Linear interpolation: f(16) = 4/5(f(15)) + 1/5(f(20))