SP
Sanjeev Prabhakar
Sat, Feb 8, 2025 4:40 PM
Is it really such a big issue with an error of 1e-6?
especially when it is about simple calculation for intersections in the X-Y
plane.
But anyways, my point was only to add some more simple maths functions
which may be useful for many users here.
On Sat, 8 Feb 2025 at 20:52, Adrian Mariano avm4@cornell.edu wrote:
It is a well-known fact in numerical analysis that the inverse is
ill-conditioned and as a result the bounds on error when you use inverse
are bad. The error is related to the condition number and the difference
may not be apparent or problematic for well-conditioned problems.
The MATLAB documentation has an example where the error is 1e-15 with LU
decomposition and 1e-6 with inverse.
https://www.mathworks.com/help/matlab/ref/inv.html
Three methods are commonly used for solving Ax=b that are stable and have
better error bounds than matrix inverse. The most stable method is
eigenvalue decomposition (or SVD). The other choices are QR factorization
and LU decomposition (aka Gaussian elimination). The second two produce a
decomposition of A into a triangular matrix so that then the problem can be
solved by back-substitution. I implemented QR factorization in OpenSCAD.
Note that eigenvalue/svd is very difficult to implement. (I have written
an eigenvalue solver in OpenSCAD, but there doesn't seem to be a need for
this.) But QR and LU factorization are simple methods that are easy to
code.
Note to Guenther: I use pure OpenSCAD, so I need linear equation
solutions natively.
On Sat, Feb 8, 2025 at 10:04 AM Sanjeev Prabhakar <
sprabhakar2006@gmail.com> wrote:
I agree on speed but I am really wondering what has lead you to such a
conclusion about the accuracy.
Although I use 2 different ways to calculate intersections. Inverse
matrix method takes longer but the results are comparable with direct
calculation method by a derived formulae and it is much simpler to work
with, atleast in python.
I am not sure about openscad.
If there is any other method, which is better and faster, it will be
interesting to know.
On Sat, 8 Feb, 2025, 6:28 pm Adrian Mariano via Discuss, <
discuss@lists.openscad.org> wrote:
Sanjeev, you can calculate the inverse, sure, but if you are trying to
solve an equation like Ax=b you should NOT calculate the inverse and
compute inverse(A)*b because this is an inaccurate and slow way to get the
solution to that problem. It is a numerically unstable method for solving
the problem. And computing the inverse actually requires solving a whole
series of Ax=b problems.
On Sat, Feb 8, 2025 at 1:51 AM Guenther Sohler via Discuss <
discuss@lists.openscad.org> wrote:
In pythonscad there has been "divmatrix" next to multmatrix for a long
time and it exactly serves that purpose
On Sat, Feb 8, 2025 at 5:44 AM Sanjeev Prabhakar via Discuss <
discuss@lists.openscad.org> wrote:
I feel the inverse of a matrix should be part of the mathematical
functions in stock openSCAD.
That is not too difficult to do I suppose and makes the calculations
related to linear algebra much simpler.
I realised this while trying to calculate the intersection point
between 2 straight lines, where 2 simple equations with 2 unknowns need to
be calculated.
It is possible to do such calculations by hand but would be much
simpler if that can be part of the software algorithm.
Thanks
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
Is it really such a big issue with an error of 1e-6?
especially when it is about simple calculation for intersections in the X-Y
plane.
But anyways, my point was only to add some more simple maths functions
which may be useful for many users here.
On Sat, 8 Feb 2025 at 20:52, Adrian Mariano <avm4@cornell.edu> wrote:
> It is a well-known fact in numerical analysis that the inverse is
> ill-conditioned and as a result the bounds on error when you use inverse
> are bad. The error is related to the condition number and the difference
> may not be apparent or problematic for well-conditioned problems.
>
> The MATLAB documentation has an example where the error is 1e-15 with LU
> decomposition and 1e-6 with inverse.
> https://www.mathworks.com/help/matlab/ref/inv.html
>
> Three methods are commonly used for solving Ax=b that are stable and have
> better error bounds than matrix inverse. The most stable method is
> eigenvalue decomposition (or SVD). The other choices are QR factorization
> and LU decomposition (aka Gaussian elimination). The second two produce a
> decomposition of A into a triangular matrix so that then the problem can be
> solved by back-substitution. I implemented QR factorization in OpenSCAD.
> Note that eigenvalue/svd is very difficult to implement. (I have written
> an eigenvalue solver in OpenSCAD, but there doesn't seem to be a need for
> this.) But QR and LU factorization are simple methods that are easy to
> code.
>
> Note to Guenther: I use pure OpenSCAD, so I need linear equation
> solutions natively.
>
>
>
>
>
> On Sat, Feb 8, 2025 at 10:04 AM Sanjeev Prabhakar <
> sprabhakar2006@gmail.com> wrote:
>
>> I agree on speed but I am really wondering what has lead you to such a
>> conclusion about the accuracy.
>>
>> Although I use 2 different ways to calculate intersections. Inverse
>> matrix method takes longer but the results are comparable with direct
>> calculation method by a derived formulae and it is much simpler to work
>> with, atleast in python.
>>
>> I am not sure about openscad.
>>
>> If there is any other method, which is better and faster, it will be
>> interesting to know.
>>
>>
>> On Sat, 8 Feb, 2025, 6:28 pm Adrian Mariano via Discuss, <
>> discuss@lists.openscad.org> wrote:
>>
>>> Sanjeev, you can calculate the inverse, sure, but if you are trying to
>>> solve an equation like Ax=b you should NOT calculate the inverse and
>>> compute inverse(A)*b because this is an inaccurate and slow way to get the
>>> solution to that problem. It is a numerically unstable method for solving
>>> the problem. And computing the inverse actually requires solving a whole
>>> series of Ax=b problems.
>>>
>>> On Sat, Feb 8, 2025 at 1:51 AM Guenther Sohler via Discuss <
>>> discuss@lists.openscad.org> wrote:
>>>
>>>> In pythonscad there has been "divmatrix" next to multmatrix for a long
>>>> time and it exactly serves that purpose
>>>>
>>>>
>>>>
>>>>
>>>> On Sat, Feb 8, 2025 at 5:44 AM Sanjeev Prabhakar via Discuss <
>>>> discuss@lists.openscad.org> wrote:
>>>>
>>>>> I feel the inverse of a matrix should be part of the mathematical
>>>>> functions in stock openSCAD.
>>>>>
>>>>> That is not too difficult to do I suppose and makes the calculations
>>>>> related to linear algebra much simpler.
>>>>>
>>>>> I realised this while trying to calculate the intersection point
>>>>> between 2 straight lines, where 2 simple equations with 2 unknowns need to
>>>>> be calculated.
>>>>>
>>>>> It is possible to do such calculations by hand but would be much
>>>>> simpler if that can be part of the software algorithm.
>>>>>
>>>>> Thanks
>>>>>
>>>>> _______________________________________________
>>>>> OpenSCAD mailing list
>>>>> To unsubscribe send an email to discuss-leave@lists.openscad.org
>>>>>
>>>> _______________________________________________
>>>> OpenSCAD mailing list
>>>> To unsubscribe send an email to discuss-leave@lists.openscad.org
>>>>
>>> _______________________________________________
>>> OpenSCAD mailing list
>>> To unsubscribe send an email to discuss-leave@lists.openscad.org
>>>
>>
RW
Rogier Wolff
Sat, Feb 8, 2025 5:46 PM
On Sat, Feb 08, 2025 at 10:21:56AM -0500, Adrian Mariano via Discuss wrote:
It is a well-known fact in numerical analysis that the inverse is
ill-conditioned and as a result the bounds on error when you use inverse
are bad. The error is related to the condition number and the difference
may not be apparent or problematic for well-conditioned problems.
Inverse is simply for matrices what 1/x is for normal numbers.
1/x becomes large and can change a lot numerically when the number x
is small. So 1/0.001 is 1000, but 1/0.0011 is about 900. A difference
of 100, while a small change in 1/.500 vs 1/.5001 changes WAY less
than 1.
The thing is, you can see that the number 0.001 is small. And the
change to 0.0011 is still a 10% change in the value, just like the
change in the result.
For a matrix, you can't see when it is small, or as you call it,
"condition number" is small (or big? I don't know how this condition
number is defined). A matrix can be fully filled with numbers, big
numbers and still be "small" for the purpose of an inverse.
When a matrix inverse is ill-conditioned, the transform that it
describes is "flat". An n-dimensional sphere loses most of its radius
in at least one direction.
As an easy example,
[1 0 0
0 1 0
0 0 .001]
is a transform that flattens everything to one 1000th of its Z heigth.
This matrix would be called ill-conditioned.
In this case everything is easily seen. The number 0.001 is directly
there in the matrix, and it is directly related to hiw ill-conditioned
this matrix is. Add in a rotation around a not-aligned axis and you
don't see the difference between "innocent" low numbers (here all the
zeroes) and the one that matters. It becomes "mixed" into everything
else and there is no direct way to see if the matrix is "bad" or not.
Anyway, what I think people would use matrix inversion in openscad
for, it doesn't really matter: The matrices will usually be
well-behaved transforms that have a condition number of one or possibly
0.1 or 10 but nothing extreme.
Roger.
--
** R.E.Wolff@BitWizard.nl ** https://www.BitWizard.nl/ ** +31-15-2049110 **
** Delftechpark 11 2628 XJ Delft, The Netherlands. KVK: 27239233 **
f equals m times a. When your f is steady, and your m is going down
your a** is going up. -- Chris Hadfield about flying up the space shuttle.
** 'a' for accelleration.
On Sat, Feb 08, 2025 at 10:21:56AM -0500, Adrian Mariano via Discuss wrote:
> It is a well-known fact in numerical analysis that the inverse is
> ill-conditioned and as a result the bounds on error when you use inverse
> are bad. The error is related to the condition number and the difference
> may not be apparent or problematic for well-conditioned problems.
Inverse is simply for matrices what 1/x is for normal numbers.
1/x becomes large and can change a lot numerically when the number x
is small. So 1/0.001 is 1000, but 1/0.0011 is about 900. A difference
of 100, while a small change in 1/.500 vs 1/.5001 changes WAY less
than 1.
The thing is, you can see that the number 0.001 is small. And the
change to 0.0011 is still a 10% change in the value, just like the
change in the result.
For a matrix, you can't see when it is small, or as you call it,
"condition number" is small (or big? I don't know how this condition
number is defined). A matrix can be fully filled with numbers, big
numbers and still be "small" for the purpose of an inverse.
When a matrix inverse is ill-conditioned, the transform that it
describes is "flat". An n-dimensional sphere loses most of its radius
in at least one direction.
As an easy example,
[1 0 0
0 1 0
0 0 .001]
is a transform that flattens everything to one 1000th of its Z heigth.
This matrix would be called ill-conditioned.
In this case everything is easily seen. The number 0.001 is directly
there in the matrix, and it is directly related to hiw ill-conditioned
this matrix is. Add in a rotation around a not-aligned axis and you
don't see the difference between "innocent" low numbers (here all the
zeroes) and the one that matters. It becomes "mixed" into everything
else and there is no direct way to see if the matrix is "bad" or not.
Anyway, what I think people would use matrix inversion in openscad
for, it doesn't really matter: The matrices will usually be
well-behaved transforms that have a condition number of one or possibly
0.1 or 10 but nothing extreme.
Roger.
--
** R.E.Wolff@BitWizard.nl ** https://www.BitWizard.nl/ ** +31-15-2049110 **
** Delftechpark 11 2628 XJ Delft, The Netherlands. KVK: 27239233 **
f equals m times a. When your f is steady, and your m is going down
your a** is going up. -- Chris Hadfield about flying up the space shuttle.
** 'a' for accelleration.
JD
John David
Sat, Feb 8, 2025 8:25 PM
First, having extra functions around can come in handy (I do not need this
ATM, do not see where I might need them, but who knows what tomorrow will
bring). As for error bounds, it is also good to have some idea what the
propagated errors are, and do our best to minimize them in every chance
possible. My experience is 1e-4 to 1e-6 is fairly common, but it all
depends on how precise you need your calculations to be. On the downside,
this will be extra code that will need to be maintained. If you have a use
case/need, then maybe it is time.
EBo --
On Sat, Feb 8, 2025 at 11:41 AM Sanjeev Prabhakar via Discuss <
discuss@lists.openscad.org> wrote:
Is it really such a big issue with an error of 1e-6?
especially when it is about simple calculation for intersections in the
X-Y plane.
But anyways, my point was only to add some more simple maths functions
which may be useful for many users here.
On Sat, 8 Feb 2025 at 20:52, Adrian Mariano avm4@cornell.edu wrote:
It is a well-known fact in numerical analysis that the inverse is
ill-conditioned and as a result the bounds on error when you use inverse
are bad. The error is related to the condition number and the difference
may not be apparent or problematic for well-conditioned problems.
The MATLAB documentation has an example where the error is 1e-15 with LU
decomposition and 1e-6 with inverse.
https://www.mathworks.com/help/matlab/ref/inv.html
Three methods are commonly used for solving Ax=b that are stable and have
better error bounds than matrix inverse. The most stable method is
eigenvalue decomposition (or SVD). The other choices are QR factorization
and LU decomposition (aka Gaussian elimination). The second two produce a
decomposition of A into a triangular matrix so that then the problem can be
solved by back-substitution. I implemented QR factorization in OpenSCAD.
Note that eigenvalue/svd is very difficult to implement. (I have written
an eigenvalue solver in OpenSCAD, but there doesn't seem to be a need for
this.) But QR and LU factorization are simple methods that are easy to
code.
Note to Guenther: I use pure OpenSCAD, so I need linear equation
solutions natively.
On Sat, Feb 8, 2025 at 10:04 AM Sanjeev Prabhakar <
sprabhakar2006@gmail.com> wrote:
I agree on speed but I am really wondering what has lead you to such a
conclusion about the accuracy.
Although I use 2 different ways to calculate intersections. Inverse
matrix method takes longer but the results are comparable with direct
calculation method by a derived formulae and it is much simpler to work
with, atleast in python.
I am not sure about openscad.
If there is any other method, which is better and faster, it will be
interesting to know.
On Sat, 8 Feb, 2025, 6:28 pm Adrian Mariano via Discuss, <
discuss@lists.openscad.org> wrote:
Sanjeev, you can calculate the inverse, sure, but if you are trying to
solve an equation like Ax=b you should NOT calculate the inverse and
compute inverse(A)*b because this is an inaccurate and slow way to get the
solution to that problem. It is a numerically unstable method for solving
the problem. And computing the inverse actually requires solving a whole
series of Ax=b problems.
On Sat, Feb 8, 2025 at 1:51 AM Guenther Sohler via Discuss <
discuss@lists.openscad.org> wrote:
In pythonscad there has been "divmatrix" next to multmatrix for a
long time and it exactly serves that purpose
On Sat, Feb 8, 2025 at 5:44 AM Sanjeev Prabhakar via Discuss <
discuss@lists.openscad.org> wrote:
I feel the inverse of a matrix should be part of the mathematical
functions in stock openSCAD.
That is not too difficult to do I suppose and makes the calculations
related to linear algebra much simpler.
I realised this while trying to calculate the intersection point
between 2 straight lines, where 2 simple equations with 2 unknowns need to
be calculated.
It is possible to do such calculations by hand but would be much
simpler if that can be part of the software algorithm.
Thanks
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
First, having extra functions around can come in handy (I do not need this
ATM, do not see where I might need them, but who knows what tomorrow will
bring). As for error bounds, it is also good to have some idea what the
propagated errors are, and do our best to minimize them in every chance
possible. My experience is 1e-4 to 1e-6 is fairly common, but it all
depends on how precise you need your calculations to be. On the downside,
this will be extra code that will need to be maintained. If you have a use
case/need, then maybe it is time.
EBo --
On Sat, Feb 8, 2025 at 11:41 AM Sanjeev Prabhakar via Discuss <
discuss@lists.openscad.org> wrote:
> Is it really such a big issue with an error of 1e-6?
>
> especially when it is about simple calculation for intersections in the
> X-Y plane.
>
> But anyways, my point was only to add some more simple maths functions
> which may be useful for many users here.
>
>
>
> On Sat, 8 Feb 2025 at 20:52, Adrian Mariano <avm4@cornell.edu> wrote:
>
>> It is a well-known fact in numerical analysis that the inverse is
>> ill-conditioned and as a result the bounds on error when you use inverse
>> are bad. The error is related to the condition number and the difference
>> may not be apparent or problematic for well-conditioned problems.
>>
>> The MATLAB documentation has an example where the error is 1e-15 with LU
>> decomposition and 1e-6 with inverse.
>> https://www.mathworks.com/help/matlab/ref/inv.html
>>
>> Three methods are commonly used for solving Ax=b that are stable and have
>> better error bounds than matrix inverse. The most stable method is
>> eigenvalue decomposition (or SVD). The other choices are QR factorization
>> and LU decomposition (aka Gaussian elimination). The second two produce a
>> decomposition of A into a triangular matrix so that then the problem can be
>> solved by back-substitution. I implemented QR factorization in OpenSCAD.
>> Note that eigenvalue/svd is very difficult to implement. (I have written
>> an eigenvalue solver in OpenSCAD, but there doesn't seem to be a need for
>> this.) But QR and LU factorization are simple methods that are easy to
>> code.
>>
>> Note to Guenther: I use pure OpenSCAD, so I need linear equation
>> solutions natively.
>>
>>
>>
>>
>>
>> On Sat, Feb 8, 2025 at 10:04 AM Sanjeev Prabhakar <
>> sprabhakar2006@gmail.com> wrote:
>>
>>> I agree on speed but I am really wondering what has lead you to such a
>>> conclusion about the accuracy.
>>>
>>> Although I use 2 different ways to calculate intersections. Inverse
>>> matrix method takes longer but the results are comparable with direct
>>> calculation method by a derived formulae and it is much simpler to work
>>> with, atleast in python.
>>>
>>> I am not sure about openscad.
>>>
>>> If there is any other method, which is better and faster, it will be
>>> interesting to know.
>>>
>>>
>>> On Sat, 8 Feb, 2025, 6:28 pm Adrian Mariano via Discuss, <
>>> discuss@lists.openscad.org> wrote:
>>>
>>>> Sanjeev, you can calculate the inverse, sure, but if you are trying to
>>>> solve an equation like Ax=b you should NOT calculate the inverse and
>>>> compute inverse(A)*b because this is an inaccurate and slow way to get the
>>>> solution to that problem. It is a numerically unstable method for solving
>>>> the problem. And computing the inverse actually requires solving a whole
>>>> series of Ax=b problems.
>>>>
>>>> On Sat, Feb 8, 2025 at 1:51 AM Guenther Sohler via Discuss <
>>>> discuss@lists.openscad.org> wrote:
>>>>
>>>>> In pythonscad there has been "divmatrix" next to multmatrix for a
>>>>> long time and it exactly serves that purpose
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> On Sat, Feb 8, 2025 at 5:44 AM Sanjeev Prabhakar via Discuss <
>>>>> discuss@lists.openscad.org> wrote:
>>>>>
>>>>>> I feel the inverse of a matrix should be part of the mathematical
>>>>>> functions in stock openSCAD.
>>>>>>
>>>>>> That is not too difficult to do I suppose and makes the calculations
>>>>>> related to linear algebra much simpler.
>>>>>>
>>>>>> I realised this while trying to calculate the intersection point
>>>>>> between 2 straight lines, where 2 simple equations with 2 unknowns need to
>>>>>> be calculated.
>>>>>>
>>>>>> It is possible to do such calculations by hand but would be much
>>>>>> simpler if that can be part of the software algorithm.
>>>>>>
>>>>>> Thanks
>>>>>>
>>>>>> _______________________________________________
>>>>>> OpenSCAD mailing list
>>>>>> To unsubscribe send an email to discuss-leave@lists.openscad.org
>>>>>>
>>>>> _______________________________________________
>>>>> OpenSCAD mailing list
>>>>> To unsubscribe send an email to discuss-leave@lists.openscad.org
>>>>>
>>>> _______________________________________________
>>>> OpenSCAD mailing list
>>>> To unsubscribe send an email to discuss-leave@lists.openscad.org
>>>>
>>> _______________________________________________
> OpenSCAD mailing list
> To unsubscribe send an email to discuss-leave@lists.openscad.org
>
SP
Sanjeev Prabhakar
Sun, Feb 9, 2025 1:35 AM
We all need to understand what are our use cases and whether the inverse
matrix is a problem in our kind of application.
I am using it to find intersections where the parametric value of one of
the unknown has to be within 0 to 1.
If it becomes exponentially big, it is dropped from calculations and hence
not a problem.
This needs explanation but right now I don't have time for that. Maybe
sometime later, will try.
On Sat, 8 Feb, 2025, 11:17 pm Rogier Wolff via Discuss, <
discuss@lists.openscad.org> wrote:
On Sat, Feb 08, 2025 at 10:21:56AM -0500, Adrian Mariano via Discuss wrote:
It is a well-known fact in numerical analysis that the inverse is
ill-conditioned and as a result the bounds on error when you use inverse
are bad. The error is related to the condition number and the difference
may not be apparent or problematic for well-conditioned problems.
Inverse is simply for matrices what 1/x is for normal numbers.
1/x becomes large and can change a lot numerically when the number x
is small. So 1/0.001 is 1000, but 1/0.0011 is about 900. A difference
of 100, while a small change in 1/.500 vs 1/.5001 changes WAY less
than 1.
The thing is, you can see that the number 0.001 is small. And the
change to 0.0011 is still a 10% change in the value, just like the
change in the result.
For a matrix, you can't see when it is small, or as you call it,
"condition number" is small (or big? I don't know how this condition
number is defined). A matrix can be fully filled with numbers, big
numbers and still be "small" for the purpose of an inverse.
When a matrix inverse is ill-conditioned, the transform that it
describes is "flat". An n-dimensional sphere loses most of its radius
in at least one direction.
As an easy example,
[1 0 0
0 1 0
0 0 .001]
is a transform that flattens everything to one 1000th of its Z heigth.
This matrix would be called ill-conditioned.
In this case everything is easily seen. The number 0.001 is directly
there in the matrix, and it is directly related to hiw ill-conditioned
this matrix is. Add in a rotation around a not-aligned axis and you
don't see the difference between "innocent" low numbers (here all the
zeroes) and the one that matters. It becomes "mixed" into everything
else and there is no direct way to see if the matrix is "bad" or not.
Anyway, what I think people would use matrix inversion in openscad
for, it doesn't really matter: The matrices will usually be
well-behaved transforms that have a condition number of one or possibly
0.1 or 10 but nothing extreme.
Roger.
--
** R.E.Wolff@BitWizard.nl ** https://www.BitWizard.nl/ ** +31-15-2049110
**
** Delftechpark 11 2628 XJ Delft, The Netherlands. KVK: 27239233 **
f equals m times a. When your f is steady, and your m is going down
your a** is going up. -- Chris Hadfield about flying up the space shuttle.
** 'a' for accelleration.
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
We all need to understand what are our use cases and whether the inverse
matrix is a problem in our kind of application.
I am using it to find intersections where the parametric value of one of
the unknown has to be within 0 to 1.
If it becomes exponentially big, it is dropped from calculations and hence
not a problem.
This needs explanation but right now I don't have time for that. Maybe
sometime later, will try.
On Sat, 8 Feb, 2025, 11:17 pm Rogier Wolff via Discuss, <
discuss@lists.openscad.org> wrote:
> On Sat, Feb 08, 2025 at 10:21:56AM -0500, Adrian Mariano via Discuss wrote:
> > It is a well-known fact in numerical analysis that the inverse is
> > ill-conditioned and as a result the bounds on error when you use inverse
> > are bad. The error is related to the condition number and the difference
> > may not be apparent or problematic for well-conditioned problems.
>
> Inverse is simply for matrices what 1/x is for normal numbers.
>
> 1/x becomes large and can change a lot numerically when the number x
> is small. So 1/0.001 is 1000, but 1/0.0011 is about 900. A difference
> of 100, while a small change in 1/.500 vs 1/.5001 changes WAY less
> than 1.
>
> The thing is, you can see that the number 0.001 is small. And the
> change to 0.0011 is still a 10% change in the value, just like the
> change in the result.
>
> For a matrix, you can't see when it is small, or as you call it,
> "condition number" is small (or big? I don't know how this condition
> number is defined). A matrix can be fully filled with numbers, big
> numbers and still be "small" for the purpose of an inverse.
>
> When a matrix inverse is ill-conditioned, the transform that it
> describes is "flat". An n-dimensional sphere loses most of its radius
> in at least one direction.
>
> As an easy example,
> [1 0 0
> 0 1 0
> 0 0 .001]
>
> is a transform that flattens everything to one 1000th of its Z heigth.
> This matrix would be called ill-conditioned.
>
> In this case everything is easily seen. The number 0.001 is directly
> there in the matrix, and it is directly related to hiw ill-conditioned
> this matrix is. Add in a rotation around a not-aligned axis and you
> don't see the difference between "innocent" low numbers (here all the
> zeroes) and the one that matters. It becomes "mixed" into everything
> else and there is no direct way to see if the matrix is "bad" or not.
>
> Anyway, what I think people would use matrix inversion in openscad
> for, it doesn't really matter: The matrices will usually be
> well-behaved transforms that have a condition number of one or possibly
> 0.1 or 10 but nothing extreme.
>
> Roger.
>
>
> --
> ** R.E.Wolff@BitWizard.nl ** https://www.BitWizard.nl/ ** +31-15-2049110
> **
> ** Delftechpark 11 2628 XJ Delft, The Netherlands. KVK: 27239233 **
> f equals m times a. When your f is steady, and your m is going down
> your a** is going up. -- Chris Hadfield about flying up the space shuttle.
> ** 'a' for accelleration.
> _______________________________________________
> OpenSCAD mailing list
> To unsubscribe send an email to discuss-leave@lists.openscad.org
>