IDLgrPoly[line|gon] and cv_coord [message #33504] |
Tue, 07 January 2003 14:35  |
paul wisehart
Messages: 28 Registered: December 2002
|
Junior Member |
|
|
Hi,
Its me again w/the 3D spheres : )
I'm having trouble understanding the coordinate system
w/regards to the IDLgrPolyline (or Polygon) methods and 'orb's.
Here's an example:
;--------------------------------------------------
my_image = obj_new('IDLgrImage', earthImage)
my_orb = obj_new('orb', COLOR=[0, 255, 0], RADIUS=0.8, $
DENSITY=2, /TEX_COORDS, TEXTURE_MAP=oimage1,style=1,hide=0,/zero)
pt_radius = 1
pt1 = [0,0,pt_radius]
pt2 = [15,0,pt_radius]
sph_coord = [pt1,pt2]
rect_coord = CV_COORD(FROM_sphere=sph_coord,/to_rect)
my_poly = obj_new('idlgrpolyline',rect_coord,$
thick=10,color=[255,0,0])
my_model -> add, my_poly
my_model -> add, my_orb
xobjview, my_model
;--------------------------------------------------
My 'pt1' and 'pt2' are supposed to be lat/lon coordinates.(spherical)
I convert them to rectangular coordinates.
I've tried pt_radius values .4 -> 1.4 (or so)
I'm trying to draw a line on the surface of the sphere.
The lines I am getting are outside the sphere or not there.
I cannot figure out how the coordinate system works.
I am assuming that by leaving the radius constant my lines will
follow the curve of a sphere.
Whats the default coordinate range of an 'orb' object?
Where's [0,0,0]? At the center of the sphere?
Is the sphere in a 'frame' where [0,0,0] is a vertex?
I can't find any info on the coordinate systems used in object
graphics in the manual either. Maybe someone know's where to look?
(IDL 5.4 by the way)
THANKS!!!!
I'll try to stop bugging you after this one.
--
paul wisehart
wisehart <at> runbox <dot> com
|
|
|