[comp.graphics] 3D problem

a976@mindlink.UUCP (Ron Tarrant) (10/12/90)

I'm having a little difficulty wrapping my brain around this
particular problem. I'm hoping someone can stear me in the right
direction.

Problem:        calculate a 3D vector normal ("up" direction) given two
                3D coordinates and a tilt angle in degrees
                (0 = straight up)


Doing this in 2D is easy:

        convert degrees to radians:

                        radians = (degrees * pi) / 180

        then:

                        x = radius * cos(radians)
                        y = radius * sin(radians)


But adding the third dimension is a bit beyond my understanding
at this point. Does anyone know how I might do this?
-Ron Tarrant
a976@Mindlink.UUCP

Please either post here or e-mail directly to me if you prefer.