Re:virtual Reality

 BBS: Inland Empire Archive
Date: 07-19-92 (23:41)             Number: 62
From: RICH GELDREICH               Refer#: NONE
  To: MARK KO                       Recvd: NO  
Subj: Re:virtual Reality             Conf: (2) Quik_Bas
> I need an opinion.
> I am working with a "virtual reality" program in C and QB. I'm
> wondering if it feasable to have the program check or "know" which
> points to evaluate and plot on the screen and ignore those that are
> out of view? This is because my progrma will invovle "many" points...
>

    Of course there's a way!

    Many flight simulators just rotate a cube that is around the viewer,
like this:

    ------
    !    !
    ! ** !  <--- the viewer is here
    !    !
    ------

    ...whatever is not inside of the 3-D cube just isn't rotated. The
density of your points and the size of the cube affect how good it
looks(the bigger the cube, the more points the viewer can see).

    To tell if a 3-D point is inside of the cube or not, just check out
its X Y and Z coordinates for valid ranges. First check the X
coordinate, if it's within the box then check the Y coordinate, and if
it's in the box then finally check the Z coordinate. If all of the
points are in the box then that point should be rotated.

    I have released some assembly routines for rotating 3-D points. I
think I uploaded to AFU BBS a couple of weeks ago. They can be made QB
or C callable...

    Hope that helps out!

    Rich

--- RBBSMAIL 17.2A
 * Origin: Computer Co-Op RBBS HST, 609-784-9404 Voorhees
NJ (RBBS-PC 1:266/29)
Outer Court
Echo Basic Postings

Books at Amazon:

Back to BASIC: The History, Corruption, and Future of the Language

Hackers: Heroes of the Computer Revolution (including Tiny BASIC)

Go to: The Story of the Math Majors, Bridge Players, Engineers, Chess Wizards, Scientists and Iconoclasts who were the Hero Programmers of the Software Revolution

The Advent of the Algorithm: The Idea that Rules the World

Moths in the Machine: The Power and Perils of Programming

Mastering Visual Basic .NET