comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: ALIGNING IN PLOT_3DBOX
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: ALIGNING IN PLOT_3DBOX [message #18010] Sun, 21 November 1999 00:00
Richard G. French is currently offline  Richard G. French
Messages: 65
Registered: June 1997
Member
"Mark C." wrote:
>
> I have: A f(x,y,z) where z=f(x,y). For the purpose of this discussion, say,
> a straight line in 3D space.
>
> I did: Using Plot_3box, I get a st. line in 3d space. But because of the
> source data, f(x,y,z)'s projection on the x-y plane, which is a st. line, is
> NOT parallel to either the x- or the y-axis.
>
> I need: To translate and/or rotate the data so that f's projection on the
> x-y plane is parallel to either the x- or y-axis.
>
> I am not (yet) familiar with object based graphics. So any suggestion in the
> 'old' or 'traditional' graphics method is appreciated.
>
> Thanks in advance.
>
> Mark C.

Mark - Once you have the projection of the points into the x-y plane,
can't
you simply find the angle with repect to the x axis that the line makes,
and
do a rotation? Let's say that you have two points x=[1,2] and y=[.1,.3]
on the
x-y plane. IF you know a priori that all points fall on the line
connecting
these points, you can replace x and y by x', y' corresponding to
rotating the
points so that they are parallel to the x' axis. You would then plot
z=f(x',y').

In this example, you would want to rotate the x,y axes counterclockwise
about
the origin by an angle
theta=atan(y[1]-y[0],x[1]-x[0])
using
x' = x cos(theta) + y sin(theta)
y' = -x sin(theta) + y cos(theta)

If you use this to convert all of your x y values to x',y', you will
have
f(x',y',z) that should have the straight line parallel to the x' axis.

Let me know if this works!
Dick French
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: plot3dbox, but not quite...
Next Topic: Re: ANNOUNCE: plotconfig

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 16:02:37 PDT 2025

Total time taken to generate the page: 1.33633 seconds