

"Kenneth" <kdw### [at] gmailcom> wrote:
> A couple of initial (naive?) questions, to help me bettervisualize the details:
> >
> > Assume an orthographic camera.
> > Let's say that I have a line segment extending from the top left of
> > an image to the lower right.
>
> Is that initial line an actual object in the 3D scene that appears to extend
> from corner to corner, or is it a line only in flat 2D screen space (like
> Screen.inc would typically produce, for example)? I'm guessing it's a 3D
> object, extending into the scene.
That initial line is indeed an axis of the object, which would extend forward
and backward from the image plane if it were an actual 3D object.
> > If I draw a line perpendicular to this, then I can use this
> > new line as an axis for rotation.
>
> Perpendicular to it in x/y screen space, or pointing 'out' from the middle of
> the initial line segment directly into the camera? Or maybe pointing somewhere
> else in 3D space? Sorry, this one is hard to visualize.
Making the line perpendicular in screen space. Then when the zbuffer line gets
rotated it remains "in place"/inline with where it already is, just with +/
zcomponents in the vectors of the nowrotated endpoints.
> > If I rotate a copy of the line segment around this axis, it should visually
> > remain in line with the original line segment, but the ends would appear to
> > contract.
>
> I can sort of 'see' this...depending on whether or not I understand the initial
> stuff.
Image of work so far attached. It's halfway there, though I'm guessing at
magic rotation angle numbers and just flying by the seat of my pants through
intuition.
Apparently there's a much better way to do this that's used in multiple view
geometry in computer vision, but it uses QR decomposition and SVD, among other
matrix operations. There are Matlab libraries to do some of this, but it would
of course be preferable to be able to do this ourselves in SDL/source.
I should probably see if I can find a copy of Hartley and Zisserman, or the more
modern text that has supplanted it  Photogrammetric Computer Vision:
related documents/threads:
https://users.cecs.anu.edu.au/~hartley/Papers/CVPR99tutorial/tut_4up.pdf
https://mathematica.stackexchange.com/questions/9244/solvesystemofequationsrelatedtoperspectiveprojection
https://math.stackexchange.com/questions/242661/findinga3dtransformationmatrixbasedonthe2dcoordinates
https://math.stackexchange.com/questions/455128/howtofindanallinone2dto3dtransformationmatrixforperspectiv
eproject
Post a reply to this message
Attachments:
Download 'yesobjects.png' (621 KB)
Preview of image 'yesobjects.png'

