Find the intersection of a line with a plane: Difference between revisions
Content deleted Content added
m →{{header|zkl}}: added comment |
m →{{header|zkl}}: rewrite a line for clarity |
||
Line 85:
si:=-dotP(plane.normal,w)/cos; # line segment where it intersets the plane
# point where line intersects the plane:
// w.zipWith('+,line.ray.apply('*,si)).zipWith('+,plane.pt); // or
w.zipWith('wrap(w,r,pt){ w + r*si + pt },line.ray,plane.pt);
}</lang>
<lang zkl>println("Intersection at point: ", linePlaneIntersection(
|