Segmented line in 3D space

Segmented line in 3D space

Post by Alan McFarlan » Sat, 04 Dec 1999 04:00:00



Given a two points with the following structure:

struct
{
  float fx, fy, fz; /* 3D coordinate */
  int sx, sy;      /* projected 2D corrdinate */

Quote:}

P1, P2;

How can I I draw a line between the the points, using multiple segments,
each one colored according to the value of 'z' at that point?

--
Alan McFarlane

 
 
 

Segmented line in 3D space

Post by Damian Yerric » Sat, 04 Dec 1999 04:00:00


(question xposted to comp.graphics.algorithms)


> Given a two points with the following structure:

> struct
> {
>   float fx, fy, fz; /* 3D coordinate */
>   int sx, sy;      /* projected 2D corrdinate */
> }
> P1, P2;

> How can I I draw a line between the the points, using multiple segments,
> each one colored according to the value of 'z' at that point?

> --
> Alan McFarlane



 
 
 

1. I need to find the center of a triangle in 3D space, help!

I am creating my own graphics library that does alpha-blending,
anti-aliasing, tri-linear buffering, and all that stuff (software based)....

My only problem is I need to know how to rotate around the objects center,
so i need to know how to rotate around the center of a triangle!! Right now,
it is rotating around the origin and looks horrible.

Does anyone know how to find the center point of a triangle from the
coordinates of 3 vertices?? And does anybody know the formula (without
matrices! !yikes!) to rotate an object around a specific point? Like if i
wanted to rotate a triangle around point (2,2,1)??  [x,y,z]

Thanx for your help!!

2. Cardinal MVPV34XF, how do I find speed at end of call?

3. DOS Command Line Utility to show Total Space used in a directory

4. Access to the electronic frontier: ISDN

5. end of line space problem

6. Setting Up new users

7. Plush 3D - Portable 3D graphics lib that works with djgpp

8. Recommended cameras

9. 3D Graphics WITH 3D engine IN djgpp THAT can read 3ds

10. Fw: Bison and [f]lexical tie-ins

11. I need Ctrl-Ins in BC 3.1 again

12. Trapping Ctrl-Alt-Del and Ctrl-Alt-Ins

13. Switch to COMMAND.COM ins