POV-Ray : Newsgroups : povray.general : Feature ... suggestions : Re: Feature ... suggestions Server Time
20 Apr 2024 11:30:30 EDT (-0400)
  Re: Feature ... suggestions  
From: clipka
Date: 6 Mar 2017 16:01:03
Message: <58bdce0f@news.povray.org>
Am 06.03.2017 um 21:32 schrieb Bald Eagle:
> clipka <ano### [at] anonymousorg> wrote:
> 
>>> 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?
> 
> Yes, and yes.
> ...red, .u, .x, and .real would all be the same.
> ...green, .v, .y, and .imag would all be the same as well.

Hmm... I personally think `.r` and `.i` would be neater.

We could also have `i` as a vector constant `<0,1>`, much like `y` is a
vector constant `<0,1,0>`.

Then again, how about having a /genuine/ complex number type instead?
You know, stuff like:

    #declare Foo = 3 + 4*i;
    #declare Bar = Foo * Foo;

Note how the latter operation wouldn't give the right answer when using
2D vector arithmetics as currently implemented.


>> You mean, something like, say, a... /macro/ ?!
>> Yeah, I think it would be neat if POV-Ray had something like that ;)
> 
> OOOOH!   YES!   Macros would be _cool_.  Can we have macros?  PWEEEEEZE!
> 
> :P

Good news: It just so happens that the newest beta already features them ;)


Post a reply to this message

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