POV-Ray : Newsgroups : povray.general : Help with macro(s) for simulating weather patterns : Re: Help with macro(s) for simulating weather patterns Server Time
29 Jul 2024 14:17:51 EDT (-0400)
  Re: Help with macro(s) for simulating weather patterns  
From: Alain
Date: 19 Apr 2012 22:34:38
Message: <4f90cb3e@news.povray.org>

> Alain<aze### [at] qwertyorg>  wrote:

>>> ..........................
>>> (I know there's one around
>>> somewhere, can't find it at the moment).
>>> ..........................
>
>>
>>    From the documentations:
>>
>> As of version 3.7 experimental support for reading the pixel resolution
>> of an image map was added. This is done by giving an image map pigment
>> identifier to max_extent(), which will then return the resolution of the
>> image map as the x and y values of the returned vector.
>>
>> Sample code:
>> #declare Image =
>> pigment {
>>     image_map {
>>       jpeg "YourImage.jpg"
>>       once
>>       }
>>     };
>>
>> #declare Resolution = max_extent ( Image );
>>
>> It return Resolution =<horizontal_size, vertical_size, 0>;
>>
>>
>>
>> Alain
>
> That was indeed it. *feels embarrassed* :(
>
> Thanks Alain, I didn't realise (not having actually used it ;) ) that
> max_extent() returned a vector. This makes things a little easier.
>
> Regards
> D103
>
>
>
>
max_extent() and min_extent() both return vectors. It's needed to define 
the bouncing box of the object used as an argument.
In ordinary use, min_extent return the front or near, bottom left corner 
of the bounding box and max_extent() return the back or far, top right 
corner.


Post a reply to this message

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