i already made a program, that simulates a sine wave moving (http://noperator.de.vu). Now I would like to simulate a 3 dimensional sine wave, but of course, it doesn't make any sense to display it from above perspective (like you're looking on it being exactly over it).

so i have to include the view point somehow into my calculations. the formula for this 3 dimensional sinewave at a specific time is:
Posted on 2002-01-14 15:10:02 by NOP-erator
I'm not sure if you are actually looking for help since you didn't ask any question, but if you are my advice would be to use your formual to calculate the 3d coods of different points on the sine wave, then have a seperate 3d rendering part which displays it.

I'm sort of annoyed now that I never finished my 3d tutorial properly so you could follow that, but if you do have any problems with the 3d part just ask. Maybe you dodn't need help, and I'm just jumping the gun here.

Of course you could also use OpenGL/D3D if you wanted.
Posted on 2002-01-15 04:40:53 by Eóin
the question is, how to change or set the perspective from which i'm looking at this 3d-sinewave. you said something about a seperate 3d rendering part, or using opengl/d3d

how would this look like? i can't even imagine how to do that.
it's a real pitty that you haven't finished your 3d tutorial, i would be very interested in it.

Posted on 2002-01-15 12:03:42 by NOP-erator
Well if you wait till Friday I'll be able to help you then, at the moment I'm doing exams. :mad:
Posted on 2002-01-16 06:27:29 by Eóin
hehe, of course i can wait. there is no other way......

Posted on 2002-01-16 13:27:25 by NOP-erator
NOP, I still have one exam left to do on Monday, so my weekend won?t be that free. But here are some things to get started on.

The basic procedure for displaying the wave would go as follows

1) Use the formula to generate some coordinates for points along the wave. These should be stored in an array as follows XYZXYZXY?.
2) Use matrix multiplication to transform the array. This is what will allow you to rotate it in 3d space
3) Render the array. This involves mapping the X & Y cords of the transformed array to the screen. The Z coord can be used for depth testing, but that probably won?t be need in this case.

Looking at your Sine Wave program I know you?re more than capable of writing step 1, you should also be able to do step 3. Either you would write a drawing procedure which would read the X & y values out of the X, Y , Z array and connect the points with line, or you could transfer the X & Y values into a second array and use PolyLine in much the same fashion as your Sine Wave program does. The second method here is probably the best

As for Step 2, I?ll get back to you soon, let me know how get with these two first.

Before you know it you?ll have your own 3d engine. And you?ll understand it best when you?ve written the actual code yourself.
Posted on 2002-01-18 20:46:27 by Eóin

thank you for your help E?in. I've a lot to do this weekend, for school, driving license, and some other private stuff, so I won't have the time. I ensure you, that I'll start with the tasks you gave me on monday.....
Thanks again, that you take some time to help me.

Posted on 2002-01-19 04:51:46 by NOP-erator
Their not tasks NOP, they're "Steps" :) . But seriously though don't feel any obligation or anything do them. Its just if you want, thats all.
Posted on 2002-01-19 06:34:45 by Eóin
Alright E?in, I don't see the steps as real tasks, i just don't want to disappoint you.....i don't take it for granted that you help me, cause you don't have to, of course.

thanks again,
Posted on 2002-01-19 07:22:16 by NOP-erator
Hi E?in,

sorry, but I won't have time in the next days to follow the steps. i'm too busy right now....
i hope that you get an email notification of new posts in this thread, so that you can start helping me when i will be ready...

Posted on 2002-01-22 08:57:52 by NOP-erator
No problem NOP, :alright:
Posted on 2002-01-22 14:38:01 by Eóin