|
![](/i/fill.gif) |
"Samour" <nomail@nomail> wrote in message
news:web.4a8af68815fa53864c007780@news.povray.org...
> Okay.. here is what I'm trying to do. I'm trying to scale the height field
> to
> make the default unit for the coordinate system to be 1 meter. So let's
> say for
> simplicity that the 1 regular unit in POV-Ray is being scaled by about
> 1000. The
> goal is to be able to use actual distances and sizes for translating and
> scaling
> objects on the height field.
>
> Now when initializing the height field and scaling it everything seems to
> work
> fine. However, scaling and translating objects or moving a camera works
> according to the original units, i.e. 1 unit along an axis corresponds to
> the
> new 1000 correspondence of the height field. So using translate 1 moves a
> huge
> distance rather than just moving 1 meter. Is there a recommended way to
> achieve
> this objective?
>
There's something a little unclear to me about your question.
When you incorporate add a height field it occupies a 1 POV-Ray unit cube.
If the height field represents an area a kilometre square and you scale it
so that height field occupies a square 1000 by 1000 up to a height of your
choosing, lets say 100 to represent a maximum height of 100metres, then you
are using a scale of 1 metre = 1 POV-Ray unit. Everything else can be added
into the scene assuming this scale is being used. So, if you then move
something by 20 POV-Ray units it's equivalent to moving it 20 metres.
In the following example a height field is scaled by 1000 in x and z and 100
in y to represent a section of landscape 1km square with a maximum elevation
of 100m. The red sphere would then represent a sphere of 2m radius
positioned 100m in x and 100m in y at an elevation of 100m.
camera {location <0, 100,-1> look_at <500,4,500>}
light_source {<1,5,-1> color rgb 1}
height_field {"heightfieldimage.tga" pigment {rgb 1} scale <1000,100,1000>}
sphere {0,2 translate <100,100,100> pigment {rgb <1,0,0>}}
I don't therefore see why you say that scaling and translating works
according to the 'original' units, because POV-Ray is really sort of
'unit-neutral' - that is to say that a POV-Ray unit can be whatever you want
it to be.
Regards,
Chris B.
Post a reply to this message
|
![](/i/fill.gif) |