Matrix Scaling

Started by
1 comment, last by Steve5050 15 years, 6 months ago
Hi, Using vb.net 2003 dx9.0c I'm trying to scale a matrix with time but I want to slowly scale it up then slowly scale it back down. I can scale it up quick with this code,I'm just real stuck on trying to get to just keep going up and down. Public Sub ScaleMatrix(ByVal elapsedtime As Single) Dim scale As Single = Matrix1.M11 Dim scale1 As Single = Matrix1.M22 Dim scale2 As Single = Matrix1.M33 scale *= 1.2 + elapsedtime scale1 *= 1.2 + elapsedtime scale2 *= 1.2 + elapsedtime Matrix1.Scale(scale, scale1, scale2) End Sub Thanks Steve
Advertisement
Hi Steve

If you want to scale it down, the value should not be higher than 1.0. Any value higher than 1.0 will scale the model up. Any value lower than 1.0 will scale it down.

Hope that helps.
Hi,
I was actually looking for a way to
scale up slowly than scale down slowly.

I want it just run by itself without
input from a key or anything.

What I have posted will just disappear on me
if I just run it,I know it will work because
I used a key to test, and that is just scaling up.

I want to go up a little and then back down.

I think I can use the Math.Cos to get it
to go up and down.

I'm just having trouble implementing it.

Thanks
Steve

This topic is closed to new replies.

Advertisement