POV-Ray : Newsgroups : povray.binaries.images : Am I just too stupid for programming?!? : Re: Am I just too stupid for programming?!? Server Time
5 Nov 2024 11:21:05 EST (-0500)
  Re: Am I just too stupid for programming?!?  
From: Jörg 'Yadgar' Bleimann
Date: 20 Apr 2009 07:42:03
Message: <49ec5f8b@news.povray.org>
High!

Warp wrote:
>   There's no need to do that. Instead of all that, just use:
> 
>           <(a+1)*800+b, (a+1)*800+b+1, a*800+b+1>
> 
>   (Note no comma at the end.)
> 
>   The SDL is flexible about commas. Use that fact to your advantage.

It still doesn't work either, still the same error message... and, yes, 
I also used mod(b, 800)!

Here is the current version:

mesh2 // Phobos
{
   vertex_vectors
   {
     320000
     #declare a=0;
     #while (a<400)
       #declare b=0;
       #while (b<800)
         #declare redval=eval_pigment(PhobosRelief, <(0.5+b)*(1/800), 
(0.5+a)*(1/400), 0>).red * (14-8.1);
         #declare greenval=eval_pigment(PhobosRelief, <(0.5+b)*(1/800), 
(0.5+a)*(1/400), 0>).green * ((14-8.1)/255);
 
((8.1+redval+greenval)*<sin(radians(b*(360/800)))*cos(radians(-90+a*(180/400))), 
sin(radians(-90+a*(180/400))), 
cos(radians(b*(360/800)))*cos(radians(-90+a*(180/400)))>)/sc
         #declare b=b+1;
       #end
       #declare a=a+1;
     #end
   }
   face_indices
   {
     638400
     #declare a=0;
     #while (a<399)
       #declare b=0;
       #while (b<800)
         <a*800+mod(b,800), a*800+mod(b+1,800), (a+1)*800+mod(b,800)>
         <(a+1)*800+mod(b,800), (a+1)*800+mod(b+1,800), a*800+mod(b+1,800)>
         #end
         #declare b=b+1;
       #end
       #declare a=a+1;
     #end
   }
   texture
   {
     pigment { color rgb 0.3 }
     finish { F_Standard_Planetary_Surface }
   }
   rotate y*clock
   translate Pos_Phobos/sc

}

See you in Khyberspace!

Yadgar


Post a reply to this message

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