Archived

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

Software Renderer, Where to start

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

If you intended to correct an error in the post then please contact us.

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 this post


Link to post
Share on other sites
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

1 0 0 0
0 c -s 0
0 s c 0
0 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 this post


Link to post
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 this post


Link to post
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.

Share this post


Link to post
Share on other sites