POV-Ray : Newsgroups : povray.binaries.images : Amalthea, now with brightness 1 and assumed_gamma 1.5 : Re: Amalthea, now with brightness 1 and assumed_gamma 1.5 Server Time
4 Nov 2024 13:31:43 EST (-0500)
  Re: Amalthea, now with brightness 1 and assumed_gamma 1.5  
From: Jörg 'Yadgar' Bleimann
Date: 9 May 2009 09:45:30
Message: <4a0588fa@news.povray.org>
High!

Meanwhile, I changed the code:

  mesh2 // Amalthea
   {
     vertex_vectors
     {
       318402
       <0, -53.04356, 0>/sc // south pole
       #declare a=1;
       #while (a<399)
         #declare b=0;
         #while (b<800)
           #declare redval=eval_pigment(AmaltheaRelief, 
<(0.5+b)*(1/800), (0.5+a)*(1/400), 0>).red * (148.3-51.8);
           #declare greenval=eval_pigment(AmaltheaRelief, 
<(0.5+b)*(1/800), (0.5+a)*(1/400), 0>).green * ((148.3-51.8)/255);
 
((51.8+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
       <0, 53.13458, 0>/sc // north pole
     }
     face_indices
     {
       635200
       #declare fa=0;
       #declare a=0;
       #while (a<398)
         #declare b=0;
         #while (b<800)
           #switch (a)
             #case (0)
               <0, a+1+b, a+1+mod(b+1,800)>
               #declare fa=fa+1;
             #break
             #range (1, 396)
               <1+a*800+b, 1+a*800+mod(b+1,800), 1+(a+1)*800+b>,
               <1+(a+1)*800+b, 1+(a+1)*800+mod(b+1,800), 
1+a*800+mod(b+1,800)>
               #declare fa=fa+2;
             #break
             #case (397)
               <1+a*800+b, 1+a*800+mod(b+1,800), 318401>
               #declare fa=fa+1;
             #break
           #end
           #warning str(fa, 6, 0)
           #declare b=b+1;
         #end
         #declare a=a+1;
       #end
     }
     texture
     {
       pigment { color rgb <179, 101,46>/255 }
       finish { F_Standard_Planetary_Surface }
     }
     translate Pos_Amalthea/sc
   }

...but still there is that gaping hole at the north pole! And why 635200 
faces? Shouldn't it be rather 636800, i. e. (a-3)*2*b+2*b ?

See you in Khyberspace!

Yadgar


Post a reply to this message

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