patchGNU Octave - Patches: patch #9049, Higher-level camera manipulation...

 
 

patch #9049: Higher-level camera manipulation functions

Submitted by:  Colin Macdonald <cbm>
Submitted on:  Wed 13 Jul 2016 05:42:24 AM UTC  
 
Category:  Core : new function Priority:  5 - Normal
Status:  Done Privacy:  Public
Assigned to:  None Open/Closed:  Closed

Add a New Comment (Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

( Jump to the original submission)

Thu 12 Oct 2017 07:04:41 PM UTC, comment #11: 

There was still a bug that camlookat always acted on gca even if the input was objects in another axes. That is fixed together with a test for it here:
http://hg.savannah.gnu.org/hgweb/octave/rev/e201dc969e24

I also included the "pause (1)"s together with some minor style fixes.

Maybe it would be possible to use a private "pause" function that does nothing for the generation of the files for the plot comparison pages? A call to an empty function shouldn't affect the timing too much.

Markus Mützel <mmuetzel>
Project Member
Thu 12 Oct 2017 06:32:38 PM UTC, comment #10: 

Sure "pause (1)" is fine.

The only drawback I can see is that timing data (printed on screen while generating demo files) have no sense. That is already the case e.g. for "comet" demos.

Pantxo Diribarne <pantxo>
Project Member
Thu 12 Oct 2017 06:24:38 PM UTC, comment #9: 

Do you want to remove them completely? Or would "pause (1)" be okay?

Markus Mützel <mmuetzel>
Project Member
Thu 12 Oct 2017 06:04:38 PM UTC, comment #8: 

Hi,

Can we remove the "pause" statements from the demo in camlookat?

We also use demos to produce automatically plot comparison pages and I think we don't want user interaction to be required when producing those pages.

Pantxo Diribarne <pantxo>
Project Member
Wed 11 Oct 2017 08:22:36 PM UTC, comment #7: 

Very impressive!  I owe you a drink whenever we're in the same place, at OctConf or otherwise.

Colin Macdonald <cbm>
Wed 11 Oct 2017 07:39:19 PM UTC, comment #6: 

While cleaning up what I tried so far, I realized where it went wrong.
I pushed your patch (in the version from comment #4) here:
http://hg.savannah.gnu.org/hgweb/octave/rev/141e6e16d900

And pushed another patch on top of it which fixes the failing xtest here:
http://hg.savannah.gnu.org/hgweb/octave/rev/60e4e324a525

Markus Mützel <mmuetzel>
Project Member
Mon 09 Oct 2017 09:13:47 PM UTC, comment #5: 

Markus, its been awhile but I can try.  It might be more efficient for you to post what you've done, that way if I drop this, its still moving forward.

Colin Macdonald <cbm>
Mon 09 Oct 2017 07:16:24 PM UTC, comment #4: 

Colin,

I had a look at the camtarget patch: I think the results are different from Matlab because you are using orthogonal projection to calculate the distance from the corners of the bounding box of the target to the line of sight. The results are better taking perspective into account (see below).
I also think that the algorithm has to consider the dataaspectratio of the axes when calculating the size of the target.

Attached is your patch with some minor changes that applies on a current tip. Would you consider improving these remaining points?

I started with a more trigonometric approach that got 2 out of the 3 test cases in the xtest right. But then I got lost in the signs and directions. If you'd like, I could post what I have so far (needs major cleanup). But maybe you'd prefer using your own approach.

(file #42103)

Markus Mützel <mmuetzel>
Project Member
Sun 08 Oct 2017 04:40:08 PM UTC, comment #3: 

I re-based the camorbit patch, added the unwind_protect_blocks and fixed the pxref's.

The test that was failing for you no longer fails with a current tip of the default branch. Maybe there was an underlying issue that was fixed in the meanwhile (might have been the camera update functions from your other patch?). I changed that test from xtest to test and pushed the patch here:
http://hg.savannah.gnu.org/hgweb/octave/rev/4e97a92d16c0

One more to go...

Markus Mützel <mmuetzel>
Project Member
Sun 08 Oct 2017 03:12:43 AM UTC, comment #2: 

No need to apologize, I'm just excited to see these going in.

Colin Macdonald <cbm>
Sat 07 Oct 2017 09:03:29 PM UTC, comment #1: 

Colin,
I re-based the patch that adds camroll and camzoom to the current tip, added the unwind_protect blocks to the tests and moved _rotate_around_axis_.m from the private folder so that functions in the "draw" and "appearance" folder can access it.
Wrt to the "camzoom" function, I changed it to interpret the zoom factor differently: A zoom factor of 2 makes the objects in the axes appear twice as large. That also fits quite well with the results from Matlab.

Pushed here:
http://hg.savannah.gnu.org/hgweb/octave/rev/f80dc6db9d18

Sorry for the long delay. I'll try to review the other patches in this report soon.

Markus Mützel <mmuetzel>
Project Member
Wed 13 Jul 2016 05:42:24 AM UTC, original submission:  

This depends on patch #9046 for the lower level features.

Doesn't match Matlab yet (they adjust camva in way that I haven't reverse engineered yet), but these do what their docs say so perhaps they are useful as is, even without replicating matlab behaviour.

There are xtests in place for matching Matlab.

Colin Macdonald <cbm>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #42103:  0003_camlookat_v2.patch added by mmuetzel (10KiB - application/octet-stream)
file #37882:  0002_camorbit_v4.patch added by cbm (10KiB - text/x-patch)
file #37883:  0003_camlookat_v1.patch added by cbm (10KiB - text/x-patch)
file #37837:  0001_camroll_camzoom_v2.patch added by cbm (10KiB - text/x-patch)
file #37838:  0002_camorbit_v3.patch added by cbm (10KiB - text/x-patch)

 

Digest:
   patch dependencies.

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by pantxo (Posted a comment)
  • -email is unavailable- added by mmuetzel (Posted a comment)
  • -email is unavailable- added by cbm (Submitted the item)
  • -email is unavailable- added by cbm
  • -email is unavailable- added by cbm
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

     

     

    Follow 12 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-10-21 mmuetzel StatusReady For Test => Done
        Open/ClosedOpen => Closed
    2017-10-11 mmuetzel StatusIn Progress => Ready For Test
    2017-10-09 mmuetzel Attached File- => Added 0003_camlookat_v2.patch, #42103
    2017-10-07 mmuetzel StatusNone => In Progress
    2016-07-15 cbm Attached File- => Added 0002_camorbit_v4.patch, #37882
        Attached File- => Added 0003_camlookat_v1.patch, #37883
    2016-07-13 siko1056 Dependencies- => Depends on patch #9046
    2016-07-13 cbm Attached File- => Added 0001_camroll_camzoom_v2.patch, #37837
        Attached File- => Added 0002_camorbit_v3.patch, #37838
        Carbon-Copy- => Added siko1056
        Carbon-Copy- => Added mmuetzel

    Back to the top


    Powered by Savane 3.5