Results 1 to 6 of 6

Thread: 3D Calculations

  1. #1

    3D Calculations

    I'm doing a project for Math, for my Math 11-2 course (G. 11, level 2) and I have decided to do it on 3D Calculations and such. So basically, what I wanted to know, was what types of math's are involved in things like calculating a characters current position, acceleration, direction of motion, things like that. If possible, some (fairly simple) pseudo code would be a great help.

    Basically my project is on anything to do with 3D math. Please try to write anything you give me in a way people who know little 3D related math can understand it... (I have to present this in an understandable format )

    Thanks everyone!
    --MagicRPG--

  2. #2

    3D Calculations

    Look at this:
    http://www.glsoftworks.pastebin.com/f71bee92

    Don't get scared - 10698 lines of code.

  3. #3
    Legendary Member NecroDOME's Avatar
    Join Date
    Mar 2004
    Location
    The Netherlands, Eindhoven
    Posts
    1,059

    3D Calculations

    @Brainer, thats usefull stuff !!

    @DarknessX, for 3D math its mostly matrix and vector calculations. So thats what I would look for.
    NecroSOFT - End of line -

  4. #4

    3D Calculations

    If you have D2006, you can implement vectors like this:
    Code:
    type
      TVector3f = class(TObject)
        X, Y, Z: Single;
    
        class operator Implicit(Value: Single) : TVector3f; // :=
        class operator Add(V1: TVector3f; V2: TVector3f): TVector3f; // +
        { ... and so on ... }
      end;
    I'm not sure, but it should works with records, too.

  5. #5

    3D Calculations

    Thanks alot, thats given me a good starting point for my research...

    @Brainer:
    That huge code file is crazy! I've only gotten a game I was making (text-based) to 3500 lines...

    @NecroDome:
    Thanks, I'll look into those subjects
    --MagicRPG--

  6. #6

    3D Calculations

    Quaternions are also important in 3d, as they're a good representation of a spatial rotation:

    http://en.wikipedia.org/wiki/Quaternion
    http://en.wikipedia.org/wiki/Quatern...atial_rotation
    If you save your data in a proprietary format, the owner of the format owns your data.
    <br /><A href="http://msx80.blogspot.com">http://msx80.blogspot.com</A>

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •