POV-Ray : Newsgroups : povray.tools.general : Norbert Kern's 'Position-Finder' code-- redux : Re: Norbert Kern's 'Position-Finder' code-- redux Server Time
26 Feb 2024 20:10:28 EST (-0500)
  Re: Norbert Kern's 'Position-Finder' code-- redux  
From: Kenneth
Date: 27 Sep 2018 14:30:07
Message: <web.5bad2103bb085d6ca47873e10@news.povray.org>
Thomas de Groot <tho### [at] degrootorg> wrote:
> On 27-9-2018 0:09, Kenneth wrote:
> > Thomas de Groot <tho### [at] degrootorg> wrote:

>
> > BTW, I noticed a slight mistake in your code:
> > [Given]
> > //=======================================
> > // TEST ROD
> > // ======================================
> > //Rod at position given by:
> > //#declare screen_x_position = 260;
> > //#declare screen_y_position = 850;
> > cylinder {<0,0,0>, <0,100,0>,5 pigment {rgb <1,1,0>}
> > translate <-2426.313, -269.700, -1300.118>
> > }
> >
> > ..... but the actual translation that's returned from those screen
> > percentages is
> > translate <-2315.395, -298.978, -1668.753>
> >
> > There's still a position error, but not quite as large.
>
> That is bizarre because I literally copied the translation values from
> the screen. So there seems to be a slight difference between computers
> too...
>

Well, I discovered why we arrived at different values: It was a really simple
and dumb mistake I made. I've been running your code tests at 800X600
resolution; I didn't notice that your own tests used 1280X640. Uh, that does
make a difference :-)  Using your aspect ratio, my values now agree with yours.
Duh. Sorry for the confusion-- and I'm glad it turned out to be so simple!!
> >
> > As an experiment to see the effect of a changing camera angle, try this...

Well, those values are now wrong as well :-O  Although, it would still be useful
for you to run two renders with vastly different camera angle values, to see how
the found translation value gets more accurate at 'telephoto/zoom' settings.

BTW, Norbert's position-finder code also #debugs the found rotation/translation
values to the message pane. My own (Windows) set-up for *using* those values is
to go there, then EDIT/COPY PANE, then paste the contents into Windows' Wordpad
or Notepad. Then, I re-copy the two values and simply paste them into my scene
code. (Instead of copying them by eye from the preview render.) It's fast and
foolproof.

Meanwhile, I continue working...


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.