Unexpected effect with X rotation matrix

Started by
7 comments, last by Infinity8378 7 years ago

cos(RMS)=X/pixX^2+pixY^2(Pixel Manipulation)

cos(Wir)=Z/pixX^2+pixY^2(Pixel Manipulation)

Z/X=cos(Wir)/cos(RMS)

Zsin()+Xcos()
Zcos()-Xsin()
Y
Wi 3bit
R 8bit
Rotation Equation 11bit
Rotation matrix only X
X*(cos(RMS+Wi)+Z/Xsin(RMS+Wi))
Makes an image Wavy Moving closer to the image makes it appear to rotate.

CODE BELOW

for (var RMS = 0; RMS < 256; ++RMS) {
for (var Wir = 0; Wir < 8; ++Wir) {
rotoS[RMS*8+Wir]=-1+1/(Math.cos((RMS+8*Wir)/128.0*3.14)+(Math.cos(Wir/16.0*3.14)/Math.cos(RMS/128.0*3.14))
*Math.sin((RMS+8*Wir)/128.0*3.14))
}
}
data[i+((-Math.abs((i%512)-256)*rotoS[256])+0.5| 0)%512] = (a << 24) |
(b << 16) |
(g << 8) |
r;
Advertisement
https://www.google.com/search?q=how+to+ask+for+help+in+a+forum

cos(R)=X/pixX^2+pixY^2(Pixel Manipulation)

cos(Wi)=Z/pixX^2+pixY^2(Pixel Manipulation)

Z/X=cos(Wi)/cos(R)

Zsin()+Xcos()
Zcos()-Xsin()
Y
Wi 3bit
R 8bit
Rotation Equation 11bit
Rotation matrix only X
X*(cos(RMS+Wi)+Z/Xsin(RMS+Wi))
Makes an image Wavy Moving closer to the image makes it appear to rotate.

CODE BELOW

for (var RMS = 0; RMS < 256; ++RMS) {
for (var Wir = 0; Wir < 8; ++Wir) {
rotoS[RMS*8+Wir]=-1+1/(Math.cos((RMS+8*Wir)/128.0*3.14)+(Math.cos(Wir/16.0*3.14)/Math.cos(RMS/128.0*3.14))
*Math.sin((RMS+8*Wir)/128.0*3.14))
}
}
data[i+((-Math.abs((i%512)-256)*rotoS[256])+0.5| 0)%512] = (a << 24) |
(b << 16) |
(g << 8) |
r;

Doing this doesn't fix it by the way

rotoS[RMS*8+Wir]=(-1)+
(Math.cos((RMS+8*Wir)/128.0*3.14)+(Math.cos(Wir/16.0*3.14)/Math.cos(RMS/128.0*3.14))
*Math.sin((RMS+8*Wir)/128.0*3.14))

The problem Is basically i use the rotation matrix to get X and subtract the Old PixX and input the new X there isn't anything else

Dear good people of <forum>,

I am trying to do <objective>, and I am not succeeding. I read <source> and I thought <method> would do what I want.

This is what I tried:
<code>

I was expecting to get <expected_result>, but I got <unexpected_result> instead.

I have tried to debug it using <tool> and I am confused about <puzzling_observation>.

Any help would be much appreciated.

Thank you,
<nice_forum_member>

The following shrinks with the Rotation matrix with no artifacts but i prefer the rotation before more. It only scales and doesn't rotate. Since this is the Rotation equation why doesn't it rotate the X,Y,Z plane using Wi as the z divided by magnitude of vector pixX,PixY

rotoS[RMS*8+Wir]=(Math.cos((RMS+8*Wir)/128.0*3.14+Math.cos(RMS/128.0*3.14)/Math.cos(Wir/16.0*3.14)*Math.sin((RMS+8*Wir)/128.0*3.14)))
data[i-i%480+((Math.abs((i%480)-240)*rotoS[64+chig])+0.5| 0)] = (a << 24) |
(b << 16) |
(g << 8) |
r;
}

The following shrinks with the Rotation matrix with no artifacts but i prefer the rotation before more. It only scales and doesn't rotate. Since this is the Rotation equation why doesn't it rotate the X,Y,Z plane using Wi as the z divided by magnitude of vector pixX,PixY

rotoS[RMS*8+Wir]=(Math.cos((RMS+8*Wir)/128.0*3.14+Math.cos(RMS/128.0*3.14)/Math.cos(Wir/16.0*3.14)*Math.sin((RMS+8*Wir)/128.0*3.14)))
data[i-i%480+((Math.abs((i%480)-240)*rotoS[64+chig])+0.5| 0)] = (a << 24) |
(b << 16) |
(g << 8) |
r;
}

I figured it out I have to redo the Zbuffer with Wi if I do it this way which would make it larger than if I just Rerender the plain and I have to make sure I didn't Write the wrong equation for Wi. This takes up more RAM each frame With Zbuffer+NewPixX+newPixY Var each at 8 bit that its more efficient to just rerender the 16 bits.

[attachment=35661:DoesntGetItAtAll.jpg]

Wi was fine when I checked.

This topic is closed to new replies.

Advertisement