|
![](/i/fill.gif) |
> High!
>
> On 06/14/2010 06:32 PM, Alain wrote:
>
>> You can still use the isosurface, in a much smaller containing object.
>
> No, this does not work - if I try to constrain the isosurface to a
> sphere rotated to the chosen camera position (in geographical
> coordinates), such as:
>
> isosurface
> {
> function { Terrain_Function(x, y, z) }
> contained_by
> {
> sphere
> {
> <0, 15, 0>/5178, <20, 25, 20>/5178
> rotate <0, 0, 90-lat>
> rotate <0, -long+90, 0>
> translate <sin(radians(-long))*cos(radians(lat)), sin(radians(lat)),
> cos(radians(-long))*cos(radians(lat))>
> }
> }
> max_gradient 5
> accuracy 0.0001
> double_illuminate
> texture { T_Ghurghusht }
> scale 5178
> }
>
> // end of code
>
> I get error messages like "rotate found instead"... the container sphere
> may not even scaled non-uniformly!
>
> See you in Khyberspace!
>
> Yadgar
>
>
I was thinking of a box that you can set to any arbitrary dimention.
Very often, the sphere is very far from the best container.
Bottom just under the lowest part of the ground.
Top at the maximum hight in the area.
Depth and width acording to where you are situated and what part is
likely to be visible.
If you still want to use a sphere, apply the rotation to the center
using v_rotate(), then, if needed, add any translation also to the
center itself.
sphere{vrotate(v_rotate(<0, 15, 0>/5178,rotate <0, 0, 90-lat>),<0,
-long+90, 0>)+<sin(radians(-long))*cos(radians(lat)),
sin(radians(lat)),cos(radians(-long))*cos(radians(lat))> , <20, 25,
20>/5178}
Should be equivalent to your case.
Alain
Post a reply to this message
|
![](/i/fill.gif) |