|
|
Hi Yadgar
=?UTF-8?Q?J=c3=b6rg_=22Yadgar=22_Bleimann?= <yaz### [at] gmxde> wrote:
>...
> vertpos = height*<radians(sin(-longitude))*radians(cos(latitude)),
> radians(sin(latitude)), radians(cos(-longitude))*radians(cos(latitude))>
The code above seems wrong. Your vector should probably be calculated like this:
<
cos(radians(latitude))*sin(radians(-longitude)),
sin(radians(latitude)),
cos(radians(latitude))*cos(radians(-longitude))
>
>...
> The faces are constructed this way:
>
> #declare a = 0;
> #declare c = 0;
> #while (a < ydim-1)
> #declare b = 0;
> #while (b < xdim-1)
> #declare Faces[a*ydim+b] = <a*res+b, a*res+b+1, (a+1)*res+b>;
> #declare Faces[a*ydim+b+1] = <a*res+b+1, (a+1)*res+b+1, (a+1)*res+b>;
> #declare c = c+2;
> #declare b = b+1;
> #end
> #declare a = a+1;
> #end
Have you tested if the code above works as you intended ?
--
Tor Olav
http://subcube.com
https://github.com/t-o-k
Post a reply to this message
|
|