POV-Ray : Newsgroups : povray.general : transformations : Re: transformations Server Time
4 Aug 2024 12:12:53 EDT (-0400)
  Re: transformations  
From: Bill Hails
Date: 17 May 2003 13:32:30
Message: <3ec6722e@news.povray.org>
I wrote before thinking about it:

> Hi
> I guess this is more of a wish than a question, but I'm consistently
> and pleasantly surprised by your answers :-)
> 
> What I'd like is to be able to apply arbitrary transformations to
> vector expressions and get vector expressions back.
> 

Just after posting this I thought of an easy way to do it:

#macro transform_vector(V, T)
    #local S = sphere { V, 1 transform T }
    #local Min = min_extent(S);
    #local Max = max_extent(S);
    ((Min + Max) / 2)
#end

-- 
Bill Hails


Post a reply to this message

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