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
1 Feb 2023 21:29:20 EST (-0500)
  Re: How to generate sphere and cylinder with csv file  
From: Bald Eagle
Date: 10 Apr 2017 08:05:00
Message: <web.58eb73dcae95604bc437ac910@news.povray.org>
Alain <kua### [at] videotronca> wrote:

> > ----------------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.

You were too hasty, my friend.
EarthRadius is used in the S2C macro as the multiplier for the trig functions.

S2C converts Sperical coordinates (lat, long) to Cartesian (x, y, z) and
C2S obviously does the reverse.
I just coded up both for completeness.


If you use layered textures with an alpha channel, you don't need to code up
separate boxes for your maps.   You can just sequentially apply each texture to
the box, with the last texture defined being "on top" - just like applying
successive layers of paint.

See the docs or Lohmueller's site, or maybe the standard insert menu.


Post a reply to this message

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