Have a look at this code - it is an early stage of a ship simulator I have been writing, and has radar like you described.
dim curr_echox#(14)
dim curr_echoy#(14)
dim old_echox#(14)
dim old_echoy#(14)
rem Activate manual syncronization and hide mouse
SYNC ON : HIDE MOUSE
rem set sea height
seay#=200
rem set camera angle in radians
cameraa#=3.14/2
rem set screen division
div#=0.6
rem setup screen
width=1024
height=768
depth=16
if check display mode(width,height,depth)=1 then set display mode width,height,depth
rem Change camera views
cls rgb(10,10,10)
set camera view 0,0,screen width(), div# * screen height()
set camera fov cameraa#
HIDE MOUSE
rem set backdrop
backdrop on
color backdrop rgb(100,0,200)
`rem Load ground bitmap into image
`LOAD BITMAP "floor.bmp",1
`GET IMAGE 1,0,0,128,128
`DELETE BITMAP 1
rem Make a 3D landscape
MAKE MATRIX 1,10000.0,10000.0,25,25
position matrix 1, 0,0,0
rem Make a ship
MAKE object cube 2,50
POSITION object 2,5000,seay#,5000
rem make other ships
make object sphere 10,50
position object 10,0,seay#,0
make object sphere 11,50
position object 11,0,seay#,10000
make object sphere 12,50
position object 12,10000,seay#,0
make object sphere 13,50
position object 13,10000,seay#,10000
make object sphere 14,50
position object 14,5000,seay#,5000
rem make the sea
make object box 3,10000.0,1,10000.0
color object 3,rgb(0,50,100)
POSITION object 3,5000,seay#,5000
rem Make sea into static object
make static object 3
delete object 3
rem Texture landscape
`PREPARE MATRIX TEXTURE 1,1,1,1
rem Randomise landscape
RANDOMIZE MATRIX 1,1000.0
rem Begin loop
DO
rem check for ESC to exit
if escapekey()=1 then exit
rem move object
IF LEFTKEY()=1 THEN angle#=angle#-2.0
IF RIGHTKEY()=1 THEN angle#=angle#+2.0
IF UPKEY()=1 THEN move# = move# + 1
IF DOWNKEY()=1 THEN move# = move# - 1
rem limit speed to 10
if move# > 10 then move# = 10
if move# < -10 then move# = -10
rem Ensure angle stays within range
angle#=wrapvalue(angle#)
ROTATE object 2,0,angle#,0
move object 2,move#
rem Refresh screen
obx#=object position x(2)
oby#=object position y(2)
obz#=object position z(2)
angle#=object angle y(2)
camdist#=50.0 : camhigh#=oby#+60.0 : camfade#=3.5
set camera to follow obx#,oby#,obz#,angle#,camdist#,camhigh#,camfade#,1
SYNC
rem Radar
rem draw radar circle
circle_rad#=(1-div#)*screen height()/2
rad_centre_x#=screen width()-circle_rad#
rad_centre_y#=screen height()-circle_rad#
circle rad_centre_x#, rad_centre_y#, circle_rad#-1
dot screen width()-circle_rad#,screen height()-circle_rad#
rem find object range and bearing
for objno= 10 to 14
If object exist(objno)
if object visible(objno)
range#=((object position x(2)-object position x(objno))^2+(object position z(2)-object position z(objno))^2)^0.5
xdist#=object position x(objno)-object position x(2)
zdist#=object position z(objno)-object position z(2)
if zdist#>=0 then bearing#=0
if zdist#<0 then bearing#=180
if xdist#>0 then bearing#=(90-atan(zdist#/xdist#))
if xdist#<0 then bearing#=(360-(90+atan(zdist#/xdist#)))
bearing#=wrapvalue(bearing#-object angle y(2))
rem draw echo
ink 0,0
dot old_echox#(objno),old_echoy#(objno)
curr_echox#(objno)=rad_centre_x#+(range#*cos(bearing#-90))/75
curr_echoy#(objno)=rad_centre_y#+(range#*sin(bearing#-90))/75
ink rgb(0,255,255),0
dot curr_echox#(objno),curr_echoy#(objno)
old_echox#(objno)=curr_echox#(objno)
old_echoy#(objno)=curr_echoy#(objno)
endif
endif
next objno#
rem End loop
LOOP
end
I have put in the whole program - all I have removed is the loading of textures, so all you need is the code
James