POV-Ray : Newsgroups : povray.general : position of object after CSG transforms Server Time
3 Aug 2024 08:14:23 EDT (-0400)
  position of object after CSG transforms (Message 1 to 2 of 2)  
From: Rafal 'Raf256' Maj
Subject: position of object after CSG transforms
Date: 14 Apr 2004 15:07:45
Message: <Xns94CBD6DA4A88Draf256com@203.29.75.35>
Hi,
I have quite compicated CSG object like


union {
  union {
    sphere {  }  // <--- A
    rotate ...  translate ..
  }
  rotate ...  translate ..
}
// <--- B

and I want to find out what wuld be position of object A in place B (in 
coordinates in scope B).  I could do manualy:


union {
  union {
    sphere { CENTER 1  }  // <--- A
    rotate R1  translate T1
  }
  rotate R2  translate T2
}
// <--- B
#local P = vrotate(vrotate(CENTER,R1)+T1  ,  R2) + T2;

(or simmilar formula) but is there some shor cut? If not maybe its worth to 
add such possibility, it will be greate for more advanced cript (area in 
with Pov *rulez*)

i.e. I have some code as above that creates an robot-arm, and I want to 
know absolute position of end of arm so that I can write script that will 
create nice cable (spline/spheresweep) from end of arm to computer etc...



-- 
http://www.raf256.com/3d/
Rafal Maj 'Raf256', home page - http://www.raf256.com/me/
Computer Graphics


Post a reply to this message

From: Slime
Subject: Re: position of object after CSG transforms
Date: 14 Apr 2004 15:29:54
Message: <407d9132$1@news.povray.org>
Look into the vtransform() function and the transformation{...} object.


Post a reply to this message

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