Cruisers Forum
 


Join CruisersForum Today

Reply
 
Thread Tools Rate Thread Display Modes
Old 04-10-2014, 02: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, 19:55   #2
Registered User
 
boat_alexandra's Avatar

Join Date: Aug 2009
Location: Masachusetts
Boat: bristol 27
Posts: 2,804
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?
__________________

__________________
boat_alexandra is offline   Reply With Quote
Old 05-10-2014, 00: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, 06:13   #4
Registered User
 
boat_alexandra's Avatar

Join Date: Aug 2009
Location: Masachusetts
Boat: bristol 27
Posts: 2,804
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?
__________________
boat_alexandra is offline   Reply With Quote
Old 05-10-2014, 07:54   #5
Registered User

Join Date: Sep 2012
Location: Baikal
Posts: 270
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, 08:28   #6
Registered User
 
boat_alexandra's Avatar

Join Date: Aug 2009
Location: Masachusetts
Boat: bristol 27
Posts: 2,804
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.
__________________
boat_alexandra is offline   Reply With Quote
Old 05-10-2014, 08:34   #7
Registered User

Join Date: Sep 2012
Location: Baikal
Posts: 270
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

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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 16:31
Nifty sextant image Amgine Navigation 1 16-06-2007 19:55
No edit, no image Vasco Forum Tech Support & Site Help 3 12-10-2006 03:06
Am I retarded or?? how to put up an image? Bob Norson Forum Tech Support & Site Help 21 25-04-2006 17:55



Copyright 2002- Social Knowledge, LLC All Rights Reserved.

All times are GMT -7. The time now is 05:50.


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

ShowCase vBulletin Plugins by Drive Thru Online, Inc.