|
|
Hi(gh)!
On 04.12.20 11:27, Tor Olav Kristensen wrote:
> 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))
Yes, you're right - I just typed it from memory, I should have looked it
up in my scripts instead!
>> 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 ?
With the script I extracted the code from, it works perfectly!
See you in Khyberspace!
Yadgar
Post a reply to this message
|
|