Given a ray with a point and a vector and a plane with a point and a normal vector to the plane. You have to find the intersection point of the plane and the ray..
So your job if you choose to accept is to write a shortest function that will do the job.
RULES: The submission must be a complete program And that's all INPUT FORMAT: x y z rx ry rz //gives the ray point and the ray vectors x y z px py pz //gives the point on the plane and the vector normal to plane OUTPUT FORMAT: (x,y,z) //intersection point Test Case: 2 3 4 0.577 0.577 0.577 7 1 3 1 0 0 (7,8,9)
The shortest codes in bytes win.
References: https://www.siggraph.org/education/materials/HyperGraph/raytrace/rayplane_intersection.htm thanks orlp for the reference