Hello, everyone! I've been programming in IDL for a little under a
year now, and I am currently building a program part of which involves
graphically selecting a 4-point polygon on a sphere (each side of
which is a geodesic).
For that, I record the user's clicks and moves on the screen and store
the x- and y- coordinates of the points they selected in a 2x4 array.
The array is then processed by a function that transforms it into x-
and y- coordinates of a spherical polygon. To do so, it first converts
the coordinates to spherical using cv_coord. Then it uses the library
function map_2points to find the longitude-latitude path arrays
between the 4 point pairs. Then it combines all the longitudes and
latitudes into one array, and cv_coord's them back into cartesian
coordinates. The points are then used as data for an IDLgrPolyline
object.
The function works, but the resulting polygon looks extremely choppy,
making it practically impossible to do any precision work (which is
necessary). So my question is - how do I draw a geodesic curve without
using three precision-degrading processes (cv_coord, map_2points, and
cv_coord again) in a row?
Thank you,
~Aram Panasenco
P.S. I can post the function that renders the polygon online if
necessary.
|
|
0
|
|
|
|
Reply
|
panasencoaram (5)
|
4/4/2010 1:24:12 AM |
|
In article
<018e5283-b8e4-446a-9ba1-35625dcf678c@g11g2000yqe.googlegroups.com>,
Aram Panasenco <panasencoaram@gmail.com> wrote:
> Hello, everyone! I've been programming in IDL for a little under a
> year now, and I am currently building a program part of which involves
> graphically selecting a 4-point polygon on a sphere (each side of
> which is a geodesic).
> For that, I record the user's clicks and moves on the screen and store
> the x- and y- coordinates of the points they selected in a 2x4 array.
> The array is then processed by a function that transforms it into x-
> and y- coordinates of a spherical polygon. To do so, it first converts
> the coordinates to spherical using cv_coord. Then it uses the library
> function map_2points to find the longitude-latitude path arrays
> between the 4 point pairs. Then it combines all the longitudes and
> latitudes into one array, and cv_coord's them back into cartesian
> coordinates. The points are then used as data for an IDLgrPolyline
> object.
>
> The function works, but the resulting polygon looks extremely choppy,
> making it practically impossible to do any precision work (which is
> necessary). So my question is - how do I draw a geodesic curve without
> using three precision-degrading processes (cv_coord, map_2points, and
> cv_coord again) in a row?
>
> Thank you,
> ~Aram Panasenco
>
> P.S. I can post the function that renders the polygon online if
> necessary.
How far apart are your points? Precision should not be a problem
unless they are very close together. We use the same basic
approach all the time to draw great circles on maps (using
widget events and CONVERT_COORD).
How many points are you using to create each side of the polygon?
Ken Bowman
|
|
0
|
|
|
|
Reply
|
Kenneth
|
4/4/2010 2:03:45 PM
|
|
On Apr 4, 7:03=A0am, "Kenneth P. Bowman" <k-bow...@null.edu> wrote:
> In article
> <018e5283-b8e4-446a-9ba1-35625dcf6...@g11g2000yqe.googlegroups.com>,
> =A0Aram Panasenco <panasencoa...@gmail.com> wrote:
>
>
>
>
>
> > Hello, everyone! I've been programming in IDL for a little under a
> > year now, and I am currently building a program part of which involves
> > graphically selecting a 4-point polygon on a sphere (each side of
> > which is a geodesic).
> > For that, I record the user's clicks and moves on the screen and store
> > the x- and y- coordinates of the points they selected in a 2x4 array.
> > The array is then processed by a function that transforms it into x-
> > and y- coordinates of a spherical polygon. To do so, it first converts
> > the coordinates to spherical using cv_coord. Then it uses the library
> > function map_2points to find the longitude-latitude path arrays
> > between the 4 point pairs. Then it combines all the longitudes and
> > latitudes into one array, and cv_coord's them back into cartesian
> > coordinates. The points are then used as data for an IDLgrPolyline
> > object.
>
> > The function works, but the resulting polygon looks extremely choppy,
> > making it practically impossible to do any precision work (which is
> > necessary). So my question is - how do I draw a geodesic curve without
> > using three precision-degrading processes (cv_coord, map_2points, and
> > cv_coord again) in a row?
>
> > Thank you,
> > ~Aram Panasenco
>
> > P.S. I can post the function that renders the polygon online if
> > necessary.
>
> How far apart are your points? =A0Precision should not be a problem
> unless they are very close together. =A0We use the same basic
> approach all the time to draw great circles on maps (using
> widget events and CONVERT_COORD).
>
> How many points are you using to create each side of the polygon?
>
> Ken Bowman
Ah, that's the problem! I used points 2 degrees apart (dpath=3D2). Now I
changed dpath to 10, and it renders perfectly. I think I tried that
approach briefly before and didn't like it because it made my
polygon's corners sloppy, but I can easily insert the corner points
manually.
Thank you very much!
~Aram Panasenco
|
|
0
|
|
|
|
Reply
|
Aram
|
4/4/2010 7:43:56 PM
|
|
In article
<f8831fc9-6365-488e-bc28-b01ab05024f9@k13g2000yqe.googlegroups.com>,
Aram Panasenco <panasencoaram@gmail.com> wrote:
> > How many points are you using to create each side of the polygon?
> >
> > Ken Bowman
>
> Ah, that's the problem! I used points 2 degrees apart (dpath=2). Now I
> changed dpath to 10, and it renders perfectly. I think I tried that
> approach briefly before and didn't like it because it made my
> polygon's corners sloppy, but I can easily insert the corner points
> manually.
>
> Thank you very much!
>
> ~Aram Panasenco
I do like problems that are easy to solve. :-)
Ken
|
|
0
|
|
|
|
Reply
|
Kenneth
|
4/4/2010 10:45:41 PM
|
|
|
3 Replies
365 Views
(page loaded in 0.081 seconds)
Similiar Articles: How to draw a vertical line at the peak of a graph - comp.soft-sys ...I want to draw a vertical line at the first peak value. How can I do that..? ... line([x(ind) x(ind)],yl,'color','r') > > Grzegorz is there any easier way..? Drawing Text Using OpenGL - comp.graphics.api.openglHello, I'm using GLUT to draw 2D text to screen (glutBitmapString). Anyhow, I ... Is there any easy way to do this? My program is in 3D so if I use glVertex3f to draw ... Draw jagged lines? - comp.graphics.apps.paint-shop-proRick Sherman wrote: > > Is there a way in PSP8 to draw jagged lines like > > -----/\/\/\----/\/\/\----/\/\/\----- Perhaps it would be easier to answer this question ... Drawing a 2D-Grid - comp.graphics.api.openglHi I need to draw a two-dimensional Grid with OpenGL. I do not need any 3D ... first of all if you only want 2D functionality, there may be better/easier ways to get ... Green's theorem in matlab? - comp.soft-sys.matlabGreen's theorem is one way, but I think there's an easier way of demonstrating it. ... It's easier to draw a picture than to put it into words. So draw a picture and ... Intersection of NURBS surface and Plan - comp.graphics.api.opengl ...Then draw an interpolating BSpline, NURB or CSpline through the > calculated points. The less easy way, although more precise, is to store the > parameter-values of the ... Removing black border when using rectangle tool - comp.graphics ...Hi Guy Probably a bit of a noobie question but when I draw a rectangle usin the rectangle tool it creates a rectangle with a black border Is there an easy way to ... Automatically resize font when component size changes? - comp.lang ...... than a lot of calls to getFontMetrics(getFont()).charWidth('x') is there an easy way to ... Some weird font might make >> 11:11:11 really wide. > > If you draw the time as ... Surface and cutplane - comp.graphics.api.opengl... of a surface (something like gluCylinder) and a cutplane. Is their an easy way to do it? ... How to draw conical surfaces with OpenGL? - comp.graphics.api ... Surface and ... Draw a Cone - comp.graphics.api.opengl... the cone, and then a GL_POLYGON for the cone's base. It's very easy ... Help - Google In SketchUp, there are often multiple ways to draw the same thing. Here are two ways to ... easy way to make a geodesic dome - AutoCAD Tutorials, Articles ...i would like to build one of these domes in my backyard and id like to be able to ... Here is a basic 3D dome strut design I made. A geodesic dome is nothing more ... How to Make a Paper Geodesic Dome | eHow.comDraw lines parallel to each side, 1 cm away ... Geodesic dome houses are efficient and easy to build, but a major obstacle in ... 6 Ways to Get Out With the Gals; Budget ... 7/22/2012 3:47:05 AM
|