POV-Ray : Newsgroups : povray.binaries.images : POVEarth: Tristan da Cunha: gaps between mesh2 triangles : Re: POVEarth: Tristan da Cunha: gaps between mesh2 triangles Server Time
29 Jul 2024 22:35:58 EDT (-0400)
  Re: POVEarth: Tristan da Cunha: gaps between mesh2 triangles  
From: scott
Date: 1 Jul 2013 08:05:27
Message: <51d17087@news.povray.org>
> #declare Earth_Slice=
> mesh2
> {
>    vertex_vectors
>    {
>      xdim*ydim
>      #declare row=0;
>      #while (row<ydim)
>        #declare col=0;
>        #while (col<xdim)
>          #declare clrvect=eval_pigment(map, <1/(xdim*2)+col/xdim,
> 1-(1/(ydim*2)+row/ydim), 1>);
>          // #warning concat("<",vstr(3, clrvect, ",",7,2),">")
>          // #warning concat(str(col,2,0)," ",str(row,2,0))
>          #declare hval=clrvect.red*65280+clrvect.green*255;
>          #declare hval=-deadsea+rng/65535*hval;
>          // #warning str(hval, 1, 2)
>
> (rd+hval)*<sin(radians(-longstart-col/xdim))*cos(radians(latstart-row/ydim)),
>
>                   sin(radians(latstart-row/ydim)),
> cos(radians(-longstart-col/xdim))*cos(radians(latstart-row/ydim))>*sf

I would put something very simple like this for debug purposes:

<row,col,hval>

...

>    face_indices
>    {
>      (xdim-1)*(ydim-1)*2
>      #declare r=0;
>      #while (r<ydim-1)
>        #declare c=0;
>        #while (c<xdim-1)
>          <r*xdim+c, r*xdim+c+1, (r+1)*xdim+c>,
>          <r*xdim+c+1, (r+1)*xdim+c+1, (r+1)*xdim+c>

That looks fine to me.

Put your camera in a suitable location for the above debug mesh to show 
up, and put a constant coloured background so that you can see the 
difference between shadowed areas and areas not rendered properly.

Assuming the above test works then I would gradually build back up to 
your equations (maybe first changing the scale to match, then 
introducing the trig) to see what causes the problems.

My guess is accuracy because you are dealing with a huge dynamic range 
of dimensions.


Post a reply to this message

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