Re: "Object Graphics and Vectors" Reloaded [message #40311] |
Tue, 03 August 2004 08:25  |
Ralf Schaa
Messages: 37 Registered: June 2001
|
Member |
|
|
Thanks David, I'll try the normalize function...hopefuly it won't take
weeks ... :-)
David Fanning wrote:
> 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
>
|
|
|