🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: rec.games.programmer
Article #1408

Re: 3D Rotation

#1408
From: Gene Ressler
Date: Fri, 05 Apr 1991 23:21
32 lines
2289 bytes
In article <1991Apr05.224711.12750@lynx.CS.ORST.EDU> murrayk@prism.CS.ORST.EDU writes:
>
>I have been working on programming my IBM compatible (286 for now, soon to
>be a 486) :) for quite some time now and I have some aspirations to
>program a game that uses 3-dimensional graphics, probable line graphics.
>I have looked all over the country for books on the subject.  I have read
>books that include code, and books that include theory from which I
>created my own code.  All to no avail.  I can rotate things up the
>yin-yang but the rotations are not correct.  They seem to be absolute to
>the screen, not to the actual object.  I have tried every thing I can
>think of to remedy this problem, but I have had no luck.  I don't know if
>I am just missing something elemental or if there is actually a big idea
>that I just don't see...
>
>I would be really happy to hear from anyone with some experience in this
>field about what I am doing wrong.  Thanks a LOT.  This problem has been
>giving me headaches for quite some time now.
>
>Keith Murray

You couldn't have looked _that_ hard.  Any descent text on computer
graphics will discuss homogeneous view transforms.  The idea you are
looking for is to translate the object so the point you wish to be
the center of rotation is at the origin, rotate, then translate back.
Of course you can concatenate these three into a single transformation
(in matrix form or all the way to hard-coded arithmetic).

See for example Foley and Van Dam, or for a slightly simplified treatment,
Hearn and Baker.  There are dozens of others.

Good Luck.  Graphics are a blast.
Gene Ressler
Technical Details
Message-ID: <1991Apr5.232125.18139@cs.cornell.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!elroy.jpl.nasa.gov!sdd.hp.com!zaphod.mps.ohio-state.edu!rpi!batcomputer!cornell!ressler
References: <1991Apr05.224711.12750@lynx.CS.ORST.EDU>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!elroy.jpl.nasa.gov!sdd.hp.com!zaphod.mps.ohio-state.edu!rpi!batcomputer!cornell!ressler
From: ressler@CS.Cornell.EDU (Gene Ressler)
Newsgroups: rec.games.programmer,alt.msdos.programmer,comp.os.msdos.programmer
Subject: Re: 3D Rotation
Keywords: 3D, rotation, real
Message-ID: <1991Apr5.232125.18139@cs.cornell.edu>
Date: 5 Apr 91 23:21:25 GMT
References: <1991Apr05.224711.12750@lynx.CS.ORST.EDU>
Sender: news@cs.cornell.edu (USENET news user)
Organization: Cornell Univ. CS Dept, Ithaca NY 14853
Lines: 32
Nntp-Posting-Host: cello.cs.cornell.edu