Menu

#457 rt_ehy_centroid() implemented

Unstable
closed-accepted
None
5
2017-04-11
2017-03-08
No

Centroid for an elliptical hyperboloid.

1 Attachments

Related

Patches: #457

Discussion

  • Shubham Rathore

    Shubham Rathore - 2017-03-08

    revised: the previous patch had some issues

     
  • Shubham Rathore

    Shubham Rathore - 2017-03-08

    revision: there was an unexpected build error, rectified

     
  • Daniel Roßberg

    Daniel Roßberg - 2017-03-09

    First, you have to follow the rules described in the HACKING file, especially the CODING STYLE & STANDARDS section there. Please, adjust your code such that it fulfils these rules.

    In addition, the centroid is always on the x=y=0 line? That's hard to believe.

     
  • Shubham Rathore

    Shubham Rathore - 2017-03-09

    Will go through the file and rectify the errors. Apologies for that.
    The centroid will always lie at some point on the height vector and I is assumed that the vertex of the asymptotes is (0,0) (my bad!) , but you are right, the centroid will change as the vertex changes from (0,0). Will rectify it.

     
  • Shubham Rathore

    Shubham Rathore - 2017-03-12

    UPDATED

     
  • Daniel Roßberg

    Daniel Roßberg - 2017-03-17

    This looks better, but I've still some remarks:
    - BRL-CAD requires a mixture of spaces and tabs for indentation, see "1) Indentation whitespace" in HACKING.
    - Trailing spaces are bad too. There is a line with only white spaces in your patch.
    - Your centroid lies somewhere along ehy_Au (unit vector along semi-major axis). I would have expected it more near ehy_H (height vector). Besides, you use ehy_r1 but not ehy_r2. Do you have a reference in the literature for your formula?
    - You could consider to use vmath.h macros for your vector operations, e.g. VADD2, VSCALE, or VADD2SCALE.

     

    Last edit: Daniel Roßberg 2017-03-17
    • Shubham Rathore

      Shubham Rathore - 2017-04-04
      • I'll rectify the errors. Although i ran indent.sh, there seem to be some issues.
      • I'll rectify the function
      • Will use the vector macros
       
  • Shubham Rathore

    Shubham Rathore - 2017-04-04

    Indented according to HACKING
    used indent.sh and ws.sh

    Centroid function updated

     
  • Daniel Roßberg

    Daniel Roßberg - 2017-04-05

    OK, then one question is still open: You use ehy_r1 but not ehy_r2, do you have a reference in the literature for your formula?

     
  • Shubham Rathore

    Shubham Rathore - 2017-04-07

    Reference added

     
    • Daniel Roßberg

      Daniel Roßberg - 2017-04-09

      I'm not a native English speaker but could it be that "referenced from" means exactly the opposite from what you mean?

       
  • Shubham Rathore

    Shubham Rathore - 2017-04-09

    You may be right, hence the update

     
  • Shubham Rathore

    Shubham Rathore - 2017-04-10

    UPDATED

     
  • Daniel Roßberg

    Daniel Roßberg - 2017-04-11
    • status: open --> closed-accepted
    • Group: Incomplete --> Unstable
     
  • Daniel Roßberg

    Daniel Roßberg - 2017-04-11

    Patch applied with revision 69630.

     

Log in to post a comment.