POV-Ray : Newsgroups : povray.advanced-users : how can a square mesh be changed to a rhomboid : Re: how can a square mesh be changed to a rhomboid Server Time
1 Jul 2024 05:51:56 EDT (-0400)
  Re: how can a square mesh be changed to a rhomboid  
From: Alain
Date: 9 Aug 2010 17:42:03
Message: <4c60762b$1@news.povray.org>

> I have a DTM (digital terrain Map) which is square, a mesh comprising of 140,000
> smooth triangles. I need to adjust the map for convergence - difference of the
> grids north to the earths true north. The adjustment would result in a rhomboid
> where the top-left corner might be rotated by, say 3 degrees from the
> bottom-left corner and the top-right corner rotated by 2 degress from the
> bottom-right corner.
>
> Does anybody have an idea on whether this can be achieved in POV-Ray?
>
>

Normaly, for most maps, the sides are parallel to the local longitude, 
and the top and bottom are parallel to the local latitude.

If I read correctly, you don't realy want a rhomboid but a trapezoid or 
something close to that. (top and bottom sides are parallel, but the 
sides are NOT parallel)


Furthermore, the sides don't seems to stay straight, but somewhat curves 
out on the sides and bottom, and curven IN for the top.

What I think you /realy/ want is to treat the DTM as a 
longitude/latitude object and map it on a sphere, keeping the sides 
parallel to the latitude and longitude lines of the sphere.

If I'm right, then, the other answers are not what you need. You need a 
spherical transformation of every vertex of the mesh. Then, most 
straight lines traced on the map will become curves.

It can be done, but involve much more work than a simple matrix 
operation. You need to scan the raw mesh array using loops and transform 
every point individualy from rectangular coordinated to spherical 
coordinates.



Alain


Post a reply to this message

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