POV-Ray : Newsgroups : povray.advanced-users : Tough math help needed : Re: Tough math help needed Server Time
29 Jul 2024 16:24:13 EDT (-0400)
  Re: Tough math help needed  
From: Alberto
Date: 28 Aug 2001 12:38:55
Message: <3B8BC895.55B983AA@usb.ve>
> Peter Popov wrote:
> 
> I can also split the last equation into two, one for the x components
> of vectors and one for the y components which is the same as you
> suggest, only the unit vectors i and j are used for multipliers
> instead of AB and AD.

In principle you can do that. The problem is that there are chances that taking
the inner product with say, i can lead to the equation 0 = 0. In the exposition
you made it is clear that it's better to choose AB and AD as the projecting vectors.

> The problem with this approach is that the
> system is non-linear due to the term a*b.

This problem is unavoidable. It's related to the fact that you're using second
order equations. One thing you can do is to use a vector which is orthogonal to
DC - AB. The inner product of your last equation with such a vector will lead to
an equation which is linear in a and b. In this way you'll need to solve only
one second order equation. I have the impression that only one of the roots will
be meaningful for example being a positive number between 0 and 1. The other
root being out of this range.

> When extending this
> transformation to three dimensions, I get a system of three
> third-order equations which, although it has only one set of roots in
> the range [0; 1] is too hard for me to solve.
> 
> I can describe the UVW transform but I'd rather have this one solved
> before the more complex one is tackled.
> 
Hmm. The problem here is more complex. There are chances that you can construct
a system of three equations in which only one is of third order. I think you'll
have to set up numerical a method to solve the cubic equation. In this case the
hope is that only one of the roots will be real, the other two being complex (a
b and c? should be unique).

I understand that this is of little help but this are my thoughts.

Alberto.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.