3D Line-Plane Intersection

Here is a Python example which finds the intersection of a line and a plane. Where the plane can be either a point and a normal, or a 4d vector (normal form), In the examples below (code for both is provided). Also note that this function calculates a value representing where the point is on … Read more

Intersect Two Lists in C#

You need to first transform data1, in your case by calling ToString() on each element. Use this if you want to return strings. List<int> data1 = new List<int> {1,2,3,4,5}; List<string> data2 = new List<string>{“6″,”3”}; var newData = data1.Select(i => i.ToString()).Intersect(data2); Use this if you want to return integers. List<int> data1 = new List<int> {1,2,3,4,5}; List<string> … Read more

finding point of intersection in R

If you literally just have two random vectors of numbers, you can use a pretty simple technique to get the intersection of both. Just find all points where x1 is above x2, and then below it on the next point, or vice-versa. These are the intersection points. Then just use the respective slopes to find … Read more