Computer Science Canada 3D program, Camera help. |
Author: | copthesaint [ Thu Apr 09, 2009 9:59 pm ] |
Post subject: | 3D program, Camera help. |
Ok so currently this program will create a rectangular prism at a point and using the arrow keys you can move the camera around the object. What I want to do is now is by using the 'a' and 'd' I want to change the spin for the camera to rotate it. Also I want to change the pitch (vertical angle) with the keys 'w' and 's' . But I don't know how to use Sind / Cos. If some could maybe spend a couple of min. to help teach me what they do that would be great. Thanks. Also any help for how to improve this would be great. |
Author: | TokenHerbz [ Sat Apr 11, 2009 10:51 am ] |
Post subject: | RE:3D program, Camera help. |
3D coding isn't about programming, its mostly about math, So unless you have a great understanding on math skills needed, (you can read about it online and learn it) I wouldn't bother with this because it'll overwhelm you. Learn the math first, the coding isn't nearly as time consuming as the time your spend thinking about what your doing. None the less, I Wouldn't even run any 3D things on Turing, it's way to slow and crap-tastic.. My two cents |
Author: | saltpro15 [ Sat Apr 11, 2009 11:27 am ] |
Post subject: | RE:3D program, Camera help. |
I agree with Tokenherbz, it'll be way too slow in Turing, I recommend doing it in c++ with openGL if you want it to run smoothly |
Author: | copthesaint [ Sun Apr 12, 2009 12:57 am ] |
Post subject: | Re: 3D program, Camera help. |
saltpro15 wrote: I agree with Tokenherbz, it'll be way too slow in Turing, I recommend doing it in c++ with openGL if you want it to run smoothly I DON'T, care if it runs slow. I want to use a basic program that will require a min of required code use to make this program. Again speed is not an issue. Now does anyone want to try and help me or just criticize me? I am willing to spend any amount of time and don't post "well why don't you talk to your teachers" because now of them will ever help me at there own time. Moderator edit: Removed flaming, for the better. |
Author: | [Gandalf] [ Sun Apr 12, 2009 1:28 am ] |
Post subject: | RE:3D program, Camera help. |
copthesaint, he wasn't trying to insult you. At least if he was, he definitely wasn't doing a good job of it. It's simply true that making a 3D engine will require as much math as programming skill, if not more. That's not to discourage you or say you will fail, however you should look into the math before moving on. Especially if you don't even know basic trigonometry. Keep at it, keep reading about trig, matrices, etc and you'll be well on your way. |
Author: | saltpro15 [ Sun Apr 12, 2009 8:00 am ] |
Post subject: | RE:3D program, Camera help. |
haha alright, but when it's running at 2 fps and you're beating your head off the keyboard, well, don't blame me... http://compsci.ca/v3/viewtopic.php?t=19526&highlight=engine this'll help |
Author: | copthesaint [ Sun Apr 12, 2009 2:50 pm ] |
Post subject: | RE:3D program, Camera help. |
Yea it would help if there were comments. I've already looked at this before, but this doesn't help without explaining the code. |
Author: | zero-impact [ Sun Apr 12, 2009 6:25 pm ] |
Post subject: | RE:3D program, Camera help. |
http://compsci.ca/v3/viewtopic.php?t=20164&highlight=zeroimpact I made this engine a few months ago. Eventually DemonWasp stepped in and helped me out a bit. My original versions are rather small and shouldn't be that hard to understand. Here is a modified version by DemonWasp that has comments in neccesary places. http://compsci.ca/v3/download.php?id=6246 You can pm me if you have any further questions about it because i may forget about this thread |
Author: | copthesaint [ Sun Apr 12, 2009 8:37 pm ] |
Post subject: | RE:3D program, Camera help. |
Thank you Zero-impact, and I will Pm you for help after I've tried to learn from this. Hopefully after two or so weeks, I will understand the concept of 3D better. The File (Vector3f.t) is not available. you forgot to upload it with demons 3d engine |
Author: | zero-impact [ Sun Apr 12, 2009 8:47 pm ] |
Post subject: | RE:3D program, Camera help. |
If you search around on that thread you can find it. Good luck! |
Author: | copthesaint [ Mon Apr 13, 2009 9:48 pm ] |
Post subject: | RE:3D program, Camera help. |
Ok. How would I rotate a 2d square? (Don't be "funny" and say Pic.Rotate.) I want to have it so that the square or polygon, Is actually rotating, AND still staying at its same point. I realized that to make a 3d program, the object will have to rotate at it's x,y, and z axis. doing this you can see all the faces of the shape. Help would be nice :p and thank you to who ever helps me! I have been tring different things and had in ways some success, but As this is the 4th time typing this post , I cant explain what I've done... |
Author: | zero-impact [ Mon Apr 13, 2009 10:01 pm ] |
Post subject: | RE:3D program, Camera help. |
Google is your friend http://www.google.ca/search?q=2d+rotation |
Author: | copthesaint [ Tue Apr 14, 2009 1:18 pm ] | ||
Post subject: | Re: 3D program, Camera help. | ||
Ok I want my square to accually spin. But the square it's self just moves in a circle. Can someone explain what I have to do to get the sqare to stay in one spot but still rotate?
|
Author: | Homer_simpson [ Wed Apr 15, 2009 1:22 am ] |
Post subject: | Re: 3D program, Camera help. |
you must rotate every vertex in your cube around the center of the cube and you calculate the center of your cube by getting the average of every coordinate like so centerx= (x1+x2+x3+x4+x5)/5 and so on |
Author: | copthesaint [ Thu May 21, 2009 1:34 pm ] | ||
Post subject: | Re: 3D program, Camera help. | ||
Well Ive kept trying for a while but just recently we started laerning trig. The following code does creat a '3d' shape, but I would like to know what to do next to rotate.
|
Author: | Vermette [ Thu May 21, 2009 2:02 pm ] |
Post subject: | Re: 3D program, Camera help. |
If you want to do arbitrary 3d rotations right, learn about Quaternions so that you can avoid Gimble lock. |