|
|
clipka <ano### [at] anonymousorg> wrote:
> Why, yes, of course there is a way. There always is. But it all depends
> on the format your data originally comes in.
>
> For instance, you could rewrite the above as:
>
> vertex_vectors {
> 4,
> #for(U,0,1)
> #for(V,0,1)
> <vx[U][V],vy[U][V],vz[U][V]>,
> #end
> #end
> }
>
> though I would normally recommend generating the data as a single array
> of vectors, rather than three arrays of scalars, so that you could
> simply write:
>
> vertex_vectors {
> 4,
> #for(U,0,1)
> #for(V,0,1)
> v[U][V],
> #end
> #end
> }
>
> Maybe this is sufficient to give you an idea or two; if not, let us know
> a few more details.
Thanks very much! I was looking for the first way, but your second suggestion is
too elegant not to use it (I can't help, it somehow reminds me of Python)! It's
already implemented and works like a charm.
Bald Eagle: Thanks too! It's actually not the original tea pot, just similar in
general shape. And yes, data already comes in mesh2-format, I just did not know
that there is such an easy way to fill it into the mesh2.
And of course thanks for all the "side-ideas" - if they don't solve the problem,
they usually are an inspiration for further work :)
Post a reply to this message
|
|