POV-Ray : Newsgroups : povray.newusers : Why didn't this work? : Re: Why didn't this work? Server Time
5 Sep 2024 20:18:12 EDT (-0400)
  Re: Why didn't this work?  
From: Warp
Date: 7 Jul 2000 18:59:32
Message: <396660d4@news.povray.org>
Marc-Hendrik Bremer <Mar### [at] t-onlinede> wrote:
: But I wonder if it would be possible to write a macro which does the
: following:
: 1. Translate the Object which is specified by a parameter to the Origin
: (with whatever point one chooses for the non-existing origin of the object)
: 2. Rotate or scale or whatever the Object by a specified (through a
: parameter) amount
: 3. Translate the Object back to its place

  Quite trivial, I think:

#macro LocalTransform(LocalOrigin, Transformation)
  translate -LocalOrigin
  transform { Transformation }
  translate LocalOrigin
#end

  The same for individual transformations (rotate, scale) if wished

: out where a Object is, say you have a sphere at <10,0,10>. Is it possible to
: get this vector from the "sphere-statement" (without declaring it
: previously)? Did not here about something like this yet.

  As I said, objects do not have local origins.

-- 
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

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