Talk:Find the intersection of a line with a plane: Difference between revisions

m
 
(One intermediate revision by the same user not shown)
Line 8:
<br>g: A=(0,2,4) v=(3,2,1)
<br>..Walter Pachl 20:10, 3 July 2017 (UTC)
 
== Java output for special cases ==
 
I tested some special cases:
<pre>If the ray is parallel to the plane:
Vector3D rv = new Vector3D(1.0, 1.0, 0.0);
Vector3D rp = new Vector3D(0.0, 0.0, 1.0);
Vector3D pn = new Vector3D(0.0, 0.0, 3.0);
Vector3D pp = new Vector3D(0.0, 0.0, 0.0);
The ray intersects the plane at (-Infinity, -Infinity, NaN)
REXX: Line is parallel to the plane
 
If the ray is within the plane:
Vector3D rv = new Vector3D(1.0, 1.0, 0.0);
Vector3D rp = new Vector3D(1.0, 1.0, 0.0);
Vector3D pn = new Vector3D(0.0, 0.0, 3.0);
Vector3D pp = new Vector3D(0.0, 0.0, 0.0);
The ray intersects the plane at (NaN, NaN, NaN)
REXX: Line is part of the plane</pre>
How could that be improved? ..Walter Pachl 18:16, 18 November 2018 (UTC)
2,289

edits