duveil Posted June 8, 2017 Share Posted June 8, 2017 Hi First of all sorry for my english.It is my second language .My question is I have been following a tutorial of Stefan Sietzen .he convert the lat/long data on a sphere with this formula float x = cos(radians(@lat)) * cos(radians(@long)) * 1; float y = cos(radians(@lat)) * sin(radians(@long)) * 1; float z = sin(radians(@lat)) * 1; @P = set(x,y,z); I tried to project it into 2D plane and connect $MAPU, $MAPV data to $P .But my map is divided from wrong place.The part America supposed to be divided in the middle.My question is is there any better way to convert lat/long data into point position on a 2D map. Any help is appreciated.Thanks in advance. Quote Link to comment Share on other sites More sharing options...
f1480187 Posted June 8, 2017 Share Posted June 8, 2017 (edited) You could offset and wrap longitude (or any value in -180..180 range) like this: longitude = (longitude + 180 + offset) % 360 - 180; wrap_longitude.hipnc Your lat-long conversion setup goes after that operation and can stay unmodified. Edited June 8, 2017 by f1480187 Quote Link to comment Share on other sites More sharing options...
duveil Posted June 9, 2017 Author Share Posted June 9, 2017 (edited) Thank you f1480187. I am grateful for your answer. But clearly I am not as good as you think I am.I tried to put this wrangle before lat/long conversion.Also after conversion.But I guess I missed sth. here.And probably sth. very basic.I tried a couple of ways and still nothing.Do you mind showing this on scene file.Here is my scene. LongLat_Test_027.rar Edited June 9, 2017 by duveil wrongNaming Quote Link to comment Share on other sites More sharing options...
f1480187 Posted June 9, 2017 Share Posted June 9, 2017 Sure, you need to modify some existing longitude variable you interested in. In your case it is @long point attribute. longitude_offset.hipnc By the way, because of the method you use to convert sphere to plane, you could simply rotate sphere around Y axis in transform1 node, it will do same job. 1 Quote Link to comment Share on other sites More sharing options...
duveil Posted June 9, 2017 Author Share Posted June 9, 2017 I think I owe you a beer sir.I mean if you ever be around istanbul just call me to collect your beer.Thanks a lot.I will work hard 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.