Re: rotations in threed plots

From: Dave Kennison (kennison AT unknown)
Date: Tue Oct 14 2003 - 17:14:37 MDT

  • Next message: Dave Kennison: "Re: rotations in threed plots"

    Joel,

    > I want to draw a plot of points in 3-d along with their x,y,z coordinate
    > axes, as seen from an oblique viewpoint, but with two of the three axes
    > lined up along the plot page like so:
    > v
    > |__________
    > | |
    > .|. . . . .|
    > .|. . . . .|
    > .|_________|__ u
    > / . . . . .
    > /
    > /w
    > using threed routines, if I choose the viewpoint approximately along one
    > of the axes, say by making the viewpoint array eye = (0,0,1000), I do get
    > roughly this form:
    > v
    > |
    > |. . . . .
    > |. . . . .
    > |. . . . .
    > |__________ u
    > (w)
    > But, if the the viewpoint is off-axis, say (1000,1000,1000), the plot
    > comes out rotated about the line joining eye and the origin by an amount
    > I don't know how to control, like
    > u
    > /|..
    > /.|..
    > / .|..
    > / .|..
    > / .|..
    > | .|..
    > | .|..
    > | .|..
    > | / \
    > | / \
    > / \
    > v w
    > The usual threed routines (set3, curve3, perim3, point3) have no further
    > variables to adjust. Is there a way then to rotae this back, i.e., specify
    > both of the orientation angles? (A previous suggesttion was to call set3
    > once for the points with the oblique value for eye, and then for the axis
    > with the "on-axis" value, but this breaks the connection between the points
    > and their coordinate values.)

    I'm not completely certain that I understand what you are asking, but let me
    take a stab at this: if you want the u and v axes to be perpendicular to each
    other in the perspective view that you draw, then you have to use a line of
    sight that is perpendicular to the u/v plane. So, if you put the eye at
    (1000,1000,1000), you need to look toward a point like (1000,1000,0). THREED
    forces you to look at the center of the "box" defined by six of its arguments.
    It may be that one way to get what you want is to define the "box" in such a
    way as to have the desired center point.

    What I would rather have you do is to use the newer utility TDPACK, which
    lets you (in fact, makes you) specify where the eye is and at what point it
    is looking. I think TDPACK has all the capabilities of THREED (and more),
    though the interface is a bit different.

    I'm a little rusty in using THREED, but I can certainly help you with using
    TDPACK ...

    Dave Kennison
    _______________________________________________
    ncarg-talk mailing list
    ncarg-talk AT unknown
    http://mailman.ucar.edu/mailman/listinfo/ncarg-talk



    This archive was generated by hypermail 2b29 : Mon Oct 20 2003 - 08:28:53 MDT