POV-Ray : Newsgroups : povray.windows : How to generate sphere and cylinder with csv file Server Time
27 Apr 2024 19:41:48 EDT (-0400)
  How to generate sphere and cylinder with csv file (Message 31 to 31 of 31)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: Bald Eagle
Subject: Re: How to generate sphere and cylinder with csv file
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

<<< Previous 10 Messages Goto Initial 10 Messages

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