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:16:22 EDT (-0400)
  Re: Help with macro(s) for simulating weather patterns  
From: D103
Date: 16 Apr 2012 20:15:01
Message: <web.4f8cb572d5742bdd5ae2687f0@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


Post a reply to this message

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