POV-Ray : Newsgroups : povray.windows : How to generate sphere and cylinder with csv file : Re: How to generate sphere and cylinder with csv file Server Time
8 Feb 2023 08:47:15 EST (-0500)
  Re: How to generate sphere and cylinder with csv file  
From: Alain
Date: 9 Apr 2017 22:31:53
Message: <58eaee99$1@news.povray.org>

> "Bald Eagle" <cre### [at] netscapenet> wrote:
>> "Jeff" <jef### [at] gmailcom> wrote:
>
> here is my code now:
>
> global_settings {
>  assumed_gamma 1.0
>  #default {texture {pigment {rgb <1, 1, 1>} finish {ambient 1}}}
>  ambient_light rgb <1, 1, 1> // <======== flat, even illumination

WRONG !
ambient_light is multiplied with the ambient component of the finish. 
rgb<1,1,1> is the DEFAULT value.

By the way, it's bad practice to place the #default statement into the 
global_settings block. It have nothing to do in that location. Place it 
after.

global_settings{ assumed_gamma 1}
#default{ texture{ pigment{ rgb 1 } finish{ ambient 1 }}}


> }
>
> #include "colors.inc"
>
> camera {
>  location <55,25,80>
>  right    x*image_width/image_height
>  look_at <55,0,126>
> }
>
> light_source{ <10,10,-10>  color rgb <1, 1, 1>}
>
> #declare Feet = 12;
> //  Sized image Map - 1 unit thick box
> #declare XSize = 4*Feet;
> #declare ImageMap = pigment {image_map {png "beijing.png" once} };
> #declare Resolution = max_extent (ImageMap);
> #declare Resolution = Resolution + <0, 0, 1>;
>
> #declare ImageMappedBox =
>  box {0, 1
>   texture {
>    pigment {ImageMap}
>   }
>   translate <0, 0, 0>
>   scale Resolution*(1/Resolution.x)*XSize
>   rotate <90,0,0>
>   //translate y*(Resolution.y / Resolution.x)*XSize/2
>  }
> object {ImageMappedBox translate <31,0,115>}
> object {ImageMappedBox translate <31,5,115>}
> object {ImageMappedBox translate <31,10,115>}
> object {ImageMappedBox translate <31,15,115>}
>
> ----------------what does the code blocks below
> do?---------------------------#declare EarthRadius = 6367; //radius in km
> #declare EarthRadius = 6367*0.621371; //radius in mi

Nothing at all as those variables are never used.
In some other cases, those are usefull for some reason, like actually 
following Earth's curvature.


Post a reply to this message

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