POV-Ray : Newsgroups : povray.advanced-users : new 3.71 beta features Server Time
23 Nov 2024 13:17:06 EST (-0500)
  new 3.71 beta features (Message 1 to 2 of 2)  
From: Bald Eagle
Subject: new 3.71 beta features
Date: 25 Jan 2017 08:00:00
Message: <web.5888a06373ecef6dc437ac910@news.povray.org>
Has anyone had a chance to implement any of these yet?

It would be nice to have a collection of short code snippets exemplifying new
features and syntaxes for quick reference, since there seem to be a lot of new
goodies to try out!

There were a few examples provided in the release notes - thank you for that.
Other features' existence was only mentioned, with no "and here's how you'd use
that..." which can save LOTS of time and spark new ideas.

I was reading the changes, and at the moment was specifically interested in:
image metadata
tuple style variables
variable size arrays
and
render block size

I'm sure there are some pretty sweet other improvements that I missed while
skimming through it all  :O


A big thanks to the POV development team for all of the continued fixes and
improvements  :)


Post a reply to this message

From: clipka
Subject: Re: new 3.71 beta features
Date: 25 Jan 2017 10:53:11
Message: <5888c9e7$1@news.povray.org>
Am 25.01.2017 um 13:56 schrieb Bald Eagle:
> Has anyone had a chance to implement any of these yet?
> 
> It would be nice to have a collection of short code snippets exemplifying new
> features and syntaxes for quick reference, since there seem to be a lot of new
> goodies to try out!
> 
> There were a few examples provided in the release notes - thank you for that.
> Other features' existence was only mentioned, with no "and here's how you'd use
> that..." which can save LOTS of time and spark new ideas.

Did you try the docs?

> I was reading the changes, and at the moment was specifically interested in:


> image metadata

Not much to say about this one, except what's stated in the docs:

"Most image formats now include metadata (BMP is a notable exception).
This metadata contains the POV-Ray version, render date/time (GMT),
platform (e.g. x86_64-pc-win), and compiler used to build the POV-Ray
executable."

The data is added automatically, with no way whatsoever for the user to
influence this.

BTW, this feature has already been present since 3.7.0.


> tuple style variables

Sorry to disappoint you, but there are /no/ tuple style variables (as in
`#declare Foo = (42,4711,"Frobnitz");`).

What have been added are tuple style /assignments/ (as in `#declare
(Foo,Bar,Fnord) = (42,4711,"Frobnitz");`), mainly as a means to allow
for macros to "return" multiple data items; e.g.:

    #macro Compute()
      #local A = 42;
      #local B = 4711;
      #local C = "Frobnitz";
      (A,B,C)
    #end

    #declare (Foo,Bar,Fnord) = Compute();

Details can be found in the "Declare and Local Directives" in the docs,
and the new incarnation of the `ior.inc` standard include file may serve
as an example of this mechanism. (*)

(* Well, it /could/ serve as an example if it wasn't broken, as I'm just
discovering right now.)

And of course there are dictionaries, but they're somewhat different
animals.


> variable size arrays

Easy as eating pancakes:

    #declare Foo = array;

will give you a 1-dimensional array that grows automatically whenever
you access an element beyond the current size; e.g.

    #declare Foo[3] = 42;

will increase the array size to 4 elements (0 to 3), leaving elements 0
to 2 undefined; and

    #ifdef (Foo[4711]) ...

will increase the array size to 4712 elements (0 to 4711), which is not
really useful for anything but is a side effect of how this is implemented.

There are no multi-dimensional variable-size arrays.

There is no way to shrink a variable-size array.


> and
> render block size

The `Render_Block_Size=n`/`+BSn` parameter, too, has already been around
since 3.7.0.


> I'm sure there are some pretty sweet other improvements that I missed while
> skimming through it all  :O

Plenty of them! You didn't mention dictionaries, nor optional macro
parameters, nor function-based user-defined cameras, to name just a few ;)

We also have docs that are properly indexed again - yay! ;)


> A big thanks to the POV development team for all of the continued fixes and
> improvements  :)

You're welcome.


Post a reply to this message

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