Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

3d related c++ question

Status
Not open for further replies.

Macrado

Programmer
Oct 11, 2003
3
0
0
US
Hi -

I'm writing a program that works heavily with 3-dimensional coordinates. What I wind up with is several line segments going from one point to the next, to the next, and so on - kind of like a 3d "connect the dots". I've gotten to a point where the points are being laid out fine - but what I want to avoid is having line segments that intercect, or come close to intersecting. Bear in mind that each point connects only to the next point in the list (and thus, each point would also connect to the previous point).

The theory I have to accomplish this is to create sort of a 3D vector surrounding each line, and to be able to check if any of these vectors overlap.

The program does not actually do any drawing, it just calculates these points. Is there an existing class that I can use to create this 3D vector? My program would be able to supply the height, width, and length of each vector, as well as the x, y, and z coordinates of each end point. If anyone knows of a class that can do this, please let me know!! Also, I found this harder to explain than I thought I would, if you think you can help, and would like more information, please ask!

Thanks!!

~~Macrado~~
 
you can use OpenGl. All these calculations and many facilities/optimisations are available there.

Ion Filipski
1c.bmp

ICQ: 95034075
AIM: IonFilipski
filipski@excite.com
 
Thanks for the feedback, I will try that. Question about it though...do I need to install anything to use it, or is it included with most compilers?

~~Macrado~~
 
I think it is not included but default in some compillers, but often it is.

Ion Filipski
1c.bmp

ICQ: 95034075
AIM: IonFilipski
filipski@excite.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top