|
|
Wasn't it ZeSly who wrote:
>Hello povers,
>
>Here is a fly by of Valles Marineris on Mars. I think the relief is a bit to
>high. Maybe there is something I did not understand exactly with
>isosurfaces. Here is the function I use :
>
> #declare pl_radius = 3396;
> #declare min_alt = -8.208;
> #declare max_alt = 21.249;
> #declare alt_fct = max_alt - min_alt;
>
>function { f_sphere(x,y,z,pl_radius+max_alt) -
>alt_fct*f_relief(x,y,z).gray }
>
>The f_relief function is an image_map as the ones we use with a height_filed
>
>Thanks for any help.
>
Actually the relief seems to work out to be correct, though there is a
slight error in your ground level. You happen to be lucky that the
function values returned by f_sphere happen to be linear with altitude.
This is not generally the case.
If you use trace() on the isosurface you can determine that a point
corresponding to a black pixel on the relief map is at a height of
3417.224, and one corresponding to a white pixel is at 3446.705.
That gives the correct difference between high and low points, but it's
all way above the nominal planet radius. That's because subtracting the
relief function adds height, and adding max_alt also adds height. What
you should do is
function { f_sphere(x,y,z,pl_radius+min_alt) -
alt_fct*f_relief(x,y,z).gray }
--
Mike Williams
Gentleman of Leisure
Post a reply to this message
|
|