POV-Ray : Newsgroups : povray.general : Mesh rendering artifacts : Re: Mesh rendering artifacts Server Time
23 Apr 2024 05:53:35 EDT (-0400)
  Re: Mesh rendering artifacts  
From: Tor Olav Kristensen
Date: 31 Jan 2023 22:20:00
Message: <web.63d9da1d249f0076383c879289db30a9@news.povray.org>
"yesbird" <nomail@nomail> wrote:
> Hi, Tor.
> >
> > Have you not yet met Emacs?
> >
> >   ;-)
>
> Already no, I leaved it about 10 years ago. )

What ?
Didn't you want to be saved ?
You can still join the congregation...


> > See the attached zip-file.
> You are the wizard - what a beauty those normals !
> Thanks a lot - this is another piece of code for embedding.

You're welcome.

Instead of #declaring a vertex, normal and color on each line,
like this:

#declare I = I + 1;
#declare VV[I][0] = <3.43, 7.67, 1.83>;
#declare NN[I][0] = <0.32, 0.72, 0.62>;
#declare VV[I][1] = <3.76, 7.67, 1.63>;
#declare NN[I][1] = <0.36, 0.74, 0.56>;
#declare VV[I][2] = <3.76, 8.00, 1.13>;
#declare NN[I][2] = <0.37, 0.78, 0.51>;
#declare Colors[I][0] = <0.43, 1.00, 0.00>;
#declare Colors[I][1] = <0.48, 1.00, 0.00>;
#declare Colors[I][2] = <0.62, 1.00, 0.00>;
....

I think it would be better if your Matlab code created the arrays
containing the vectors directly, like this:

#declare VV =
    array[N][3] {
        { <3.43, 7.67, 1.83>, <3.76, 7.67, 1.63>, <3.76, 8.00, 1.13> },
        ...
    }
;
#declare NN =
    array[N][3] {
        { <0.32, 0.72, 0.62>, <0.36, 0.74, 0.56>, <0.37, 0.78, 0.51> },
        ...
    }
;
#declare Colors =
    array[N][3] {
        { <0.43, 1.00, 0.00>, <0.48, 1.00, 0.00>, <0.62, 1.00, 0.00> },
        ...
    }
;

--
Tor Olav
http://subcube.com
https://github.com/t-o-k


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.