|
|
clipka <ano### [at] anonymousorg> wrote:
> > 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.
I like it. A dedicate complex number system would be very nice.
I'm still more of a fan of .real and .imag.
(I'm actually a bigger fan of _both_ so folks can choose to use one or the
other)
Post a reply to this message
|
|
|
|
What would it take to get a "Point" or "Vector" object{} ?
I thought it might be useful as a "tag" to follow objects around ("Where did my
xyz go???")
The corners of a box could be defined with those vectors/points, and then when
it was transformed, the actual corners of the box - not the bounding box could
be easily accessible by the user.
It would be handy to just define that and plop it into a union to be transformed
like any other object{}, with the same exact syntax - especially for new users
who would have a hard time struggling with all of that vtransform stuff - it's
cumbersome and confusing until you've used it enough times to get the hang of
it.
Post a reply to this message
|
|
|
|
Am 21.03.2017 um 15:12 schrieb Bald Eagle:
> What would it take to get a "Point" or "Vector" object{} ?
>
> I thought it might be useful as a "tag" to follow objects around ("Where did my
> xyz go???")
> The corners of a box could be defined with those vectors/points, and then when
> it was transformed, the actual corners of the box - not the bounding box could
> be easily accessible by the user.
>
> It would be handy to just define that and plop it into a union to be transformed
> like any other object{}, with the same exact syntax - especially for new users
> who would have a hard time struggling with all of that vtransform stuff - it's
> cumbersome and confusing until you've used it enough times to get the hang of
> it.
What you suggest would be inconsistent with the existing primitives.
Remember that
#declare Foo = sphere {...}
#declare Bar = union { object{Foo} ... translate ... }
will /not/ modify `Foo`, but rather add a nameless copy of it to `Bar`; so
#declare Foo = point {...}
#declare Bar = union { object{Foo} ... translate ... }
should, for the sake of consistency, not modify `Foo` either, making the
whole thing pretty useless.
Post a reply to this message
|
|