POV-Ray : Newsgroups : povray.newusers : How do I make hills and troughs at specific coords and of specific heights? Server Time
27 Nov 2024 07:24:48 EST (-0500)
  How do I make hills and troughs at specific coords and of specific heights? (Message 1 to 6 of 6)  
From:
Subject: How do I make hills and troughs at specific coords and of specific heights?
Date: 21 Mar 2003 03:15:07
Message: <web.3e7a7baa935d6ddb99c6fd670@news.povray.org>
Hi,

I'm new to POVRay and am struggling with something. Is there a way to create
rolling hills if you have specific X/Y coordinates where you want the tops
of
the hills and the lowest points of the troughs to be? I'd also like to make
them specific heights and want the surface to smoothly transition from each
peak to each trough and on to the next hill or trough. I've been looking at
Isosurface object, but I dont think that's what I'm after as it seems one
needs to be able to generate the entire surface with a single formula.

The number of coordinates per plane, their location and the height for the
hill/trough at each location will vary and are from an external source. I
plan to write a perl script that generates pov code to create the image
which is then rendered periodically.

Thanks for any help!

Mark.
mar### [at] hotmailcom


Post a reply to this message

From: Tom Melly
Subject: Re: How do I make hills and troughs at specific coords and of specific heights?
Date: 21 Mar 2003 04:19:52
Message: <3e7ad938$1@news.povray.org>
wrote in message news:web.3e7a7baa935d6ddb99c6fd670@news.povray.org...
> Hi,
>
> I'm new to POVRay and am struggling with something. Is there a way to create
> rolling hills if you have specific X/Y coordinates where you want the tops
> of
> the hills and the lowest points of the troughs to be? I'd also like to make
> them specific heights and want the surface to smoothly transition from each
> peak to each trough and on to the next hill or trough. I've been looking at
> Isosurface object, but I dont think that's what I'm after as it seems one
> needs to be able to generate the entire surface with a single formula.
>
> The number of coordinates per plane, their location and the height for the
> hill/trough at each location will vary and are from an external source. I
> plan to write a perl script that generates pov code to create the image
> which is then rendered periodically.
>

I wouldn't necessarily rule out iso-surfaces, but it sounds as though you need a
height-field.

With an iso-surface, it will largely depend on how much control you need.

Also, iirc you can combine a hf and an iso. Put the general terrain topology in
the hf, but then give some attractive detail with the iso-function?


Post a reply to this message

From: Tim Nikias v2 0
Subject: Re: How do I make hills and troughs at specific coords and of specific heights?
Date: 21 Mar 2003 08:11:40
Message: <3e7b0f8c@news.povray.org>
Well, since you know the x and y coordinates, as well as the
z (though I'd refer to x and z coordinates and y being the height),
you could just genereate a mesh yourself.

One method would be to connect the different nodes with triangles,
which could be subdivided into smaller parts and are altered in height
to achieve the smooth rolling from peak to trough.

There are several ways you could go about this, especially since
you're asking about a method to interpolate different positions in
a 3D-Environment. Something like landscape reconstruction would
be needed here, which tries to derive the landscape from the different
known positions.

One idea might be to create a rectangular "cloth", which you will
attach to the different known nodes. This mesh could be altered
based on distance to the nodes. Its rather difficult though, you'd
have to always combine three nodes to triangles which cover the
entire section, to have interpolations without jagged jumps, and
you might still be able to see the triangles afterwards..

There are a lot of ways you could go, best would be to generate
the entire heightfield, export as image, and use POV's native height-
field, as Tom suggested.

--
Tim Nikias v2.0
Homepage: http://www.digitaltwilight.de/no_lights
Email: Tim### [at] gmxde

> Hi,
>
> I'm new to POVRay and am struggling with something. Is there a way to
create
> rolling hills if you have specific X/Y coordinates where you want the tops
> of
> the hills and the lowest points of the troughs to be? I'd also like to
make
> them specific heights and want the surface to smoothly transition from
each
> peak to each trough and on to the next hill or trough. I've been looking
at
> Isosurface object, but I dont think that's what I'm after as it seems one
> needs to be able to generate the entire surface with a single formula.
>
> The number of coordinates per plane, their location and the height for the
> hill/trough at each location will vary and are from an external source. I
> plan to write a perl script that generates pov code to create the image
> which is then rendered periodically.
>
> Thanks for any help!
>
> Mark.
> mar### [at] hotmailcom
>
>
>


Post a reply to this message

From: Will W
Subject: Re: How do I make hills and troughs at specific coords and of specific heights?
Date: 21 Mar 2003 11:56:04
Message: <3e7b4424@news.povray.org>
wrote in message news:web.3e7a7baa935d6ddb99c6fd670@news.povray.org...
> Hi,
>
> I'm new to POVRay and am struggling with something. Is there a way to
create
> rolling hills if you have specific X/Y coordinates where you want the tops
> of
> the hills and the lowest points of the troughs to be? I'd also like to
make
> them specific heights and want the surface to smoothly transition from
each
> peak to each trough and on to the next hill or trough.
<snip>

Bicubic patches would be a good bet. They will meet all your requirements,
but you will have to roll your own code for determining the control points
that will smoothly transition the surface across the peaks and valleys. The
theory of bicubic patches is available through googling on "bezier patch"
and/or "bicubic patch".

I'd be interested in what you find out. I've got a similar problem
(stretching skin over a shoulder girdle where the base of neck, point of
shoulder and chest wall can rotate independently). But I'm weak in
trigonometry  (I'm now working through a refresher course).

As others have pointed out, meshes and height fields would also work. But it
seems to me that before you could do much with either of those approaches,
you would need to charaterize some of the intermediate points, which would
force you into the same kind of math involved in bicubics. My suspicion is
that the bicubic patch will be the most direct route from your data to an
image.


--
Will Woodhull
Thornhenge, SW Oregon, USA
willl.at.thornhenge.net


Post a reply to this message

From: phaze
Subject: Re: How do I make hills and troughs at specific coords and of specific heig=
Date: 21 Mar 2003 13:30:07
Message: <web.3e7b598d60baa58299c6fd670@news.povray.org>
Thanks very much all for the super quick response. I'm playing with Bicubic
patches, meshes and height fields to figure out which is best. I'll post an
update once I've come up with something.

kind regards,

Mark.


Will W wrote:
>wrote in message news:web.3e7a7baa935d6ddb99c6fd670[at]news.povray.org...
>> Hi,
>>
>> I'm new to POVRay and am struggling with something. Is there a way to
>create
>> rolling hills if you have specific X/Y coordinates where you want the tops
>> of
>> the hills and the lowest points of the troughs to be? I'd also like to
>make
>> them specific heights and want the surface to smoothly transition from
>each
>> peak to each trough and on to the next hill or trough.
><snip>
>
>Bicubic patches would be a good bet. They will meet all your requirements,
>but you will have to roll your own code for determining the control points
>that will smoothly transition the surface across the peaks and valleys. The
>theory of bicubic patches is available through googling on "bezier patch"
>and/or "bicubic patch".
>
>I'd be interested in what you find out. I've got a similar problem
>(stretching skin over a shoulder girdle where the base of neck, point of
>shoulder and chest wall can rotate independently). But I'm weak in
>trigonometry  (I'm now working through a refresher course).
>
>As others have pointed out, meshes and height fields would also work. But it
>seems to me that before you could do much with either of those approaches,
>you would need to charaterize some of the intermediate points, which would
>force you into the same kind of math involved in bicubics. My suspicion is
>that the bicubic patch will be the most direct route from your data to an
>image.
>
>
>--
>Will Woodhull
>Thornhenge, SW Oregon, USA
>willl.at.thornhenge.net
>


Post a reply to this message

From: Rohan Bernett
Subject: Re: How do I make hills and troughs at specific coords and of specific heig=
Date: 3 Apr 2003 00:15:10
Message: <web.3e8bc2e360baa582d02c7b870@news.povray.org>
>I wouldn't necessarily rule out iso-surfaces, but it sounds as though you need a
>height-field.
>
>With an iso-surface, it will largely depend on how much control you need.
>
>Also, iirc you can combine a hf and an iso. Put the general terrain topology in
>the hf, but then give some attractive detail with the iso-function?

You can combine an isosurface with the height field data, I can't remember
exactly how I did it, but I did do it at one point. I think it involved
turing the pigment containing the image map into a function, and then using
that as the function for the isosurface. I would check the scene file for
it, but I'm not sure if I still have it, and besides, it's not on the
computer I'm using at the moment.

Rohan _e_ii


Post a reply to this message

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