POV-Ray : Newsgroups : povray.newusers : Height_field clipped_by a box : Re: Height_field clipped_by a box Server Time
2 Jun 2024 14:27:50 EDT (-0400)
  Re: Height_field clipped_by a box  
From: mathieu r
Date: 3 Sep 2012 12:55:01
Message: <web.5044e0d3c872e12255f6125a0@news.povray.org>
Hi,

I didn't know all of these prerequisites, in particular the scale / transmate
order.

I think that clipka's right. I'll try his solution, that is setting ambient,
diffuse, specular, phong,... to 0

I'll try this out and let you know.

Thanks for all your advice!

Mat

Thomas de Groot <tho### [at] degrootorg> wrote:
> On 2-9-2012 20:23, Alain wrote:
>
> > You clip your hight_field by a box that is 10 times to big.
> >
> > You need to:
> > 1 - make the box buch smaller.
> > OR
> > 2 - Use your actual box AFTER you scale the hight_field, but before you
> > move it. Also, adjust the translate by your scale.
> >
> > scale <14,4,14>
> > clipped_by { box { <0,0,0>,<10,10,10 > }}
> > translate <-0.5,0,-0.48>*14
> >
> >
> Expanding a bit on this (see also the corresponding Docs paragraphs):
>
> - A height_field starts as a 1x1x1 object. If you use clipped_by
> /before/ scaling the height_field it should be smaller than the unit object.
>
> - The order in which you perform the transformations is crucial and you
> should always think about them as operating from the origin. The basic
> order is /scale/ then /rotate/ then /translate/. Any other order will
> lead to (possibly) unexpected results. Example:
>
> box {-1, 1 rotate 45*y translate 10*x} will show a box rotated 45
> degrees around the vertical axis and translated 10 units along the x-axis.
>
> box {-1, 1 translate 10*x rotate 45*y} will rotate a box placed at 10
> units on the +x-axis, 45 degrees towards the -z-axis.
>
> Thomas


Post a reply to this message

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