All problems
Tangent Plane Normal Vector
Problem
For a surface z = f(x, y), the tangent plane at a point has normal vector [-f_x, -f_y, 1].
Given the two partial derivatives at the point, return the normal vector.
Hint
Move the partial derivatives to the left side of z - f(x, y) = 0.
Test cases
case 1
in: [1,2]
expected: [-1,-2,1]
case 2
in: [0,0]
expected: [0,0,1]
case 3
in: [-3,0.5]
expected: [3,-0.5,1]
Starter codePython
def tangent_plane_normal(fx, fy):
# Your code here
pass3 test cases · run your code against them in the editor