#### Morendral

##### Member

Any help would be appreciated, especially pseudocode which could help me figure out the final solution on my own. Thanks!

- Thread starter Morendral
- Start date

Any help would be appreciated, especially pseudocode which could help me figure out the final solution on my own. Thanks!

Using the same conventions as on this page:

Code:

```
///@func ray_plane_intersect(l0x, l0y, l0z, lx, ly, lz, p0x, p0y, p0z, nx, ny, nz)
///@param l0x
///@param l0y
///@param l0z
///@param lx
///@param ly
///@param lz
///@param p0x
///@param p0y
///@param p0z
///@param nx
///@param ny
///@param nz
var l0x = argument0,
l0y = argument1,
l0z = argument2,
lx = argument3,
ly = argument4,
lz = argument5,
p0x = argument6,
p0y = argument7,
p0z = argument8,
nx = argument9,
ny = argument10,
nz = argument11,
t = dot_product_3d(p0x-l0x, p0y-l0y, p0z-l0z, nx, ny, nz)/dot_product_3d(lx, ly, lz, nx, ny, nz);
return [l0x+t*lx, l0y+t*ly, l0z+t*lz];
```

Please, learn what dot products, cross products and normals are before you touch 3D graphics. The instructions are not difficult to follow, and most practitioners in the subject commit the formula to memory. When you do 3D graphics without basic vector math (most of which is basic arithmetic on repeat), all you're doing is wasting everyone's time.