POV-Ray : Newsgroups : moray.win : Local coordinates? : Re: Local coordinates? Server Time
5 Jul 2024 07:56:28 EDT (-0400)
  Re: Local coordinates?  
From: Ron Parker
Date: 5 Dec 2001 10:52:54
Message: <slrna0sgmo.f1g.ron.parker@fwi.com>
On Wed, 05 Dec 2001 10:05:06 -0500, Timothy R. Cook wrote:
> Is there a way to rotate an object around its local coordinate
> axes?  What I have is this:

In general, you do local transformations before global ones.  If it's
too late for that, you need to transform by the inverse of whatever the
global one was, then do the local, then transform by the global one again.

I once wrote some macros to handle local and global transforms in a
somewhat intuitive way.  They didn't work in 3.1, due to a parser bug 
in the transform{} statement, but they should work in 3.5.  If you'd
like, I can dig them up; they're on this server somewhere.

-- 
#local R=<7084844682857967,0787982,826975826580>;#macro L(P)concat(#while(P)chr(
mod(P,100)),#local P=P/100;#end"")#end background{rgb 1}text{ttf L(R.x)L(R.y)0,0
translate<-.8,0,-1>}text{ttf L(R.x)L(R.z)0,0translate<-1.6,-.75,-1>}sphere{z/9e3
4/26/2001finish{reflection 1}}//ron.parker@povray.org My opinions, nobody else's


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.