So I am trying to demonstrate the phenomenon of moire fringes in d3d, because I hope to model the fringes in 3d using rapid prototyping in a cse class i'm taking
So but basically, I'm just trying to simulate the concept of two screens running by each other.
I have two sets of lines in two different vertex buffers.
What I want to do is quite like this image
I have something like this
This has the intention of only rotating one set of lines, but the whole world gets flipped around when I apply the rotation. I just want one of the two sets of lines to rotate around the z. TipzCode:pd3dDevice->BeginScene(); static float i = 0.0; i += 0.01; D3DXMATRIX mWorld, mView; D3DXMatrixRotationY( &mView, i ); D3DXMatrixTranslation( &mWorld, 0.0f, 0.0f, 5.0f ); pd3dDevice->SetTransform( D3DTS_WORLD, &mWorld ); pd3dDevice->SetFVF( D3DFVF_MY_VERTEX ); pd3dDevice->SetStreamSource( 0, pCircleList, 0, sizeof(Vertex) ); pd3dDevice->DrawPrimitive( D3DPT_LINELIST, 0, (67 * 720) / 2); pd3dDevice->SetTransform( D3DTS_WORLD, &mView ); pd3dDevice->SetStreamSource( 0, pLineList, 0, sizeof(Vertex) ); pd3dDevice->DrawPrimitive( D3DPT_LINELIST, 0, (300) / 2); pd3dDevice->EndScene();