Archived

This topic is now archived and is closed to further replies.

Software Renderer, Where to start

This topic is 6009 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

Recommended Posts

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)

Share on other sites

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

Share on other sites
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.

Share on other sites
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.

1. 1
2. 2
3. 3
4. 4
Rutin
12
5. 5

• 26
• 10
• 9
• 9
• 11
• Forum Statistics

• Total Topics
633694
• Total Posts
3013378
×