patchGNU Octave - Patches: patch #9013, New function "material"

 
 

patch #9013: New function "material"

Submitter:  Markus Mützel <mmuetzel>
Submitted:  Tue 31 May 2016 03:07:21 PM UTC
   
 
Category:  Core : new function Priority:  5 - Normal
Status:  Done Privacy:  Public
Assigned to:  None Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Thu 25 Aug 2016 04:01:48 PM UTC, comment #9: 

I pushed the correction to the if statement here (http://hg.savannah.gnu.org/hgweb/octave/rev/6b856c9bc9be).

Rik <rik5>
Group administrator
Thu 25 Aug 2016 12:02:54 PM UTC, comment #8: 

Found an error that has happened when inverting an if-statement in the pushed version with respect to my original patch.
Attached please find the changeset

(file #38348)

Markus Mützel <mmuetzel>
Group administrator
Thu 11 Aug 2016 03:18:21 AM UTC, comment #7: 

Oops, that was my bad (Rik), not Markus' fault.  I pushed a simpler fix here that stops the creation of figures (http://hg.savannah.gnu.org/hgweb/octave/rev/93d475551be2)

Rik <rik5>
Group administrator
Thu 11 Aug 2016 01:35:16 AM UTC, comment #6: 

I pushed a followup change to prevent figures from appearing on screen when "test material" is run, and clean up any stray figures created during the test run:

http://hg.savannah.gnu.org/hgweb/octave/rev/22f45a6b4693

Markus - in the future please try to make sure all %!test and %!error checks don't display any figures on-screen and don't leave any figure handles open after the test returns.

Mike Miller <mtmiller>
Group Member
Wed 10 Aug 2016 03:17:13 AM UTC, comment #5: 

I reviewed the code, made a few changes for clarity, and pushed the patch here (http://hg.savannah.gnu.org/hgweb/octave/rev/c8fc60a183a3).

Rik <rik5>
Group administrator
Wed 20 Jul 2016 08:10:15 PM UTC, comment #4: 

Demo works fine in Windows.

Philip Nienhuis <philipnienhuis>
Group Member
Mon 18 Jul 2016 05:58:14 PM UTC, comment #3: 

The attached patch should apply cleanly on top of file #37937 in patch #8912 "reducepatch".

(file #37938)

Markus Mützel <mmuetzel>
Group administrator
Fri 03 Jun 2016 01:25:31 PM UTC, comment #2: 

The first argument to material is allowed to be any type of graphics handle or a vector of these. The only ones that probably make sense are handles to patch and surface objects themselves or handles to figure, axes or hggroup objects in which case all descending patches and surfaces are updated.
But it seems also to be ok to pass a handle to e.g. a line object in which case nothing changes.

Additionally, material can be called with one output argument which differs depending on how many input arguments are given.

Attached is a patch with material.m that reflects this behavior.

(file #37376)

Markus Mützel <mmuetzel>
Group administrator
Thu 02 Jun 2016 07:32:06 PM UTC, comment #1: 

After some cross checks with Matlab, it turns out that "material" should support a handle to an axes, patch or surface object as first argument.
I am going to add that un-documented syntax (and document it for Octave) within the next days.

Markus Mützel <mmuetzel>
Group administrator
Tue 31 May 2016 03:07:21 PM UTC, original submission:  

The function "material" changes the ambient, diffuse and specular strengths as well as the specular exponent and the specular color reflectance of all "patch" and "surface" objects in the current axes.
This can be used to simulate to some extent the reflectance properties of certain materials when used with "light".

I'll attach the patch as soon as I have the patch number.

Markus Mützel <mmuetzel>
Group administrator

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #37938:  material_v3.patch added by mmuetzel (13KiB - text/x-diff)
file #37376:  material_v2.patch added by mmuetzel (13KiB - text/x-diff)
file #37322:  material.patch added by mmuetzel (10KiB - text/x-diff)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by lachlan (Updated the item)
  • -email is unavailable- added by mmuetzel (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 8 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-02-26 mtmiller Carbon-CopyRemoved 80942 -
    2016-08-25 mmuetzel Attached File- Added patch9013_material_update1.patch, #38348
    2016-08-10 rik5 StatusNone Done
        Open/ClosedOpen Closed
    2016-07-18 mmuetzel Attached File- Added material_v3.patch, #37938
    2016-07-07 lachlan CategoryNone Core : new function
    2016-06-03 mmuetzel Attached File- Added material_v2.patch, #37376
    2016-05-31 mmuetzel Attached File- Added material.patch, #37322

    Back to the top

    Powered by Savane 3.13-3230.
    Corresponding source code