|
|
On 5/19/21 3:55 PM, Tor Olav Kristensen wrote:
> I have also rewritten a few of the macros slightly and added some new ones.
>
I like how macros using functions of transforms & inverse transforms
ended up. :-) Those, I didn't expect you to change and yet what you did
looks to me to be a clever approach to handling a macro's dynamically
defined functions.
I'll have to spend more time thinking about it and the actual inner
workings. I suspect you've gotten to something near like what happens
with prod and sum internally with the vm.
>> A millsion calls.
>> ...
Yes, I'm forever inventing new words! :-) I've not a clue how I arrive
at some of them.
---
I noticed in your vectors.inc the indenting occasionally varies. It
looks like you mostly use increments of four - which is very common -
but OrthogonalVector, for example, uses three. I'd guess because it was
that in math.inc ?
---
I've been looking more at your Mean, Variance, Minimum, Maximum,
PrintStatistics, and Histogram suggestions. First, issue I hit was
testing your comments about vectors.
// Does also work for vectors
#macro Mean(Values)
...
However, dimension_size() expects an array identifier. Is there some
trick to getting vectors to work with dimension_size()? As far as I
know, the dimension* SDL keywords work only with array identifiers and
'defined on call' arrays. The latter meaning:
Mean(array {0.1,0.2,0.3,0.4,0.5})
is OK to do. Yes, this last bit is a little more than what our current
documentation says you can do.
---
I've recently moved the vector analysis macros in math.inc to a
vectoranalysis.inc include - which itself won't be a 'core' include.
Thinking the array statistics a better fit in a similar
arraystatistics.inc include - again now not a 'core' include.
With your vectors.inc, on the other hand, I'm starting to lean toward it
being a 'core' include file. Need to resolve collisions with math.inc
macros as a start.
---
Aside: Instead of moving some of the contents of arraycoupleddf3s.inc to
arrays.inc, I went the other way! I moved the ARRAY_WriteDF3 macro into
arraycoupleddf3s.inc alongside the ARRAY_ReadDF3 macro already therein
along with some other DF3 related macros. I dropped too the ARRAY_
prefixes. I now plan to treat arraycoupleddf3s.inc as a core include
file. I believe reading and writing DF3s should be doable from SDL as
'POV-Ray' is shipped.
Bill P.
Post a reply to this message
|
|