Software Renderer, Where to start
I want to know the formulas for:
Rotating a Point on X axis
Rotating a Point on Y axis
Rotating a Poing on Z axis
Moving a Point X Y and Z
Drawing a 3D Point (X,Y,Z) on a 2D screen (X,Y)
Thanx
Horny Farmer (Jolly Rancher)
I want you to reconsider your way of asking politely.
Depending on how you''re used to do matrix*vector multiplications either the following matrices or their transposeds
For all: s = sin(angle), c = cos(angle)
Rotating a Point on X axis
Rotating a Point on Y axis
Rotating a Point on Z axis
Translating a point by x,y,z
---------------------------
I may be getting older, but I refuse to grow up
Depending on how you''re used to do matrix*vector multiplications either the following matrices or their transposeds
For all: s = sin(angle), c = cos(angle)
Rotating a Point on X axis
1 0 0 00 c -s 0 0 s c 00 0 0 1
Rotating a Point on Y axis
c 0 s 0 0 1 0 0 -s 0 c 0 0 0 0 1
Rotating a Point on Z axis
c -s 0 0 s c 0 0 0 0 1 0 0 0 0 1
Translating a point by x,y,z
1 0 0 0 0 1 0 0 0 0 1 0 x y z 1
---------------------------
I may be getting older, but I refuse to grow up
Check the ''Articles & Resources'' section on this site. Once there click the ''Graphics'' link. Any resource you could want on that subject should be found there.
What the heck, I''ll post it any way:
3D -> 2D
X = XRES / 2 * (X / Z) + XRES / 2
Y = YRES / 2 * (Y / Z) + YRES / 2
There you are
Devide x and y with z, and multiply by half of resolution, and add half of resolution to center. I''m not in the mood of explaination.
3D -> 2D
X = XRES / 2 * (X / Z) + XRES / 2
Y = YRES / 2 * (Y / Z) + YRES / 2
There you are
Devide x and y with z, and multiply by half of resolution, and add half of resolution to center. I''m not in the mood of explaination.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement