[Bf-committers] Proposal to Change Mathutils Vectors
Andrew Hale
trumanblending at gmail.com
Sun Dec 4 08:16:10 CET 2011
Thanks for the reply Stephen.
This certainly is a difficult topic to handle, on the one hand we have the
mathematically correct implementation which would see only the use of
homogeneous coordinates for translations and perspective projections and on
the other we have the current/proposed implementations. You are absolutely
correct in saying that homogeneous coordinates are required for some matrix
transformations. In essence, the proposal amounts to handling homogeneous
coordinates internally rather than having the user explicitly specify them.
If we change 4D vectors to act correctly as homogeneous coordinates then we
will be hacking how vectors of any dimension are
added/subtracted/multiplied etc. However, if we change 3D vectors to act as
homogeneous coordinates then we will allow (the mathematically incorrect
but already partially supported) operation of multiplying a 3D vector by a
4x4 matrix. Hence why this discussion needs to be had.
Thanks,
Andrew
On Sun, Dec 4, 2011 at 5:47 PM, Stephen Swaney <sswaney at centurytel.net>wrote:
> On Fri, Dec 02, 2011 at 10:47:36PM +1100, Andrew Hale wrote:
> >
> > I've written a proposal to change the current handling of transfomations
> of
> > vectors and remove the use cases for 4D vectors. The proposal can be
> found
> > here:
> >
> http://wiki.blender.org/index.php/User:TrumanBlending#Proposal:_Four_Dimensional_Mathutils_Vectors
>
> I find this disturbing. I'm not a math weenie and it has been a while
> since I have done any heavy-duty computer graphics, but the way I
> learned it was 4D homogenous coordinates were *the* basis for matrix
> calculations.
>
> I realize we do some hacks like automagically extending 3D vectors so
> people don't have to understand what they are doing. And that in some
> cases, we may not be mathematically correct.
>
> However, given the growing emphasis on using Blender for scientific
> visualization and robotics, rather than adding some hacks we would be
> better off fixing what is broken. Either that, or switching to numpy
> for our math heavy lifting.
>
> Before doing anything with this, we need to get some of our math
> experts to sit down and work through the implications. For me, it has
> the warning lights flashing.
>
> --
> Stephen Swaney
> sswaney at centurytel.net
> 231-271-7371
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at blender.org
> http://lists.blender.org/mailman/listinfo/bf-committers
>
More information about the Bf-committers
mailing list