Path: chuka.playstation.co.uk!scea!hobbes From: jamin1@psu.edu (Jamin Frederick) Newsgroups: scee.yaroze.programming.3d_graphics Subject: Re: "center" Date: Tue, 30 Jun 1998 16:11:17 GMT Organization: SCEA News Server Lines: 56 Message-ID: <6nb27j$57l1@scea> References: <35911bf4.80589781@news.scea.sony.com> <6n90bb$51f1@scea> <6n90jv$51f2@scea> <35981f6f.2562571@www.netyaroze-europe.com> NNTP-Posting-Host: JAMINFRE.hq.ensco.com X-Newsreader: News Xpress 2.01 So what you're basically doing is rotating the object as usual (the same amount you would want to go around the new pivot point) about the origin, rotating the distance vector of the origin and new pivot point, by the same amount, and applying that translation to the object? Jamin In article <35981f6f.2562571@www.netyaroze-europe.com>, rs108@mdx.ac.uk (Robert Swan) wrote: >On Mon, 29 Jun 1998 21:31:41 GMT, jamin1@psu.edu (Jamin Frederick) >wrote: > >>Ok, here's another problem. How to make an object rotate around separate >>pivot points once it is loaded into memory. For instance, if I load a rod >>object, and decide to push on one end, the pivot point is no longer in the >>center of the rod, but farther at the opposite edge. The question is *how* to > >>rotate the object now, since I don't want it to go around the old pivot point >>(the center), but around the new pivot point. Is there a way to do this >>without having to alter the center of the object, which means changing every >>single polygon vertex?? > >what you have to do is the equivalent of how rotations about any >non-origin point are done. Usually you translate all points so that >the center of rotation is now the origin, rotate, and then do a >reverse translation. In the Yaroze system, I would - > >1) calculate the translation vector that would move the origin to the >center of rotation (in effect, the x,y,z of the center of rotation) > >2) rotate the model by however much you want (this will be around the >origin) > >3) rotate the translation vector from 1) with the same paramters as 2) > >4) calculate what translation vector would map the answer from 3) onto >the original center of rotation (used in 1)) > >5) apply 4) to the whole model. > >this means you never have to alter the tmd strutcure and move >individual vertices. it wont alter the origin for a model but does >allow rotation around any point. > >I hope this is enough, I have somewhere got a routine for calculating >rotations and stuff (I used it in revolution to get objects rotating >around the ship so you could grab a 2d version of it from their). Ill >have a look if youre still stuck > >Robert Swan >rs108@mdx.ac.uk >http://www.netyaroze-europe.com/~middex2 >