Difference between revisions of "User:Gabbar1947/GSOC17/Report"

From BRL-CAD
(Created page with "=='''Annotations: Implement support for 2D annotations | Project Report'''== The project was divided into two parts: *Creating a new primitive for annotations *Rendering the...")
 
 
(5 intermediate revisions by the same user not shown)
Line 4: Line 4:
 
*Creating a new primitive for annotations
 
*Creating a new primitive for annotations
 
*Rendering the primitives to the wireframe view
 
*Rendering the primitives to the wireframe view
 +
*Support for the screen projection
  
 
==='''Creating a new primitive for annotations'''===
 
==='''Creating a new primitive for annotations'''===
Line 12: Line 13:
 
   https://sourceforge.net/p/brlcad/patches/469/#34f1
 
   https://sourceforge.net/p/brlcad/patches/469/#34f1
  
*The final struct will be of the annotation_internal that contains:
+
==='''Rendering the primitive on screen'''===
**The point in the 3D coordinate system that maps to the origin in the 2D annotation coordinate system.
+
*The next part was to add support for the visualization of the primitive
**The curves of the primitive.
+
*Input for the primitive also handled through the 'in' command in the patches mentioned below
**Some other required parameters and flags.
+
 
*Next step would be to define annotations.c
+
  https://sourceforge.net/p/brlcad/patches/471/#97f3
*The annotations.c will comprise of various functions:(these functions basically append the annotations according to the details found in the internal object)
+
  https://sourceforge.net/p/brlcad/patches/471/#4b72
**Annotation_validation function
 
**Functions for appending the  line with text and corresponding parameters.
 
**Returning the appended annotation details though an external return object
 
  
'''Properties'''
+
==='''Support for the 3D->2D projection'''===
  
*Provision for altering the properties of the annotation created through the command line, if time permits. *Otherwise this is something that is to be done once we have a basic frame ready for the annotations. The properties can be changed using the annotation keyword in the command line.
+
{|align="right"
*These properties include(subject to change after discussion) :
+
|[[Image:Example_annot.png|thumb|256px|Example annot object created with the in command]]
**Font
+
|}
**Color
 
**Line Width
 
**Text alignment and placement
 
**Some other parameters
 
  
 +
*Annotations always remain in the plane of the screen
 +
*Modifying the projection matrices for all the display managers was another task
 +
*Scaling the annotations was another issue
 +
*All of this was handled by the patches mentioned below
  
==='''Representation in the 3D view'''===
+
  https://sourceforge.net/p/brlcad/patches/471/#cd2e
 
+
  https://sourceforge.net/p/brlcad/patches/471/#acd7
*The second part of the project is to render the annotation object formed.
 
*As mentioned before, we aim for view-independent annotations.
 
*For this to be accomplished we cannot define the annotations in the primitive coordinate system as on rotation or zoom the annotations remains of no use to the viewer.
 
*coordinates from the primitive -> 3D world coordinates -> 2D plane (e.g. with a perspective) -> 2D screen coordinates[working on this]
 
*So a new coordinate system needs to be defined for the annotations.
 
*This coordinate system unlike the other is two dimensional.
 
*By a new coordinate system we mean the existence of a transformation matrix that maps all points of the 3D system to the 2D one.
 
*The process is quite similar to calibrating a camera.
 
*For the rendering part, rest is the same as that for other primitives only thing being that no ray tracing takes place here (as of now).
 
*If time permits the project, I will provide functionalities to portray the annotations on a rendered image.
 
  
 +
Here is the link to my  [https://brlcad.org/wiki/User:Gabbar1947 Proposal]
 +
The tasks mentioned in the proposal are completed, just the extension ideas need to be worked upon.
  
 
'''Project Extension'''
 
'''Project Extension'''
 +
*These are some of the tasks that I aim to work on in the near future:
  
After discussions with the mentors, some extension ideas came up:
+
**Functionality to set up the annotation properties for the primitive( the annotate command)
 
+
**Features related to the coordinate system like the annotation scaling
*Functionality to set up the annotation properties for the primitive
+
**Algorithm to provide a bounding box for the text using the relative coordinates
*Extension for the geometric shape of the annotation
+
**Editor for the annotations just like the sketch primitive has
*Common functionality for the annotation and the sketch primitive in order to reduce redundancy
 
*Features related to the coordinate system like the annotation scaling
 
*Algorithm to provide a bounding box for the text using the relative coordinates  
 
 
 
 
 
 
 
 
 
==='''Timeline'''===
 
 
 
As per the Google Summer of Code  guidelines, work is supposed to begin on May 5, 2017 upto August 21,2017. This is a tentative timeline, as I am not sure regarding the time to be taken by some parts of the project. Results are to be announced on May 4, so schedule goes accordingly. I’ll start working from April itself, and try to improve my proposal as much as I can till the start of community bonding period, irrespective of the project selection.
 
 
 
'''Deliverables''' :
 
 
 
Community bonding period
 
 
 
[ May 5 - May 20 ]:Review the pipeline
 
Take inputs from the community
 
Gain insight into the on screen rendering of the primitive
 
 
 
Coding period ( I aim to start coding from May 21 onwards)
 
 
 
 
 
*[May 21 - June 1]:Define the annotation container with all the basic forms( line, curve)
 
 
 
*[June 1 - June 20]:Start writing functions in annotation.c
 
 
 
*[June 20 - June 26]:Tests for the written functions
 
:Clear any backlog if present
 
 
 
*1st Mid Term Evaluation[June 27 - June 30]
 
 
 
*[July 1 - July 20]:Implement support for the new coordinate system and port the functions left
 
 
 
*[July 20 - July 24]:Write the tests and solve any issue if arises
 
 
 
*2nd Mid Term Evaluation[July 25 - July 27]
 
 
 
 
 
*[July 28 - Aug 5]:Support for rendering the primitives
 
 
 
*[Aug 5 - Aug 15]:Overlay rendered image with annotations
 
 
 
*[Aug 15 - Aug 20]:Write tests and clear any issue if arises
 
 
 
*[Aug 20 - Aug 25]:Documentation support for the written primitive
 
 
 
*Final Evaluation[Aug 25 - Aug 29]
 
 
 
:[ If the work does not complete in the period by any chance, then I’ll work even after the coding period ends. The timeline is subject to change after discussion with the mentors]
 
 
 
==='''Milestones'''===
 
*Fully functional annotations for basic leader line callouts.
 
*Fully functional annotations for GD&T labels.
 
*Tests for those annotative elements
 
*Documentation Support
 
 
 
 
 
==='''Why BRL-CAD ? Why me?'''===
 
 
 
I love the way the community members encourage a person to work. I was looking for a project that could match my research interests and BRL-CAD provided me with the project. I was always helped by the community members while I was working on my first patch, even if I was going totally wrong. I thought of applying last year itself but resisted, because I felt the need to gain more experience in this field and this is the last opportunity for me to be a part of the organization and I simply don’t want to miss it.
 
 
 
Open source has been a part of my life, since I joined college. I have a decent number of contributions to Joomla! and The Processing Foundation. Later on I started working in the field of Computer Vision. I started working on modeling systems as a part of my research. I was looking for something that could match my research interest as well as preserve my interest for open source. After gaining enough knowledge in this area I thought of finally applying with BRL-CAD. I have submitted three patches till now and will continue to do so in the near future. Development process is something with which I’m familiar. I am active on irc and as well as the mailing list and am in contact with the mentors and will do the same in the coming time.
 
 
 
==='''Personal Details'''===
 
 
 
*'''Name''' : Shubham Rathore
 
 
 
*'''Country''' : India(UTC+5.30)
 
 
 
*'''Contact Details'''
 
**Email : shubhamrathore1947@gmail.com
 
**University Email : shubham.rathore@students.iiit.ac.in          
 
**IRC Nick : gabbar1947
 
 
 
*'''Education'''
 
**Centre for Visual Information Technology(CVIT)[1],
 
**International Institute of Information Technology, Hyderabad(IIIT-H), India
 
  
*'''Github''':GABBAR1947
+
'''Documentation'''
 +
*Documentation has been provided  [https://brlcad.org/wiki/Annot here].
 +
*[https://rathoresaab.wordpress.com/gsoclogs Link] to my daily logs.

Latest revision as of 06:32, 27 August 2017

Annotations: Implement support for 2D annotations | Project Report[edit]

The project was divided into two parts:

  • Creating a new primitive for annotations
  • Rendering the primitives to the wireframe view
  • Support for the screen projection

Creating a new primitive for annotations[edit]

  • What was basically required was a container to hold things together
  https://sourceforge.net/p/brlcad/patches/469/#ea23
  https://sourceforge.net/p/brlcad/patches/469/#34f1

Rendering the primitive on screen[edit]

  • The next part was to add support for the visualization of the primitive
  • Input for the primitive also handled through the 'in' command in the patches mentioned below
 https://sourceforge.net/p/brlcad/patches/471/#97f3
 https://sourceforge.net/p/brlcad/patches/471/#4b72

Support for the 3D->2D projection[edit]

Example annot object created with the in command
  • Annotations always remain in the plane of the screen
  • Modifying the projection matrices for all the display managers was another task
  • Scaling the annotations was another issue
  • All of this was handled by the patches mentioned below
  https://sourceforge.net/p/brlcad/patches/471/#cd2e
  https://sourceforge.net/p/brlcad/patches/471/#acd7

Here is the link to my Proposal The tasks mentioned in the proposal are completed, just the extension ideas need to be worked upon.

Project Extension

  • These are some of the tasks that I aim to work on in the near future:
    • Functionality to set up the annotation properties for the primitive( the annotate command)
    • Features related to the coordinate system like the annotation scaling
    • Algorithm to provide a bounding box for the text using the relative coordinates
    • Editor for the annotations just like the sketch primitive has

Documentation

  • Documentation has been provided here.
  • Link to my daily logs.