Android Question Animated Radar Effect

Wembly

Member
Licensed User
Longtime User
Hi All

I have a requirement to develop an animated green radar display within an app I'm currently putting together.

Graphics is not my strongest area at all in B4A so would welcome suggestions from you guys on the best approach for achieving such an effect.

To clarify requirement please see YouTube video with an example of the kind of display I'm looking to achieve:


Thanks in advance for any guidance you can offer!
 

Wembly

Member
Licensed User
Longtime User
thanks for the reply.

The display will be reflecting the real time position of a location in relation to the devices current GPS position.

So the display needs to be updated from code.

Cheers
 
Upvote 0

Beja

Expert
Licensed User
Longtime User
You can draw 30 frames for the different positions of the radar, then overlap the pictures through a timer. 30FPS. then
you have full control on the position of each frame. You can use collision detection to know the position of your objects.
Sorry I have no code.
 
Upvote 0

Wembly

Member
Licensed User
Longtime User
Thanks for this.

The approach I've got in mind is to create several bitmaps all layered on top of each other:
  1. Background - Circle with cross lines
  2. Bitmap of the target location
  3. Bitmap of the radar needle with the fading trailing lines
The bitmap of the radar needle would be contained within a rectangular shaped bitmap which could be pivoted around the background bitmap to give the impression of it being re-drawn.

Would this be the better option and achievable within B4A and all could be drawn by code rather within a graphics tool?

Trying to avoid having pre-drawn bitmaps so I can scale them to the users device.
 
Upvote 0

Wembly

Member
Licensed User
Longtime User
All sorted.

If interested the approach I took was the one in my previous post in conjunction with this tutorial for producing the graphics:

http://inkscapedesign.blogspot.co.uk/2013/05/military-radar-screen-tutorial-in.html

Here is a screenshot of the initial results used in one of Erel's graphic demo apps:

Screenshot_2014-08-03-11-18-13.png


Thanks
 
Upvote 0

Hanstel

Member
Licensed User
Upvote 0

Star-Dust

Expert
Licensed User
Longtime User
Hi All

I have a requirement to develop an animated green radar display within an app I'm currently putting together.

Graphics is not my strongest area at all in B4A so would welcome suggestions from you guys on the best approach for achieving such an effect.

To clarify requirement please see YouTube video with an example of the kind of display I'm looking to achieve:


Thanks in advance for any guidance you can offer!
See this source code: https://www.b4x.com/android/forum/threads/b4x-xui-sd-radarprogressview-with-source-code.93584/
 
Last edited:
Upvote 0

Star-Dust

Expert
Licensed User
Longtime User
I need not just a progress bar but a live display of gps devices as described on the original post
In the initial post and in the title you asked for help to make a Radar Effect.
In the link that I have attached you, find the source code that helps you to draw and realize the radar effect in a view.
Hanstel said:
Graphics is not my strongest area
  1. Background - Circle with cross lines
  2. Bitmap of the target location
  3. Bitmap of the radar needle with the fading trailing lines
You asked for help with the graphics and to draw the fade and that's what I posted to you.

I have implemented it to create a progress bar, but since I have attached the source code, you can extend the code and use it for your needs. The points reported in the radar rather than random as in my project should be positioned according to the readings made in the GPS. Nothing else.

If you also need information to read the GPS values, create another thread. But I fully responded to your initial question, to create the RADAR graphics.
 
Last edited:
Upvote 0
Top