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

Home » Public Forums » archive » Re: "Object Graphics and Vectors" Reloaded
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: "Object Graphics and Vectors" Reloaded [message #40313 is a reply to message #40311] Tue, 03 August 2004 06:15 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Ralf Schaa writes:

> I found Rick Towlers 'vector' Object , which he posted 2002 and it
> plotted a vector in my scene, unfortunately not in the right scale and
> at the right place, i tried the coord_conv but this did not help ...
>
> Of course there is a scaling problem, since the magnitude of the s/c
> velocity is much less than the scale of the coordinate system, so i
> multplied with a factor that makes sure I'd see the vector ...
>
> So, has someone a clue of how to set the scales right for that
> vector-object, or should I consider a new approach?

Alas, scaling everything in a view into the same arbitrary
coordinate system is the *essence* of object graphics programming.
The fact that you are having trouble doing it is not the least
bit surprising to those of us who have lost *weeks* (perhaps
*months*!) struggling with the same thing. :-)

All I can tell you is that my method (which works)
doesn't look anything at all like the methods used
by most RSI programmers (which also work). I don't
have a clue how they do it. :-(

What I do is make a very simple viewplane rectangle
in whatever coordinate system seems to make sense
for the problem at hand. Then I ask the thing I
want to scale for its current "range". I take
that range and scale it with my NORMALIZE function,
which allows me to specify both a range and a position
in my arbitrary coordinate system. It spits out the
scaling and translation factor that I need to pass
along to the [XYZ]Coord_Conv keywords.

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

I tried to figure how the NORMALIZE function works
recently (well, I *wrote* the damn thing!), but
it was hopeless. Let's just say I have no
problem believing in magic. :-)

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Displaying fluid flow in porous medium
Next Topic: problems with passing structures around in gui widgets

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

Current Time: Sat Oct 11 08:03:51 PDT 2025

Total time taken to generate the page: 1.36142 seconds