Cruisers Forum
 


Reply
  This discussion is proudly sponsored by:
Please support our sponsors and let them know you heard about their products on Cruisers Forums. Advertise Here
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 04-10-2014, 01:12   #1
Registered User

Join Date: Jun 2013
Posts: 10
2D Image to 2.D image

i search for an algorithm for generating a 2.5D image or 3d Image from 2d tiled or a vector image, actually i want to create a plugin for OpenCPN So that its maps when zoom in looks like 3D (like Nokia Drive+ application) and when zoom out its back to 2d maps.

thanks in advance.
danics is offline   Reply With Quote
Old 04-10-2014, 18:55   #2
Registered User

Join Date: Aug 2009
Location: oriental
Boat: crowther trimaran 33
Posts: 4,417
Re: 2D Image to 2.D image

Do you need topography? I am not sure what nokia drive looks like. What is the purpose of this feature?
seandepagnier is offline   Reply With Quote
Old 04-10-2014, 23:26   #3
Registered User

Join Date: Jun 2013
Posts: 10
Re: 2D Image to 2.D image

this is a image for nokia drive in zoom in mode

http://images.anandtech.com/doci/526...e-25_575px.jpg

i believe this is just a rotation algorithm and using distance of the objects form each other, we have this variable in our maps too, so i want create a feeling of 3d map so i called it 2.5d image
danics is offline   Reply With Quote
Old 05-10-2014, 05:13   #4
Registered User

Join Date: Aug 2009
Location: oriental
Boat: crowther trimaran 33
Posts: 4,417
Re: 2D Image to 2.D image

You can probably just modify the projection matrix at least in opengl mode to get this effect. This would take one line of code. What is the advantage of this mode?
seandepagnier is offline   Reply With Quote
Old 05-10-2014, 06:54   #5
Registered User

Join Date: Sep 2012
Location: Baikal
Posts: 581
Re: 2D Image to 2.D image

Quote:
Originally Posted by boat_alexandra View Post
You can probably just modify the projection matrix at least in opengl mode to get this effect. This would take one line of code. What is the advantage of this mode?
a function display is in cartography C-MAP MAX
http://www.marinecommander.co.uk/sys...en04_large.jpg

open up more spaces from the front, not more
Baikal is offline   Reply With Quote
Old 05-10-2014, 07:28   #6
Registered User

Join Date: Aug 2009
Location: oriental
Boat: crowther trimaran 33
Posts: 4,417
Re: 2D Image to 2.D image

Quote:
Originally Posted by Baikal View Post
a function display is in cartography C-MAP MAX
http://www.marinecommander.co.uk/sys...en04_large.jpg

open up more spaces from the front, not more
This is incredibly easy to implement for both vector and raster charts. There are two possible options.. If you want the icons and other bitmaps to be projected or not. Consider also things like grib wind arrows. If you want them projected, then using the framebuffer object will be required and it's all a bit more complicated but still possible, at least in opengl mode.

I would try messing with the other axes in the glRotated call besides only the z axis before swapping buffers. You will need to extend the viewport class to include these angles, and have it calculate the lat-lon bounding box accordingly, and extend the routines that compute screen coordinates from lat/lon and lat/lon from screen coordinates. This is a matter of applying a matrix multiplication instead of the sine and cosine used for simple viewport rotation.

Some kind of guard is needed as this will only work in opengl mode, at least for raster charts. For vector charts it should work in non opengl mode as well.

I personally would like to go a bit further, and implement vector and fragment shaders to convert to polar, and ellipsoidal coordinates on the fly as well. This can work in conjunction with a projected viewport.
seandepagnier is offline   Reply With Quote
Old 05-10-2014, 07:34   #7
Registered User

Join Date: Sep 2012
Location: Baikal
Posts: 581
Re: 2D Image to 2.D image

I think that is a perspective view of the map for raster and vector did not prevent - even though the practicality of this particular function can not see. More advantage of multiple viewports with the charts in CPN
Baikal is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Image stabilized binoculars bottleinamessage Monohull Sailboats 21 14-12-2007 15:31
Nifty sextant image Amgine Navigation 1 16-06-2007 18:55
No edit, no image Vasco Forum Tech Support & Site Help 3 12-10-2006 02:06
Am I retarded or?? how to put up an image? Bob Norson Forum Tech Support & Site Help 21 25-04-2006 16:55

Advertise Here


All times are GMT -7. The time now is 20:58.


Google+
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Social Knowledge Networks
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2024, vBulletin Solutions, Inc.

ShowCase vBulletin Plugins by Drive Thru Online, Inc.