POV-Ray : Newsgroups : povray.general : Feature ... suggestions : Re: Feature ... suggestions Server Time
25 Apr 2024 10:02:11 EDT (-0400)
  Re: Feature ... suggestions  
From: clipka
Date: 6 Mar 2017 14:29:10
Message: <58bdb886$1@news.povray.org>
Am 06.03.2017 um 16:20 schrieb Bald Eagle:
> Just putting this out there as a suggestion - things I've recently thought could
> be useful or have been bouncing around in the back of my mind.
> 
> New dot operators - .real and .imag, for when programming arrays of complex
> numbers
> #declare Complex = array [n] {<Real, Imag>, ....}
> 
> Then it would be easy to read variables as Complex[n].real and Complex[n].imag

Doesn't sound like array-related to me at all, rather a feature of
2-dimensional vectors.

You realize that those would be aliases for `.x` and `.y`, right?


> I was running a scene in 3.7 after I wrote it in 3.7 Beta 2 and used the new
> Built-In Variable tau.
> I don't think a statement like #ifdef (tau) works.

You're correct. That's why you get a warning if you try.

> Perhaps some way to determine from SDL if a name is reserved by POV-Ray?

Why, yes, of course: Start your scene with

    #version version; // sic!
    #if (version >= 3.71)
        #define Tau_Is_Reserved = true;
    #else
        #define Tau_Is_Reserved = false;
    #end
    #version 3.7; // minimum version

;)

Of course this won't work with earlier 3.7.1 development versions; but
that's how things go with those alpha versions: You can't count on
scenes running on any given alpha to later run on the real deal (or even
the very next alpha).


> Transposed array format.   Because the down then over format drives me nuts.
> I think in over then down, especially when reading the definition in SDL,
> because it's written on the screen over, then down.  :(

POV-Ray's format is standard in pretty much each and every programming
language, and I know of none that provides an alternative format.

The reason behind this is consistency of 2-dimensional arrays with
arrays-of-arrays:

    declare Foo = array[2][3] {
      { "0.0", "0.1", "0.2" },
      { "1.0", "1.1", "1.2" },
    }
    declare Bar = Foo[A][B];

has the same effect as:

    declare Foo = array[2] {
      array[3] { "0.0", "0.1", "0.2" },
      array[3] { "1.0", "1.1", "1.2" },
    }
    declare Bar = Foo[A][B];


> Secondary comment type which invokes a different color in the editor.
> Could be useful for highlighting things if there was red text in a sea of green
> commenting.

Sounds like more of a feature suggestion for an editor than POV-Ray /per
se/, provided you make that secondary comment type a subset of the
standard comment type. E.g, you could hack your editor's syntax
highlighting scheme to mark comments starting with `/*!` or `//!`
differently.

As we consider the Windows GUI pretty much obsolete and not worth
putting any effort into it in terms of "nice to have" features (we'd
much rather invest our time and energy into a new Qt-based GUI), and
also because this would actually have to be implemented in the editor
DLLs which we're /very/ reluctant to change now (due to the licensing
issues involved), I can almost guarantee that you won't see this feature
implemented in that thing we currently call "POV-Ray for Windows".


> Command aliases.  A way to tell the parser to treat all instances of a statement
> as a command to do "X"  - just like in a Unix shell.

You mean, something like, say, a... /macro/ ?!
Yeah, I think it would be neat if POV-Ray had something like that ;)


Post a reply to this message

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