# 3x3 matrix

• On 14/01/2015 at 04:24, xxxxxxxx wrote:

Is there a way to do 3x3 matrix calculation like inverse mat.
I like to use it, to calculate the intersection of a line and a plane.

This problem is typically solved by expressing it in matrix form, and inverting it: -Pim

• On 14/01/2015 at 06:32, xxxxxxxx wrote:

Hello,

you can invert a Matrix with "__invert__()" or the Python "invert" operator "~" .


inverseMatrix = ~worldSpaceCoords


You may also take a look at the GeRayCollider that can be used to calculate the intersections of a ray and a poly object.

best wishes,
Sebastian

• On 14/01/2015 at 08:08, xxxxxxxx wrote:

Originally posted by xxxxxxxx

Hello,

you can invert a Matrix with "__invert__()" or the Python "invert" operator "~" .


inverseMatrix = ~worldSpaceCoords


You may also take a look at the GeRayCollider that can be used to calculate the intersections of a ray and a poly object.

best wishes,
Sebastian

Yes, but that is all for a cinema 4d matrix and that is a 4x4 matrix, not a 3x3 matrix.
I want to use a 3x3 matrix.

I know I can use the GeRayCollider, but I want to do it myself.

So, how to do 3x3 matrix calculations in cinema 4d?

-Pim

• On 15/01/2015 at 06:55, xxxxxxxx wrote:

Hello,

if you cannot use the existing classes and functions of the API you have to solve this problem like any other problem by implementing your own solution or using a existing library.

If you want to calculate the intersection of a ray and a triangle you do not necessarily need to handle Matrix objects. There are other algorithms like this one.

Best wishes,
Sebastian

• On 15/01/2015 at 07:25, xxxxxxxx wrote:

Thanks, i will make my own 3x3 matrix calculation.