User:Amalia

From BRL-CAD
Revision as of 13:27, 23 March 2015 by Ngassafinjap (talk | contribs) (Parabola)

CONIC CURVE SUPPORT FOR LibreCAD

INTRODUCTION

Personal Information

Name: Ngassa Amalia Finjap

Email: ngassafinjap@gmail.com

IRC Nick: amalia237

Github : Ngassa

Google+ Handles: Ngassa Amalia

Time Zone: UTC + 01:00

Brief Background Information: I am Ngassa Amalia, a senior year management science major from the Catholic University Institute of Buea, Cameroon who's interested in participating in Google Summer of Code under LibreCAD. I am ready to work for for over 40+ hours on my project during the summer holidays and will do everything to meet my project goals on nights and weekends even when my tests and examinations come up.

PROJECT DESCRIPTION

Project Title: Conic Curve Support for LibreCAD

Brief Project Summary

It has been observed that designers start from using small shapes called primitive to attain more complex ones. This project aims at building conic curve support into the LibreCAD software package by implementing the hyperbola and parabola primitives entity types. This will enable users of the LibreCAD software to use conics in modeling the Dulles Airport Tower in Virginia, process just as in the . Hyperbolas in particular can be used in preliminary sketches of beautiful butterflies, nuclear cooling towers, hyperbolic shadows on the wall, hyperbolodial gears in skew shafts and buildings while parabolas can be used by architects to design rainbows, suspension bridges, roller coasters and much more. During this Summer of Code period, I'll be incorporating these two primitives into LibreCAD by defining necessary classes and implementing member functions within interface and implementation files (lc_hyperbola.h, lc_parabola.h and lc_hyperbola.cpp, lc_parabola.cpp) in librecad/src/lib/engine/.

Detailed Project Summary

Here, I give more detailed information on how I intend to build conic curve support into the LibreCAD software package. From my recent studies of the ellipse and circle primitives (rs_circle.* and rs_ellipse.*) in librecad/src/lib/engine/, I observe that for each primitive type is designed as a class with data members which are attributes of that primitive and member functions implementations which define properties of the primitive. In LibreCAD, the framework of engine (math) support for ellipses can be applied readily to hyperbola/parabola, so only minor extension is needed to get those features. This is primarily because LibreCAD equation solvers can solve quartic equations.

Hyperbola

The equation of the hyperbola is (x-x0)^2/a^2 – (y-y0)^2/b^2 = 1.

The hyperbola will be defines as a class with data members ;

  • center
  • majorP ( a in equation above)
  • ratio ( of minor radius to major radius)
  • angle1
  • angle2
  • reversed ( whether it's reversed or not )

Dongxu Li already started implementing the hyperbola primitive in lc_hyperbola.*. In the lc_hyperbola.h interface file, the Hyperbola Data and Hyperpola Entity classes are defined and their data members, corresponding accessor and mutator functions as well as other predicate functions are declared. In the lc_hyperbola.cpp implementation file, the member functions of the above classes are implemented. However, I think functions like the following still have to be implemented (and of course much more)

  • Computing the direction of tangents at some points
  • Create a hyperbola from equation
  • Scale a hyperbola
  • Rotate a hyperbola
  • Move a hyperbola
  • Draw a hyperbola
  • Determine if a point is on the hyperbola
  • etc still have to be implemented.

I am ready to follow Dongxu Li's instructions to do any clean-up and modifications to the hyperbola primitive which he started implementing.

Parabola

The equation of the parabola with vertex (x0, y0) which opens downwards is (y-y0)^2 = 4a(x-x0)

The parabola will be defined as a class with data members ;

  • vertex,
  • focus,
  • latus rectum,
  • flag for direction in which parabola opens up. Or the rotate functions will come in handy to replace this data member.

The parabola with vertex (x0, y0) which opens upwards is given by the equation (x - xo)^2 = 4a(y – yo). To implement the parabola primitive, we define Parabola Data and Parabola Entity classes with their data members and declare their corresponding geometric member functions in lc_parabola.h. In the lc_parabola.cpp implementation file, I'll be implementing the geometric member functions of the aforementioned Parabola classes. The geometric member functions to be implemented include;

  • Computing the position vector of the focus.
  • Compute focal length
  • Create a parabola from equation
  • Find the tangential points and directions from a given point
  • Rotate a parabola
  • Scale a parabola
  • Mirror a parabola against a given axis
  • Draw a parabola
  • And much more

Links to some Pictures

Links to any code or algorithms you intend to use

PROJECT TIMELINE

Deliverables

Pre Mid-term evaluation goals

1. Define the Hyperbola Data and Entity classes.

2. Declare the geometric member functions.

3. Write the lc_hyperbola.cpp file.

Post Mid-term evaluation goals

4. Define the parabola Data and Entity classes.

5. Declare the geometric member functions.

6. Write the lc_parabola.cpp file.

Development schedule

Time availability

I'll be available to start and finish my Google Summer of Code project from May 25th through August 25th 2015 wherein I'll work 40+ hours weekly. To compensate for examination periods in school, I'll work harder during nights and weekends to make sure I meet the goals of my project.

ABOUT MYSELF

Why LibreCAD ?

First off, the very word “Libre” in LibreCAD is a word I like because I love the french language. I chose LibreCAD because it's an open source community-driven initiative and is aligned with my dream of serving within a game-manufacturing software company.This dream will become materialized with sustained contributing to LibreCAD and learning about Computer Aided Design erstwhile.

Why Me ?

I got introduced to computers (my dad literally imposed that on my siblings and I) when I attended the LUKMEF computer training in Limbe, Cameroon. After that I got interested in computer programming in C/C++ and the Organizers of the Google Developer Group Buea helped orientate me on how to learn programming. I've used Linux OSes especially Ubuntu since 2013 and would really be happy to get introduced to open source development through LibreCAD through the Google Summer of Code 2015 program. In November 2014, I build and tested ffmpeg,the open source multimedia framework , on Fedora 20 and reported the results on fate.ffmpeg.org. If I am selected for the program, I will make sure I communicate my progress on a daily basis by chatting on IRC and writing on the mailing lists.

Anything Else

I believe that software development is about passion and not about what students major in while at University. Selecting me will really pass across a message that gender and race doesn't matter in open source development with LibreCAD and would encourage more students ( especially girls ) who aren't Computer Science/Engineering majors to get interested in Computer programming.