POV-Ray : Newsgroups : povray.binaries.images : Mesh2 bug? [JPG, 800 x 600, 42881 bytes] : Re: Mesh2 bug? [JPG, 800 x 600, 42881 bytes] Server Time
9 Aug 2024 09:08:25 EDT (-0400)
  Re: Mesh2 bug? [JPG, 800 x 600, 42881 bytes]  
From: Jörg 'Yadgar' Bleimann
Date: 24 Apr 2005 12:26:46
Message: <426bc8c6$1@news.povray.org>
High!

Tim Nikias wrote:
> You might be able use my MMM (available from the Download-Section of my
> website), if you can store the data in a 2d-array.
> E.g., if the DEM-data is in a rectangular grid, the first pixel (top left)
> would be at array[0][0] and the last pixel (bottom right) would be at
> array[100][100], the first dimension being the x-space.

But I'm not even able to store the data retrieved from the ASCII matrix 
in a two-dimensional array! My code

#declare SareHelmand=array[l][l]
{
   #declare a=0;
   #while (a<l)
   {
      #declare b=0;
      #while (b<l)
	   <(re+mtrix[a][b]) * sin ((sLong-b/l) * (pi/180)) *
         cos ((sLat + a/l) * (pi/180)),
         (rp+mtrix[a][b])*sin((sLat+a/l)*(pi/180)),
         (re+mtrix[a][b]) * cos ((sLong-b/l) * (pi/180)) *
         cos ((sLat+a/l)*(pi/180))>
         #if (b<l-1)
           ,
       #end
       #declare b=b+1;
   }
   #warning concat("Assigning vectors for line ", str(a, 4, 0))
   #declare a=a+1;
   #end
}

results in the error message

"{ expected after {, # found instead"!

Perhaps I'm in fact just too stupid to program more sophisticated things 
than spheres over checkered planes...

See you in my loony bin!

Yadgar


Post a reply to this message

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