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

Home » Public Forums » archive » Re: How to change the 3D visual angel?
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: How to change the 3D visual angel? [message #59685] Mon, 07 April 2008 11:11 Go to next message
rtowler is currently offline  rtowler
Messages: 28
Registered: June 2006
Junior Member
On Apr 5, 7:53 am, FOX <20thfox...@gmail.com> wrote:
> I use IDLgrVolume to plot volume data
> but there is something wrong with the visual angel, no matter how i
> rotate the model, the angel it's not good. i want to output the volume
> as xvolume or ivolume's default visualization.
> anything more than model rotate?

Yes, the dark angel of IDL object graphics is at work here ;)

This is a simple case of understanding OpenGL transformations which,
because we expect things to move on the screen as they do in life,
aren't intuitive. This is why I wrote an object graphics camera class
which you should take a look at:

http://www.acoustics.washington.edu/~towler/RHTgrCamera.html

For simplicities sake, I recommend starting with camera__define.zip
located at the bottom of the page. Using my camera class you'll be
able to manipulate your volume more intuitively. If you wish to
ultimately view the volume in iTools (I couldn't really tell from your
email), you can modify the camera code to output the transformation
matrix used to create the view you are interested in and then apply
that to your model before passing it to the iTool.


-Rick
Re: How to change the 3D visual angel? [message #59707 is a reply to message #59685] Sun, 06 April 2008 05:31 Go to previous messageGo to next message
Magic.Zhou is currently offline  Magic.Zhou
Messages: 16
Registered: April 2008
Junior Member
On 4月6日, 上午2时14分, FOX <20thfox...@gmail.com> wrote:
> sorry about the mistake~~english is really a problem,but to find the
> chinese IDL resource even worse
> i mean the visual angle. i'm not using iTools,just the IDLgrVolume
> object
> i want to overlook the cube, but the view point always be the center
> of the view
>
> my poor english stops me to explain it clear, in fact neither in
> chinese
>
> so anyone can give me some examples on how to show a cube with axix
> thanks

haha, me too. i am from shanghai? what about u?
Re: How to change the 3D visual angel? [message #59709 is a reply to message #59707] Sat, 05 April 2008 09:54 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
FOX writes:

> sorry about the mistake~~english is really a problem,but to find the
> chinese IDL resource even worse
> i mean the visual angle. i'm not using iTools,just the IDLgrVolume
> object
> i want to overlook the cube, but the view point always be the center
> of the view

Well, yes, object graphics can be pretty low-level and
setting up the viewport and the rotation necessary to
see something can be a problem. We have the same problem
with surfaces, for example. Perhaps you can learn something
about how it is done by examining the code in a program
like Simple_Surface:

http://www.dfanning.com/programs/simple_surface.pro

There the surface rotations for the surface model look
like this:

; Rotate the surface model to the standard surface view.
thisModel->Rotate,[1,0,0], -90 ; To get the Z-axis vertical.
thisModel->Rotate,[0,1,0], 30 ; Rotate it slightly to the right.
thisModel->Rotate,[1,0,0], 30 ; Rotate it down slightly.

Note that the viewport has been previously set-up to put
the center of rotation in the center of the window. If it
is somewhere else, you will have to translate the object to the center,
perform the rotation, and translate it back to where you want it.

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: How to change the 3D visual angel? [message #59710 is a reply to message #59709] Sat, 05 April 2008 09:20 Go to previous messageGo to next message
d.poreh is currently offline  d.poreh
Messages: 406
Registered: October 2007
Senior Member
On Apr 5, 6:14 pm, FOX <20thfox...@gmail.com> wrote:
> sorry about the mistake~~english is really a problem,but to find the
> chinese IDL resource even worse
> i mean the visual angle. i'm not using iTools,just the IDLgrVolume
> object
> i want to overlook the cube, but the view point always be the center
> of the view
>
> my poor english stops me to explain it clear, in fact neither in
> chinese
>
> so anyone can give me some examples on how to show a cube with axix
> thanks

Also Axis *NOT* Axix
Re: How to change the 3D visual angel? [message #59712 is a reply to message #59710] Sat, 05 April 2008 09:14 Go to previous messageGo to next message
fox is currently offline  fox
Messages: 5
Registered: March 2008
Junior Member
sorry about the mistake~~english is really a problem,but to find the
chinese IDL resource even worse
i mean the visual angle. i'm not using iTools,just the IDLgrVolume
object
i want to overlook the cube, but the view point always be the center
of the view

my poor english stops me to explain it clear, in fact neither in
chinese

so anyone can give me some examples on how to show a cube with axix
thanks
Re: How to change the 3D visual angel? [message #59714 is a reply to message #59712] Sat, 05 April 2008 08:14 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
FOX writes:

> I use IDLgrVolume to plot volume data
> but there is something wrong with the visual angel, no matter how i
> rotate the model, the angel it's not good

I realize English is not your first language, and
I am not making fun of you at all, but "angel"
throws the iTools into a whole new light for me,
and explains a lot. :-)

You are undoubtable talking about an "angle". But
I know as much about angles in iTools as I do about angels.
Sorry.

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: How to change the 3D visual angel? [message #59970 is a reply to message #59685] Mon, 21 April 2008 02:27 Go to previous message
fox is currently offline  fox
Messages: 5
Registered: March 2008
Junior Member
thank all you guys
really helps
i will try myself

ps, i'm from nanjing, pmo
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Pleasant Workbench Surprise
Next Topic: interpolation problem

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

Current Time: Fri Oct 10 10:00:09 PDT 2025

Total time taken to generate the page: 7.88351 seconds