POV-Ray : Newsgroups : povray.newusers : Wrapping A Hieght Field Object Around an elipsoid object : Re: Wrapping A Hieght Field Object Around an elipsoid object Server Time
31 Jul 2024 10:24:38 EDT (-0400)
  Re: Wrapping A Hieght Field Object Around an elipsoid object  
From: James Patterson
Date: 26 Jan 2003 07:38:13
Message: <3e33d6b5$1@news.povray.org>
Gave up on HF_Sphere and tried it with isosurface instead.  It works, but
renders real slow.

here is the coding I used (you will need to get your own image maps to test
this)

#include "colors.inc"
#include "shapes.inc"

      camera{
    location <0, 0, 2.25>
    look_at <0, 0, 0>
    //angle 30
  }

   light_source{ <-10,0,15> White }



#declare earthrotate =180;  //allows me to rotate to desired part of planet
#declare height_scale = .001; //controls the height of surface features


 //This declaration gives me the coloring for the final product
#declare land = pigment {
                         image_map {
                                    jpeg "ev11612_land_ocean_ice_8192.jpg"
                                    map_type 1
                                    interpolate 2
                         }
                         rotate y*earthrotate
}

 //This declaration gives me the function to alter the surface of the
isosurface sphere below
#declare fn_elevation = function {
                                  pigment {
                                            image_map {
                                                       jpeg
"earthbump10k.jpeg"
                                                       map_type 1
                                                       interpolate 2
                                            }
                                  rotate y*earthrotate
                                  }
}


 //This is where the magic happens
isosurface {
            function {f_sphere(x, y, z, 1)-fn_elevation(x/2, y/2,
z/2).gray*height_scale}  // function (can also contain declared functions
            contained_by { sphere { 0, 1.1 } }  // container shape
            accuracy 0.0005                      // accuracy of calculation
[0.001]
            max_gradient 5                      // maximum gradient the
function can have [1.1]
            //evaluate 5, 1.2, 0.95             // evaluate the maximum
gradient
            all_intersections                 // alternative to 'max_trace'
            //pigment {White}             //allows viewing of surface
deformations only
            pigment {land}                 //displays earth's surface
}

> This does sound interesting! I don't think its unrealistic, after all, POV
can
> calculate almost everything, though it can get very slow. I'm also one of
those
> geeks who tries to stay in POV-Code all the time! :-)
> Your idea sounds pretty neat, have you thought about making it possible
for
> other planets? I mean, does the system load maps of some sort, or does it
just
> take two poles and a sun-heading into account... If it does reply to a
heightfield-
> like sphere, it might be interesting to fumble with other planets...
> You're sparking me some ideas man! :-)
>
Will keep you posted then on my progress.  Currently my "simulation" would
work on any spherical object since I am really only manipulating
a simple cloud texture.  I will try to keep this as general a simulation as
possible to allow it's use universally.  The only part I am somewhat
satisfied with is the cloud motion when the sun is always at the equator.
Cloud formation is independent of insolation which was my second goal of
realistic cloud formation.  Before I start on that, however, I will need to
get the "coriolis force" responding properly to changes in axial tilt.


Post a reply to this message

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