WorldViz User Forum

WorldViz User Forum (
-   Vizard (
-   -   Transform object & matrices (

david 03-24-2003 11:20 AM

Transform object & matrices
Hello everybody,

Is there any way to specify a transform object coefficient by coefficient? from what I have seen vizmat allows you to make only some special kinds of matrices. What if I want to reconstruct the perspective matrix that looks nothing like a rotation, translation or scaling?

(student at the MVL MIT)

farshizzo 03-24-2003 11:49 AM

Hi David,

I'm not exactly sure what you want to do, but you can manually set each individual element of the 4x4 matrix. The transform object has a function called 'set' which takes 16 numbers.

import vizmat

tran = vizmat.Transform()
tran.set(1,2,3, ... , 16)

Is this what you were looking for?

-- Farshid

david 03-24-2003 11:59 AM

thanks farshid

The method you mention is not in the vizard help (at least not the one I have), this is why I did not see it, but this is exactly what I was looking for.


farshizzo 03-24-2003 12:09 PM

Hi David,

I noticed a small bug in the vizmat library that will give you errors when trying to use the 'set' function. It will be fixed by the next release, but for now, here's how you can fix it:

Go to the main Vizard directory on your computer and open up ''

Line 119 will be:

transform.set(self,,f1,f2,f3,f4,f5,f6,f7,f8 ,f9,f10,f11,f12,f13,f14,f15,f16)

You should change it to:

transform.set(,f1,f2,f3,f4,f5,f6,f7,f8,f9,f 10,f11,f12,f13,f14,f15,f16)

Save the file and restart Vizard.

Sorry about that.

-- Farshid

david 03-27-2003 09:18 AM

Thanks for the comment, this is going to spare me some real trouble

All times are GMT -7. The time now is 08:04 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2021, vBulletin Solutions, Inc.
Copyright 2002-2018 WorldViz LLC