 |
 |
|
 |
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Hello,
With this :
#declare Datas = array mixed;
#declare Datas[0] = <1,2,3>;
#declare Datas[1] = <1,2,3,4>;
#declare Datas[2] = <1,2>;
how can you tell that the vector in Datas[0] has 3 components and the
vector in Datas[1] 4 ?
So far, I haven't found anything online about this. So a little help
would be appreciated ;)
--
kurtz le pirate
compagnie de la banquise
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
hi,
kurtz le pirate <kur### [at] free fr> wrote:
> With this :
> #declare Datas = array mixed;
> #declare Datas[0] = <1,2,3>;
> #declare Datas[1] = <1,2,3,4>;
> #declare Datas[2] = <1,2>;
>
> how can you tell that the vector in Datas[0] has 3 components and the
> vector in Datas[1] 4 ?
in a word, you/we cannot.
> So far, I haven't found anything online about this. So a little help
> would be appreciated ;)
iirc, both Bald Eagle and WFP have partial solutions. (no refs, sorry)
if only 2/3/4 vector data is stored, you could combine vector and #components in
a 5-vector ?
regards, jr.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On 2026-07-03 12:11 (-4), kurtz le pirate wrote:
>
> #declare Datas = array mixed;
>
> #declare Datas[0] = <1,2,3>;
> #declare Datas[1] = <1,2,3,4>;
> #declare Datas[2] = <1,2>;
>
>
> how can you tell that the vector in Datas[0] has 3 components and the
> vector in Datas[1] 4 ?
I managed to figure something out for some special applications in two
of my libraries. Have a look at macro Caption__Get_padding() in
caption.inc and macro Lamp_Has4D() in desklamp.inc and see if you can
generalize them.
https://github.com/CousinRicky/POV-Caption/blob/main/caption.inc
https://github.com/CousinRicky/POV-DeskLamp/blob/main/desklamp.inc
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"jr" <cre### [at] gmail com> wrote:
> iirc, both Bald Eagle and WFP have partial solutions. (no refs, sorry)
I have a full solution.
https://news.povray.org/povray.general/message/%3Cweb.682bc388985098ff1f9dae3025979125%40news.povray.org%3E/#%3Cweb.682
bc388985098ff1f9dae3025979125%40news.povray.org%3E
There's a slightly more advanced version posted sometime last year, but this
should do ya.
- BE
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"Bald Eagle" <cre### [at] netscape net> wrote:
> There's a slightly more advanced version posted sometime last year,
https://news.povray.org/povray.advanced-users/message/%3Cweb.68478f382f29ff11f9dae3025979125%40news.povray.org%3E/#%3Cw
eb.68478f382f29ff11f9dae3025979125%40news.povray.org%3E
- BE
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Thanks for your replies, guys.
Those are some really clever solutions. Bravo.
I'm not sure yet if I'll use them or rewrite my code so I don't have to
run those tests anymore.
Thanks again
--
kurtz le pirate
compagnie de la banquise
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On 7/3/26 16:08, jr wrote:
> iirc, both Bald Eagle and WFP have partial solutions. (no refs, sorry)
FWIW, sample yuqk code using its id_type() keyword.
//---
#version unofficial 3.8; // yuqk
#if (file_exists("version.inc"))
#include "version.inc"
#end
#if (!defined(Fork_yuqk))
#error "This POV-Ray SDL code requires the yuqk fork."
#end
#include "setidtypes.inc" // init global.dictIdTypes dictionary
McrPrintGlobalDictIdTypes(true) // Utility macro to print types
#declare Datas = array mixed;
#declare Datas[0] = <1,2,3>;
#declare Datas[1] = <1,2,3,4>;
#declare Datas[2] = <1,2>;
#if (id_type(Datas[2])=global.dictIdTypes.v2d)
#debug "\nDatas[2] is a 2D vector\n"
#end
#if (id_type(Datas[0])=global.dictIdTypes.v3d)
#debug "\nDatas[0] is a 3D vector\n"
#end
#if (id_type(Datas[1])=global.dictIdTypes.v4d)
#debug "\nDatas[1] is a 4D vector\n"
#end
#debug "\n"
#error "No objects. Testing SDL."
//---
Bill P.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
William F Pokorny <ano### [at] anonymous org> wrote:
Well hello there, stranger.
Hope all is going as well as can be.
We've missed you in these parts.
- BW
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |