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:25:46 EDT (-0400)
  Re: Help with macro(s) for simulating weather patterns  
From: Alain
Date: 20 Apr 2012 17:50:42
Message: <4f91da32@news.povray.org>
Le 2012/04/20 03:02, Le_Forgeron a écrit :
> Le 20/04/2012 04:34, Alain a écrit :
>>>>
>>>> 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>;
>>>>
>>>>
>
>> 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.
>
> Indeed, I found the overloading a bit too much. Can't it be keep clear
> and meaningful instead of a kludge on max_extend ?
> what about
>
> #declare Resolution = image_size ( Image );
>
> instead ?
> With neat specification about a 3D vector: width in pixel, height in
> pixel, depth in bits or bit per channel ?
> Maybe more than 3D vector ? 3rd one for the number of channels and 4th
> one for the depth in bit per channel ?
> What about alpha... 5D ?
>
> Note: I'm talking about the SDL itself, I find perturbing reusing
> max_extend in such context. I like dog called dog, and cat a cat.
>
>
> If we go down to image analysis in SDL, are we not sacrificing some
> concepts of Povray to make a clone of photoshop/gimp ?
>

As the documentation, that I copyed verbatim, state, it's still in the 
experimental stage. Experimental features are inherently subject to changes.


Post a reply to this message

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