|
|
1. is there a way to define a tuple-style argument to act as the x,y,z for the
function parameters?
Something like #declare _p = ???tuple-thing??? ;
#declare Result = FunctionQ (_p)
2. With #declare F = function {spline ...........}
I have no problems using #declare I = function {F(FunctionQ(x,y,z)).x}
but when I try to use #declare I = function {F(FunctionQ(X,Y,Z)).x}
I get:
Parse Error: Expected 'parameter identifier or floating-point constant
identifier', } found instead
3. for spline functions, is there a syntax (or a work-around) that allows a
function to be used in the vector definition?
#declare FSpline = function {
spline {
linear_spline
0, <0, 0, FunctionW (x,y,z)>
.........
}
}
Thanks
Post a reply to this message
|
|
|
|
Also wondering if there's a way to employ vector component dot notation keywords
in an array, or otherwise/workaround.
Such as:
#declare VecC = array [5] {red, green, blue, filter, transmit];
Thus allowing things like
function { Something (x, y, z).Vec[N] }
Maybe there's a way to "wrap" such things in a directive like keyword (red) or
include (red) so that the parser "reads through" the directive and treats the
internal part as though it were #include-d, and array [1] {include(red)} would
be a valid statement.
I'm only suggesting it because I know clipka relishes the idea of rewriting the
parser. :D
And, just because this never occurred to me the last time we delved into vector
component names:
Perhaps it would help keep things straight for new users, and help avoid
confusion when debugging if there were a numeric designation for vector
components 1-5.
To my knowledge, we don't use @ as a reserved symbol, so maybe
Vector.@1, Vector.@2, Vector.@3, Vector.@4, Vector.@5 could be something to
consider as an addition to the language somewhere down the line.
Post a reply to this message
|
|